Allow the use of db credentials when verifying unmanaged tablets conf…#190
Merged
mhamza15 merged 3 commits intorelease-21.0-githubfrom Sep 9, 2025
Merged
Allow the use of db credentials when verifying unmanaged tablets conf…#190mhamza15 merged 3 commits intorelease-21.0-githubfrom
mhamza15 merged 3 commits intorelease-21.0-githubfrom
Conversation
…ig (vitessio#17984) Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for using database credentials from the credentials file when verifying unmanaged tablet configurations. Previously, unmanaged tablets required explicit password specification, but now they can fall back to using credentials from the configured credentials server.
- Enhances unmanaged tablet configuration verification to check credentials server when password is not explicitly provided
- Adds test helper function to allow setting credentials file path for testing purposes
- Includes test coverage for the new credential fallback functionality
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| go/vt/vttablet/tabletserver/tabletenv/config.go | Modified verification logic to attempt credential lookup before failing |
| go/vt/dbconfigs/credentials.go | Added test helper function for setting credentials file path |
| go/vt/vttablet/tabletserver/tabletenv/config_test.go | Added test case for credential fallback functionality |
| go/vt/vttablet/tabletserver/tabletenv/data/db_credentials.json | Added test credentials file for unit testing |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| // This should be used only for testing. | ||
| func SetDbCredentialsFilePath(path string) { | ||
| dbCredentialsFile = path | ||
| } |
There was a problem hiding this comment.
The function comment should specify what the dbCredentialsFile variable represents and mention that this modifies global state, which could affect other tests running concurrently.
Signed-off-by: Mohamed Hamza <mhamza15@github.com>
Signed-off-by: Mohamed Hamza <mhamza15@github.com>
This was referenced Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ig (vitessio#17984)
This is a backport of vitessio#17984
Description
Related Issue(s)
Checklist
Deployment Notes