Skip to content

Conversation

yiweichi
Copy link
Member

@yiweichi yiweichi commented Aug 1, 2025

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:

  • build: Changes that affect the build system or external dependencies (example scopes: yarn, eslint, typescript)
  • ci: Changes to our CI configuration files and scripts (example scopes: vercel, github, cypress)
  • docs: Documentation-only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that doesn't fix a bug, or add a feature, or improves performance
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • test: Adding missing tests or correcting existing tests

Deployment tag versioning

Has tag in common/version.go been updated or have you added bump-version label to this PR?

  • No, this PR doesn't involve a new deployment, git tag, docker image tag
  • Yes

Breaking change label

Does this PR have the breaking-change label?

  • No, this PR is not a breaking change
  • Yes

Summary by CodeRabbit

  • New Features

    • Added support for configuring an AWS S3 endpoint for data fetching; S3 will be used when an endpoint is provided.
  • Chores

    • Bumped release version to v4.5.41.

Copy link

coderabbitai bot commented Aug 1, 2025

Walkthrough

Added AwsS3Endpoint to FetcherConfig; NewL1MessageFetcher now conditionally registers an AWS S3 blob client when that endpoint is non-empty; version tag bumped from v4.5.40 to v4.5.41.

Changes

Cohort / File(s) Change Summary
Config Struct Update
bridge-history-api/internal/config/config.go
Added AwsS3Endpoint string field to the FetcherConfig struct.
Fetcher Controller Logic
bridge-history-api/internal/controller/fetcher/l1_fetcher.go
Modified NewL1MessageFetcher to add an AWS S3 blob client to the blob client collection when AwsS3Endpoint is non-empty (added before other conditional clients).
Version Tag Update
common/version/version.go
Bumped version tag from "v4.5.40" to "v4.5.41".

Sequence Diagram(s)

sequenceDiagram
    participant Config
    participant L1Fetcher
    participant BlobClients
    participant AwsS3

    Config->>L1Fetcher: Provide FetcherConfig (includes AwsS3Endpoint)
    L1Fetcher->>BlobClients: Initialize base blob clients
    alt AwsS3Endpoint != ""
        L1Fetcher->>AwsS3: Create AWS S3 blob client
        AwsS3-->>BlobClients: Add AWS S3 client to collection
    end
    L1Fetcher-->>BlobClients: Add other conditional blob clients (BeaconNode, BlobScan, BlockNative)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • bump to v4.5.31 #1700 — also updates the version tag in common/version/version.go, affecting the computed Version string.

Poem

I sniffed a new endpoint beneath the log,
I hopped to the fetcher and danced on the fog.
A tiny client joins, the tag takes a leap,
Quiet code changes for the harvest we reap. 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1e618ad and 2f68d4c.

📒 Files selected for processing (1)
  • common/version/version.go (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • common/version/version.go
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bridge-history-add-s3-client

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.

❤️ 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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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.

CodeRabbit Configuration 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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@yiweichi yiweichi requested a review from colinlyguo August 1, 2025 19:18
@yiweichi yiweichi added the bump-version Bump the version tag for deployment label Aug 1, 2025
Copy link

@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

🧹 Nitpick comments (2)
common/version/version.go (1)

8-8: Incremented tag looks fine – remember to update release artifacts/changelog.

The version bump itself is correct; just ensure accompanying release notes and deployment manifests get the same tag so CI/CD picks it up.

bridge-history-api/internal/config/config.go (1)

41-42: Field name casing is inconsistent with existing acronym rules.

Previous acronym-based fields keep the acronym fully-capitalised (ETHGatewayAddr, BeaconNodeAPIEndpoint). For consistency the new field should probably be AWSS3Endpoint (JSON tag "AWSS3Endpoint"). Keeping it mixed-case (Aws) will work technically, but introduces naming drift in code, JSON, environment-variable overrides and documentation.

If you decide to align casing, the diff would be:

-	AwsS3Endpoint          string `json:"AwsS3Endpoint"`
+	AWSS3Endpoint          string `json:"AWSS3Endpoint"`
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d21fa36 and 1b1e8b1.

📒 Files selected for processing (3)
  • bridge-history-api/internal/config/config.go (1 hunks)
  • bridge-history-api/internal/controller/fetcher/l1_fetcher.go (1 hunks)
  • common/version/version.go (1 hunks)
🔇 Additional comments (1)
bridge-history-api/internal/controller/fetcher/l1_fetcher.go (1)

42-44: Verify AWS S3 client instantiation and configuration

  • In bridge-history-api/internal/controller/fetcher/l1_fetcher.go (lines 42–44), wrap the S3 client constructor in error handling, matching the Beacon-Node pattern:

    -	if cfg.AwsS3Endpoint != "" {
    -		blobClient.AddBlobClient(blob_client.NewAwsS3Client(cfg.AwsS3Endpoint))
    -	}
    +	if cfg.AwsS3Endpoint != "" {
    +		s3Client, err := blob_client.NewAwsS3Client(cfg.AwsS3Endpoint)
    +		if err != nil {
    +			log.Warn("failed to create AwsS3Client", "err", err)
    +		} else {
    +			blobClient.AddBlobClient(s3Client)
    +		}
    +	}
  • Confirm that blob_client.NewAwsS3Client returns (Client, error) and adjust the call site accordingly.

  • Ensure AwsS3Endpoint in FetcherConfig suffices for S3 usage—if not, extend the config with fields for region, bucket name, or credential sources (or document reliance on environment/IAM roles).

colinlyguo
colinlyguo previously approved these changes Aug 1, 2025
@yiweichi yiweichi requested a review from georgehao August 5, 2025 06:28
georgehao
georgehao previously approved these changes Aug 12, 2025
@yiweichi yiweichi requested a review from colinlyguo August 12, 2025 04:14
@yiweichi yiweichi requested a review from georgehao August 12, 2025 06:57
@yiweichi yiweichi merged commit 1f2b397 into develop Aug 12, 2025
1 check passed
@yiweichi yiweichi deleted the bridge-history-add-s3-client branch August 12, 2025 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bump-version Bump the version tag for deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants