Skip to content

Conversation

@frouioui
Copy link
Member

Description

In planetscale/vitess-operator#671 we are starting to use the --unmanaged vttablet flag introduced in #14871. CI is showing an interesting failure where vttablet expects a password and user to be set via flags. The operator does set the user (code); but the password is instead stored in a K8S Secret object, and is passed down to vttablet via the --db-credentials-file flag.

However, with the current implementation, vttablet does not take into account the password stored in --db-credentials-file when verifying the unmanaged tablet settings and fail early since we have not set the --db_app_password flag.

This PR fixes this issue by making vttablet look at the credentials file before failing the unmanaged verification.

@vitess-bot
Copy link
Contributor

vitess-bot bot commented Mar 18, 2025

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has a descriptive title.
  • Ensure there is a link to an issue (except for internal cleanup and flaky test fixes), new features should have an RFC that documents use cases and test cases.

Tests

  • Bug fixes should have at least one unit or end-to-end test, enhancement and new features should have a sufficient number of tests.

Documentation

  • Apply the release notes (needs details) label if users need to know about this change.
  • New features should be documented.
  • There should be some code comments as to why things are implemented the way they are.
  • There should be a comment at the top of each new or modified test to explain what the test does.

New flags

  • Is this flag really necessary?
  • Flag names must be clear and intuitive, use dashes (-), and have a clear help text.

If a workflow is added or modified:

  • Each item in Jobs should be named in order to mark it as required.
  • If the workflow needs to be marked as required, the maintainer team must be notified.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • RPC changes should be compatible with vitess-operator
  • If a flag is removed, then it should also be removed from vitess-operator and arewefastyet, if used there.
  • vtctl command output order should be stable and awk-able.

@vitess-bot vitess-bot bot added NeedsBackportReason If backport labels have been applied to a PR, a justification is required NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsIssue A linked issue is missing for this Pull Request NeedsWebsiteDocsUpdate What it says labels Mar 18, 2025
@frouioui frouioui changed the title Allow the use of db credentials when verifying unmanaged tablets cfg Allow the use of db credentials when verifying unmanaged tablets config Mar 18, 2025
@github-actions github-actions bot added this to the v22.0.0 milestone Mar 18, 2025
@frouioui frouioui added Release Blocker: release-22.0 This item blocks the release on branch release-22.0 Type: Bug Component: VTTablet and removed NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsWebsiteDocsUpdate What it says NeedsIssue A linked issue is missing for this Pull Request NeedsBackportReason If backport labels have been applied to a PR, a justification is required labels Mar 18, 2025
@codecov
Copy link

codecov bot commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.58%. Comparing base (7e24b08) to head (26ce556).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17984      +/-   ##
==========================================
- Coverage   67.59%   67.58%   -0.01%     
==========================================
  Files        1598     1598              
  Lines      259983   260050      +67     
==========================================
+ Hits       175727   175754      +27     
- Misses      84256    84296      +40     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GuptaManan100 GuptaManan100 merged commit 56806bd into vitessio:main Mar 19, 2025
111 of 116 checks passed
@GuptaManan100 GuptaManan100 deleted the allow-credentials-file-for-managed-tablets branch March 19, 2025 08:02
@frouioui frouioui mentioned this pull request Mar 18, 2025
72 tasks
mhamza15 pushed a commit to github/vitess-gh that referenced this pull request Aug 22, 2025
mhamza15 pushed a commit to github/vitess-gh that referenced this pull request Aug 22, 2025
mhamza15 added a commit to github/vitess-gh that referenced this pull request Aug 22, 2025
mhamza15 added a commit to github/vitess-gh that referenced this pull request Sep 9, 2025
…ig (vitessio#17984) (#190)

Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Mohamed Hamza <[email protected]>
Co-authored-by: Florent Poinsard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: VTTablet Release Blocker: release-22.0 This item blocks the release on branch release-22.0 Type: Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants