-
Notifications
You must be signed in to change notification settings - Fork 123
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
[CT-852] Deprecate StatefulOrderPlacementV1 #1545
Conversation
Warning Rate Limit Exceeded@chenyaoy has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 43 minutes and 33 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. WalkthroughThe changes involve the removal of Changes
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this 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
Out of diff range and nitpick comments (1)
indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts (1)
Line range hint
1-1
: Review the removal ofStatefulOrderPlacementV1
for potential impacts on related components.Consider the broader impact of this removal on system components that might have depended on
StatefulOrderPlacementV1
. It's crucial to ensure that all dependent features are either updated or deprecated accordingly.
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
protocol/indexer/events/events.pb.go
is excluded by!**/*.pb.go
,!**/*.pb.go
Files selected for processing (3)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts (7 hunks)
- indexer/services/ender/src/validators/stateful-order-validator.ts (5 hunks)
- proto/dydxprotocol/indexer/events/events.proto (1 hunks)
Additional Context Used
Path-based Instructions (3)
indexer/services/ender/src/validators/stateful-order-validator.ts (1)
Pattern
**/**
: Do not include a walkthrough. For all comments on line changes that are longer than 15 lines, add a prefix to the comment of what lines you are commenting on (for example: "The changes from lines 100 to 200...". Add your comment to be on the last 15 lines of the chunk rather than adding your comment to the entire chunk.proto/dydxprotocol/indexer/events/events.proto (1)
Pattern
**/**
: Do not include a walkthrough. For all comments on line changes that are longer than 15 lines, add a prefix to the comment of what lines you are commenting on (for example: "The changes from lines 100 to 200...". Add your comment to be on the last 15 lines of the chunk rather than adding your comment to the entire chunk.indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts (1)
Pattern
**/**
: Do not include a walkthrough. For all comments on line changes that are longer than 15 lines, add a prefix to the comment of what lines you are commenting on (for example: "The changes from lines 100 to 200...". Add your comment to be on the last 15 lines of the chunk rather than adding your comment to the entire chunk.
Additional comments not posted (6)
indexer/services/ender/src/validators/stateful-order-validator.ts (2)
36-36
: The refactoring of thevalidate
method correctly reflects the removal oforderPlace
. Ensure that all dependent components are updated accordingly.
178-178
: The updates togetHandlerInitializer
correctly handle the new event types withoutorderPlace
. Good adherence to the new structure.proto/dydxprotocol/indexer/events/events.proto (1)
241-241
: The update to thereserved
fields inStatefulOrderEventV1
is correctly implemented to avoid future conflicts. This is a good practice in protobuf design.indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts (3)
Line range hint
1-1
: Ensure all necessary imports are still in use after the removal ofStatefulOrderPlacementV1
.Verification successful
Verify the necessity of imports in
events.ts
The imports in
indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts
are still in use after the removal ofStatefulOrderPlacementV1
. The script output shows that all the imports are necessary and none are unused.
- The imports from
../protocol/v1/subaccount
,../protocol/v1/clob
,../shared/removal_reason
,../protocol/v1/perpetual
,protobufjs/minimal
, and../../../helpers
are still required.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify if all imports are still necessary. # Test: Search for unused imports. Expect: No unused imports. rg --type typescript "import" "events.ts" | grep -v "StatefulOrderPlacementV1"Length of output: 109
Script:
#!/bin/bash # Description: Verify if all imports are still necessary. # Test: Search for unused imports. Expect: No unused imports. rg --type ts "import" "events.ts" | grep -v "StatefulOrderPlacementV1"Length of output: 116
Script:
#!/bin/bash # Description: Locate the `events.ts` file and verify if all imports are still necessary. # Step 1: Locate the `events.ts` file. file_path=$(fd events.ts) # Step 2: Verify if all imports are still necessary. rg --type ts "import" "$file_path" | grep -v "StatefulOrderPlacementV1"Length of output: 860
Script:
#!/bin/bash # Description: Verify if all imports are still necessary in the specific `events.ts` file. # Step 1: Locate the specific `events.ts` file. file_path="indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts" # Step 2: Verify if all imports are still necessary. rg --type ts "import" "$file_path" | grep -v "StatefulOrderPlacementV1"Length of output: 855
Line range hint
1-1
: Check for any remaining references toStatefulOrderPlacementV1
in the entire codebase.Verification successful
No remaining references to
StatefulOrderPlacementV1
found in the codebase.
- The search for
StatefulOrderPlacementV1
across the TypeScript files (excludingevents.ts
) returned no results.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Ensure no lingering references to `StatefulOrderPlacementV1` exist. # Test: Search for the deprecated entity. Expect: No occurrences. rg --type typescript "StatefulOrderPlacementV1" --glob '!events.ts'Length of output: 102
Script:
#!/bin/bash # Description: Ensure no lingering references to `StatefulOrderPlacementV1` exist. # Test: Search for the deprecated entity. Expect: No occurrences. rg --type ts "StatefulOrderPlacementV1" --glob '!events.ts'Length of output: 59
Line range hint
1-1
: Validate the removal process ofStatefulOrderPlacementV1
against the project's deprecation policy.
This reverts commit fac6d73.
There was a problem hiding this 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 UI
Review profile: CHILL
Files selected for processing (1)
- proto/dydxprotocol/indexer/events/events.proto (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- proto/dydxprotocol/indexer/events/events.proto
Changelist
We now use LongTermOrderPlacementV1, so deprecate StatefulOrderPlacementV1 to eliminate confusion
Test Plan
[Describe how this PR was tested (if applicable)]
Author/Reviewer Checklist
state-breaking
label.indexer-postgres-breaking
label.PrepareProposal
orProcessProposal
, manually add the labelproposal-breaking
.feature:[feature-name]
.backport/[branch-name]
.refactor
,chore
,bug
.Summary by CodeRabbit
Bug Fixes
orderPlace
properties and related logic to streamline order event handling.Refactor
orderPlace
.These changes enhance the efficiency and accuracy of order event processing.