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 crisis modules #20809

Merged
merged 6 commits into from
Jul 2, 2024
Merged

chore: remove crisis modules #20809

merged 6 commits into from
Jul 2, 2024

Conversation

tac0turtle
Copy link
Member

@tac0turtle tac0turtle commented Jun 28, 2024

Description

This pr removes the crisis module in favour of directing users to use the circuit breaker. Secondly invariants will be used in testing and siulations going forward.


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

Summary by CodeRabbit

  • Documentation

    • Removed references to the Crisis module from project documentation.
    • Updated module version structures and client command documentation.
  • Refactor

    • Removed the Crisis module from configuration and upgrade handlers.
    • Simplified defaultConfig function by excluding the Crisis module.
  • Chores

    • Adjusted project structure by removing the x/crisis/proto directory.

Copy link
Contributor

coderabbitai bot commented Jun 28, 2024

Warning

Rate limit exceeded

@tac0turtle has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 19 minutes and 46 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between f48238a and 4e68ff1.

Walkthrough

The recent changes span multiple components within the project, primarily involving the removal of references to the crisis module. This includes updates to configuration files, Go source files, and documentation. Specifically, imports and configurations related to the crisis module have been eliminated, reflecting its removal from the project's structure and operational flow.

Changes

File/Path Summary
buf.work.yaml Removed x/crisis/proto directory from the list, affecting project structure.
simapp/upgrades.go Removed import of crisistypes and deleted crisistypes.StoreKey from upgrade configuration.
simapp/v2/upgrades.go Removed crisistypes import and deleted reference to crisistypes.ModuleName in upgrade handlers.
testutil/configurator/configurator.go Updated defaultConfig function to remove "crisis" from module lists.
x/README.md Deleted Crisis module from the list of production-grade modules for Cosmos SDK apps.
x/upgrade/README.md Reformatted and removed crisis module version "1" entry.

Tip

Early access features: enabled

We are currently testing the following features in early access:

  • OpenAI gpt-4o model for code reviews and chat: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available.

Note:

  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.
  • Please join our Discord Community to provide feedback and report issues.
  • OSS projects are currently opted into early access features by default.

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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 tac0turtle marked this pull request as ready for review June 28, 2024 13:51
@tac0turtle tac0turtle requested a review from a team as a code owner June 28, 2024 13:51
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c7375f7 and 52502a8.

Files ignored due to path filters (4)
  • api/cosmos/crisis/v1beta1/tx_grpc.pb.go is excluded by !**/*.pb.go
  • x/crisis/proto/buf.lock is excluded by !**/*.lock
  • x/crisis/types/genesis.pb.go is excluded by !**/*.pb.go
  • x/crisis/types/tx.pb.go is excluded by !**/*.pb.go
Files selected for processing (6)
  • buf.work.yaml (1 hunks)
  • simapp/upgrades.go (2 hunks)
  • simapp/v2/upgrades.go (2 hunks)
  • testutil/configurator/configurator.go (3 hunks)
  • x/README.md (1 hunks)
  • x/upgrade/README.md (4 hunks)
Files skipped from review due to trivial changes (3)
  • simapp/upgrades.go
  • simapp/v2/upgrades.go
  • x/README.md
Additional context used
Path-based instructions (2)
testutil/configurator/configurator.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/upgrade/README.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

LanguageTool
x/upgrade/README.md

[style] ~16-~16: Consider removing “of” to be more concise
Context: ...upgrading a live chain is risky because all of the validators need to pause their state ma...

(ALL_OF_THE)


[style] ~17-~17: ‘exactly the same’ might be wordy. Consider a shorter alternative.
Context: ...s need to pause their state machines at exactly the same point in the process. If this is not do...

(EN_WORDINESS_PREMIUM_EXACTLY_THE_SAME)


[style] ~18-~18: To elevate your writing, try using a synonym here.
Context: ... can be state inconsistencies which are hard to recover from. * [Concepts](#concept...

(HARD_TO)


[uncategorized] ~65-~65: This expression is ususally spelled with a hyphen
Context: ...the chain. Naturally, this Handler is application specific and not defined on a per-module basis. ...

(SPECIFIC_HYPHEN)


[uncategorized] ~82-~82: This expression is ususally spelled with a hyphen
Context: ...n the chain. This StoreLoader is also application specific and not defined on a per-module basis. ...

(SPECIFIC_HYPHEN)


[uncategorized] ~94-~94: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...` multiple times every time on restart. Also if there are multiple upgrades planned ...

(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)


[style] ~149-~149: ‘Any and all’ might be wordy. Consider a shorter alternative.
Context: ...de` does not emit any events by itself. Any and all proposal related events are emitted thr...

(EN_WORDINESS_PREMIUM_ANY_AND_ALL)


[uncategorized] ~168-~168: Possible missing article found.
Context: ...ows users to query the block header for height at which a completed upgrade was applie...

(AI_HYDRA_LEO_MISSING_THE)


[typographical] ~293-~293: Usually, there’s no comma before “if”.
Context: ...ets the currently scheduled upgrade plan, if one exists. ```bash regen query upgrad...

(IF_NO_COMMA)

Markdownlint
x/upgrade/README.md

25-25: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


26-26: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


27-27: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

Additional comments not posted (3)
buf.work.yaml (1)

Line range hint 1-21: Configuration update approved.

The removal of the x/crisis/proto directory from buf.work.yaml aligns with the PR's objective to remove the crisis module. This change is consistent and does not appear to affect other modules.

testutil/configurator/configurator.go (1)

Line range hint 1-255: Configuration update in defaultConfig function approved.

The removal of the crisis module from the configuration lists in the defaultConfig function aligns with the PR's objectives. The changes are consistent and maintain the integrity of the remaining module configurations.

x/upgrade/README.md (1)

Line range hint 1-400: Documentation updates in x/upgrade/README.md approved.

The removal of the crisis module version and adjustments to the module versions list are accurately reflected in the documentation. The reordering of the CLI, REST, and gRPC sections under Client improves readability and organization.

Consider revising the list indentation.
The indentation for the list items under Client is inconsistent with Markdown best practices.

-    * [CLI](#cli)
-    * [REST](#rest)
-    * [gRPC](#grpc)
+  * [CLI](#cli)
+  * [REST](#rest)
+  * [gRPC](#grpc)
Tools
Markdownlint

25-25: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


26-26: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


27-27: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 52502a8 and f48238a.

Files selected for processing (2)
  • simapp/upgrades.go (2 hunks)
  • simapp/v2/upgrades.go (2 hunks)
Files skipped from review as they are similar to previous changes (2)
  • simapp/upgrades.go
  • simapp/v2/upgrades.go

simapp/upgrades.go Outdated Show resolved Hide resolved
@tac0turtle tac0turtle added this pull request to the merge queue Jul 2, 2024
Merged via the queue into main with commit 7b23e52 Jul 2, 2024
68 checks passed
@tac0turtle tac0turtle deleted the marko/remove_crisis branch July 2, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants