-
Notifications
You must be signed in to change notification settings - Fork 124
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
Upgrade slinky to 1.0.8 #2069
Upgrade slinky to 1.0.8 #2069
Conversation
WalkthroughThis update introduces several enhancements to the CI/CD workflows, specifically adding a new branch trigger for the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GitHubActions
participant CI/CD
participant Docker
participant dydx
User->>GitHubActions: Push to chenyao/upgrade-slinky-to-1.0.8
GitHubActions->>CI/CD: Trigger build-and-push
CI/CD->>Docker: Build Docker image
Docker->>dydx: Call ConvertMarketParamsToMarketMap
dydx-->>CI/CD: Return market map
CI/CD-->>GitHubActions: Push snapshot
GitHubActions-->>User: Build complete
Poem
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 Configuration 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: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
protocol/go.sum
is excluded by!**/*.sum
Files selected for processing (7)
- .github/workflows/indexer-build-and-push-dev-staging.yml (1 hunks)
- .github/workflows/protocol-build-and-push-snapshot.yml (1 hunks)
- .github/workflows/protocol-build-and-push.yml (1 hunks)
- protocol/Dockerfile (1 hunks)
- protocol/app/upgrades/v6.0.0/upgrade.go (3 hunks)
- protocol/go.mod (8 hunks)
- protocol/lib/marketmap/utils.go (2 hunks)
Files skipped from review due to trivial changes (1)
- .github/workflows/protocol-build-and-push.yml
Additional comments not posted (6)
protocol/lib/marketmap/utils.go (1)
5-5
: Simplification of market map construction logic.The removal of the API handler instantiation in favor of directly calling
dydx.ConvertMarketParamsToMarketMap
simplifies the code. This change reduces potential points of failure and enhances maintainability. Ensure that this change does not impact any dependent components or functionality.Also applies to: 25-25
.github/workflows/indexer-build-and-push-dev-staging.yml (1)
9-9
: Addition of branch trigger for CI/CD workflow.The addition of the
chenyao/upgrade-slinky-to-1.0.8
branch trigger ensures that the CI/CD workflow is executed for this specific branch. This facilitates continuous integration for the upgrade task.protocol/Dockerfile (1)
2-3
: Update to Golang Alpine image digest.The Dockerfile now uses a more recent Golang Alpine image digest. This update is crucial for incorporating the latest updates and security patches. Ensure that the new image version is compatible with the existing build and runtime requirements.
.github/workflows/protocol-build-and-push-snapshot.yml (1)
9-9
: Branch trigger added forchenyao/upgrade-slinky-to-1.0.8
.The new branch trigger is correctly added, allowing the workflow to run when changes are pushed to this branch. Ensure that this branch is intended to trigger the workflow.
protocol/go.mod (2)
3-3
: Go version updated to1.22.2
.The Go version has been updated to a minor patch release. Ensure that this version is compatible with the rest of the codebase and any build systems in use.
Line range hint
10-71
: Dependencies updated to latest versions.Several dependencies have been updated. Ensure that these updates are compatible with the existing code and do not introduce breaking changes. Pay special attention to any major version changes.
Also applies to: 170-409
mm, err := dydx.ConvertMarketParamsToMarketMap(mpr) | ||
if err != nil { | ||
panic(fmt.Sprintf("Couldn't convert markets %v", err)) |
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.
Ensure error handling for ConvertMarketParamsToMarketMap
.
The function dydx.ConvertMarketParamsToMarketMap
is invoked, and its error is handled by panicking. Consider handling the error more gracefully to avoid crashing the application in production.
mm, err := dydx.ConvertMarketParamsToMarketMap(mpr)
if err != nil {
// Log the error and decide on a recovery strategy
sdkCtx.Logger().Error(fmt.Sprintf("Couldn't convert markets: %v", err))
return
}
@@ -1,19 +1,17 @@ | |||
module github.com/dydxprotocol/v4-chain/protocol | |||
|
|||
go 1.22 | |||
|
|||
toolchain go1.22.0 |
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.
Why does this get removed?
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.
I set slinky version to v1.0.8 and ran go mod tidy and it made this change
@Mergifyio backport release/protocol/v6.x |
✅ Backports have been created
|
(cherry picked from commit 697c276) # Conflicts: # protocol/app/upgrades/v6.0.0/upgrade.go
Co-authored-by: Chenyao Yu <[email protected]> Co-authored-by: Vincent Chau <[email protected]>
Changelist
[Describe or list the changes made in this PR]
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
New Features
chenyao/upgrade-slinky-to-1.0.8
branch in multiple workflows.Improvements
migratePricesToMarketMap
function to improve efficiency by directly invoking methods without unnecessary handler initialization.ConstructMarketMapFromParams
function for better performance by removing the API handler instantiation.Dependency Updates
go.mod
file to their latest versions, ensuring compatibility and access to new features and improvements.