-
Notifications
You must be signed in to change notification settings - Fork 6
fix(database): remove deprecated credentials file #1153
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
Conversation
Signed-off-by: Chris Gianelloni <[email protected]>
📝 WalkthroughWalkthroughThis pull request removes GCS credentials file functionality from the BlobStore plugin. The changes eliminate the Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
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.
No issues found across 7 files
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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
database/plugin/blob/gcs/database.go (1)
433-467: Documentation and code mismatch: README documentscredentials-fileoption but it's not implemented in the plugin.The
Start()method correctly uses Application Default Credentials (ADC) with no explicit credentials handling. However, the README documentscredentials-fileas an optional GCS configuration parameter, but this option is not defined in the plugin's command-line options (plugin.golines 46-54) and is not handled anywhere in the code. Either removecredentials-filefrom the README documentation, or implement support for loading credentials from an explicit file path via theoption.WithCredentials()client option. Users following the README will be unable to use the documentedcredentials-fileparameter.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (6)
database/plugin/blob/gcs/database.godatabase/plugin/blob/gcs/options.godatabase/plugin/blob/gcs/options_test.godatabase/plugin/blob/gcs/plugin.godatabase/plugin/blob/gcs/plugin_test.gogo.mod
💤 Files with no reviewable changes (3)
- database/plugin/blob/gcs/options.go
- database/plugin/blob/gcs/options_test.go
- database/plugin/blob/gcs/plugin_test.go
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-20T19:58:38.889Z
Learnt from: wolf31o2
Repo: blinklabs-io/dingo PR: 0
File: :0-0
Timestamp: 2025-11-20T19:58:38.889Z
Learning: In Go, test dependencies (such as github.com/stretchr/testify) are correctly marked as direct dependencies in go.mod, not as indirect dependencies, even when they are only used in test files. This is a standard practice in Go's module system.
Applied to files:
go.mod
🧬 Code graph analysis (1)
database/plugin/blob/gcs/database.go (1)
database/plugin/blob/gcs/logger.go (1)
GcsLogger(24-26)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: go-test (1.24.x, windows-latest)
- GitHub Check: go-test (1.25.x, windows-latest)
- GitHub Check: go-test (1.25.x, ubuntu-latest)
- GitHub Check: go-test (1.24.x, macos-latest)
- GitHub Check: go-test (1.25.x, macos-latest)
- GitHub Check: go-test (1.24.x, ubuntu-latest)
- GitHub Check: lint
- GitHub Check: docker (ubuntu-latest, amd64)
- GitHub Check: nilaway
- GitHub Check: Analyze (go)
🔇 Additional comments (4)
database/plugin/blob/gcs/database.go (1)
36-43: LGTM! Clean removal of credentials file field.The
BlobStoreGCSstruct has been simplified by removing thecredentialsFilefield. The remaining fields are well-organized and sufficient for the blob store operations.database/plugin/blob/gcs/plugin.go (2)
24-26: LGTM! Credentials option removed from CLI configuration.The
cmdlineOptionsstruct has been simplified to only include the bucket name. This is consistent with the removal of credentials file handling throughout the codebase.
59-73: LGTM! Plugin initialization simplified.
NewFromCmdlineOptions()now only passes the bucket configuration to the blob store. Authentication will be handled automatically through Application Default Credentials (ADC), which is the recommended approach for GCS client libraries.go.mod (1)
38-38: LGTM! Routine dependency updates supporting Google Cloud client libraries.The dependency bumps are routine version updates to google.golang.org/api v0.258.0, golang.org/x/oauth2 v0.34.0, google.golang.org/genproto/googleapis/rpc, and google.golang.org/protobuf v1.36.11. These updates maintain compatibility with the existing GCS plugin, which now uses Application Default Credentials when a credentials file is not explicitly provided.
Closes #1150
Summary by cubic
Removed deprecated GCS credentials file support from the blob store and now rely on Application Default Credentials (ADC). This cleans up options, flags, and tests, and simplifies client initialization.
Refactors
Migration
Written for commit 013d75b. Summary will update automatically on new commits.
Summary by CodeRabbit
Breaking Changes
Dependencies
✏️ Tip: You can customize this high-level summary in your review settings.