Skip to content

Conversation

@mhamza15
Copy link

…ig (vitessio#17984)

This is a backport of vitessio#17984

Description

Related Issue(s)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

@mhamza15 mhamza15 self-assigned this Aug 22, 2025
Copilot AI review requested due to automatic review settings August 22, 2025 14:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
}
Copy link

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function comment should specify what the dbCredentialsFile variable represents and mention that this modifies global state, which could affect other tests running concurrently.

Copilot uses AI. Check for mistakes.
@mhamza15 mhamza15 merged commit 2ab9ddd into release-21.0-github Sep 9, 2025
189 of 192 checks passed
@mhamza15 mhamza15 deleted the mhamza/backport-17984-v21 branch September 9, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants