Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove unused orm module #23633

Merged
merged 1 commit into from
Feb 7, 2025
Merged

chore: remove unused orm module #23633

merged 1 commit into from
Feb 7, 2025

Conversation

zrbecker
Copy link
Collaborator

@zrbecker zrbecker commented Feb 7, 2025

Description

Closes: #23635

On the releases/v0.50.x branch there is a failing test for the orm module. It looks like this module has not been in active development for some time, and is isolated into it's own module that was last released 2 years ago (https://github.com/cosmos/cosmos-sdk/tree/orm/v1.0.0-beta.3). The failing test was fixed on the main branch, but was not backported to the releases/v0.50.x.

Since the module is not in active development, and I am unaware of plans to continue development of the module, I recommend removing the module from the main branch, and backporting it to releases/v0.50.x.

Deleting orm from the Cosmos SDK repo is safe, even on the v0.50.x branch because it is isolated into it's own module, and the cosmos-sdk doesn't depend on it. So as far as cosmos-sdk releases are concerned the deletion of the module has no effect, and thus is non-breaking.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

@zrbecker zrbecker added C:orm backport/v0.50.x PR scheduled for inclusion in the v0.50's next stable release backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release labels Feb 7, 2025
@zrbecker zrbecker requested a review from a team as a code owner February 7, 2025 02:18
Copy link
Contributor

coderabbitai bot commented Feb 7, 2025

📝 Walkthrough

Walkthrough

This pull request removes a vast number of files and corresponding code segments related to the Cosmos SDK ORM module. Documentation, configuration files, code generation scripts, implementation files (including various codecs, key encoders, ORM backend and model logic), and nearly all tests have been deleted. No new functionality or modifications to exported public entities were introduced; rather, existing ORM-related implementations have been entirely removed.

Changes

File(s) Change Summary
orm/CHANGELOG.md, orm/README.md, orm/go.mod, orm/internal/buf*.yaml Removed ORM documentation, module dependency, and Buf configuration files.
orm/Makefile, orm/cmd/protoc-gen-go-cosmos-orm*/main.go Deleted the codegen target and entry point files used for generating ORM protobuf code.
orm/encoding/ormfield/* Eliminated numerous codec implementations (bool, bytes, enum, int32, int64, string, duration, timestamp, uint32, uint64) along with their test files.
orm/encoding/ormkv/* Removed interfaces, types, and tests for key encoding/decoding and entry management in the ORM key-value module.
orm/internal/codegen/* Deleted code generation scripts and configuration (file.go, index.go, query.go, singleton.go, table.go) used to produce ORM-related code.
orm/internal/testkv/* Removed debugging utilities, LevelDB, and in-memory testing backends along with iterator wrappers.
orm/internal/testpb/* Deleted test protobuf schemas, RPC service definitions, and banking ORM implementations with their tests.
orm/model/ormdb/, ormlist/, ormtable/*, orm/orm.go Removed ORM model files covering database/table implementations, schema builders, genesis handlers, module initialization, and associated tests.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@tac0turtle
Copy link
Member

tac0turtle commented Feb 7, 2025

Just a heads up there are teams using this, this is why we couldn't remove it. Doing a GitHub search will tell you which users to reach out to.

Huge fan of the removal though

@zrbecker
Copy link
Collaborator Author

zrbecker commented Feb 7, 2025

Just a heads up there are teams using this, this is why we couldn't remove it. Doing a GitHub search will tell you which users to reach out to.

Huge fan of the removal though

I did a GitHub search and saw users were using v1.0.0-beta.3 released two years ago.

I'm not planning on removing the tags that they are using, so removing it on SDK release branches will not break them.

If active development needs to pick up for this module, I recommend forking it into a repo where development can continue.

There does not seem a purpose to have an unmaintained module on the SDK release branches though.

@zrbecker zrbecker added this pull request to the merge queue Feb 7, 2025
Merged via the queue into main with commit d7f101e Feb 7, 2025
104 of 108 checks passed
@zrbecker zrbecker deleted the zrb/delete_orm branch February 7, 2025 18:15
mergify bot pushed a commit that referenced this pull request Feb 7, 2025
(cherry picked from commit d7f101e)

# Conflicts:
#	x/params/proto/buf.gen.pulsar.yaml
#	x/params/sonar-project.properties
mergify bot pushed a commit that referenced this pull request Feb 7, 2025
(cherry picked from commit d7f101e)

# Conflicts:
#	orm/CHANGELOG.md
#	orm/README.md
#	orm/encoding/encodeutil/util.go
#	orm/encoding/ormfield/bool.go
#	orm/encoding/ormfield/codec_test.go
#	orm/encoding/ormfield/duration.go
#	orm/encoding/ormfield/duration_test.go
#	orm/encoding/ormfield/enum.go
#	orm/encoding/ormfield/int32.go
#	orm/encoding/ormfield/int64.go
#	orm/encoding/ormfield/string.go
#	orm/encoding/ormfield/timestamp.go
#	orm/encoding/ormfield/timestamp_test.go
#	orm/encoding/ormfield/uint32.go
#	orm/encoding/ormfield/uint64.go
#	orm/encoding/ormkv/index_key.go
#	orm/encoding/ormkv/key_codec.go
#	orm/encoding/ormkv/primary_key.go
#	orm/encoding/ormkv/unique_key.go
#	orm/encoding/ormkv/unique_key_test.go
#	orm/go.mod
#	orm/go.sum
#	orm/internal/codegen/file.go
#	orm/internal/codegen/index.go
#	orm/internal/codegen/query.go
#	orm/internal/listinternal/options.go
#	orm/internal/testkv/compare.go
#	orm/internal/testkv/debug.go
#	orm/internal/testkv/leveldb.go
#	orm/internal/testkv/mem.go
#	orm/model/ormdb/genesis.go
#	orm/model/ormdb/module.go
#	orm/model/ormdb/module_test.go
#	orm/model/ormtable/auto_increment_test.go
#	orm/model/ormtable/backend.go
#	orm/model/ormtable/batch.go
#	orm/model/ormtable/bench_test.go
#	orm/model/ormtable/hooks.go
#	orm/model/ormtable/iterator.go
#	orm/model/ormtable/table_test.go
#	orm/orm.go
#	orm/sonar-project.properties
#	orm/testing/ormmocks/hooks.go
#	orm/testing/ormmocks/match.go
#	orm/types/kv/store.go
#	orm/types/ormerrors/errors.go
aljo242 pushed a commit that referenced this pull request Feb 7, 2025
Co-authored-by: Zachary Becker <zrbecker@gmail.com>
aljo242 pushed a commit that referenced this pull request Feb 12, 2025
Co-authored-by: Zachary Becker <zrbecker@gmail.com>
aljo242 pushed a commit that referenced this pull request Feb 12, 2025
Co-authored-by: Zachary Becker <zrbecker@gmail.com>
aljo242 added a commit that referenced this pull request Feb 12, 2025
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Zachary Becker <zrbecker@gmail.com>
@aaronc
Copy link
Member

aaronc commented Feb 12, 2025

As the original author of the orm, agree it should be moved to a standalone repo if someone wants to make updates and has the bandwidth for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v0.50.x PR scheduled for inclusion in the v0.50's next stable release backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release C:orm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove old ORM module which is no longer supported or actively developed
5 participants