-
Notifications
You must be signed in to change notification settings - Fork 624
fix: blob uploader #1679
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
base: develop
Are you sure you want to change the base?
fix: blob uploader #1679
Conversation
WalkthroughThe changes update the version string from "v4.5.23" to "v4.5.24", modify the S3 uploader to append the AWS region option only if explicitly set, temporarily disable a codec version consistency check in the blob uploader, reduce the blob upload interval from 2 seconds to 1 second, and add explicit filtering by batch index, batch hash, platform, and soft deletion status in the blob upload ORM update method. No public entity signatures are altered. Changes
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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)
Other keywords and placeholders
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: 0
🧹 Nitpick comments (1)
rollup/internal/controller/blob_uploader/s3_sender.go (1)
21-23
:region
field appears unused – consider pruning
S3Uploader.region
is set inNewS3Uploader
but never referenced in this file. If it isn’t used elsewhere, drop the field to avoid dead state and keep the struct minimal.- region string
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
common/version/version.go
(1 hunks)rollup/internal/controller/blob_uploader/s3_sender.go
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (9)
- GitHub Check: bridgehistoryapi-fetcher
- GitHub Check: coordinator-api
- GitHub Check: bridgehistoryapi-api
- GitHub Check: coordinator-cron
- GitHub Check: rollup-db-cli
- GitHub Check: bridgehistoryapi-db-cli
- GitHub Check: blob_uploader
- GitHub Check: rollup_relayer
- GitHub Check: gas_oracle
🔇 Additional comments (2)
rollup/internal/controller/blob_uploader/s3_sender.go (1)
39-41
: Preventing empty-string region override is the right fixPassing
WithRegion("")
silently wipes out the SDK’s normal region-resolution chain and causes runtime errors.
Conditionally appending only whencfg.Region
is non-empty removes that foot-gun without altering behaviour when a region is explicitly configured. ✅common/version/version.go (1)
8-8
: Version bump acknowledgedTag update to
v4.5.24
is straightforward. Make sure accompanying release notes reflect the S3 uploader fix.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1679 +/- ##
===========================================
- Coverage 40.16% 40.15% -0.02%
===========================================
Files 232 232
Lines 18448 18454 +6
===========================================
Hits 7410 7410
- Misses 10315 10321 +6
Partials 723 723
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
🧹 Nitpick comments (1)
rollup/cmd/blob_uploader/app/app.go (1)
73-73
: Hard-coded 1 s polling interval – consider making this configurableMoving from 2 s to 1 s doubles DB queries and S3 PUT attempts.
If traffic patterns change, you’ll need a code change & redeploy just to tune throughput. Reading the interval fromcfg.L2Config.BlobUploaderConfig
(with a sensible default) would give you the same benefit while keeping ops knobs in config.- go utils.Loop(subCtx, 1*time.Second, blobUploader.UploadBlobToS3) + interval := cfg.L2Config.BlobUploaderConfig.Tick // e.g. time.Duration field + go utils.Loop(subCtx, interval, blobUploader.UploadBlobToS3)Also verify that
UploadBlobToS3
is re-entrant or self-serialising; at a 1 s cadence it may be invoked again while a previous call is still in flight.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
rollup/cmd/blob_uploader/app/app.go
(1 hunks)rollup/internal/controller/blob_uploader/blob_uploader.go
(2 hunks)rollup/internal/orm/blob_upload.go
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- rollup/internal/controller/blob_uploader/blob_uploader.go
🧰 Additional context used
🧬 Code Graph Analysis (1)
rollup/cmd/blob_uploader/app/app.go (1)
common/utils/utils.go (1)
Loop
(48-59)
⏰ Context from checks skipped due to timeout of 90000ms (12)
- GitHub Check: bridgehistoryapi-fetcher
- GitHub Check: coordinator-api
- GitHub Check: blob_uploader
- GitHub Check: bridgehistoryapi-db-cli
- GitHub Check: bridgehistoryapi-api
- GitHub Check: rollup_relayer
- GitHub Check: rollup-db-cli
- GitHub Check: gas_oracle
- GitHub Check: coordinator-cron
- GitHub Check: tests
- GitHub Check: check
- GitHub Check: tests
🔇 Additional comments (1)
rollup/internal/orm/blob_upload.go (1)
118-119
: 👍 Scoped update looks correctAdding the explicit
Where
(incl.deleted_at IS NULL
) prevents updating soft-deleted rows and guards against accidental cross-platform collisions. Good improvement. Note that GORM already injectsdeleted_at IS NULL
for soft-delete models, so the extra predicate is harmless but redundant.
Purpose or design rationale of this PR
Describe your change. Make sure to answer these three questions: What does this PR do? Why does it do it? How does it do it?
PR title
Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:
Deployment tag versioning
Has
tag
incommon/version.go
been updated or have you addedbump-version
label to this PR?Breaking change label
Does this PR have the
breaking-change
label?Summary by CodeRabbit
Chores
Bug Fixes