Skip to content

Refactor flags - Part 4#18095

Merged
rohit-nayak-ps merged 13 commits intovitessio:flags-refactorfrom
mounicasruthi:flags-refactor-4
Apr 13, 2025
Merged

Refactor flags - Part 4#18095
rohit-nayak-ps merged 13 commits intovitessio:flags-refactorfrom
mounicasruthi:flags-refactor-4

Conversation

@mounicasruthi
Copy link
Collaborator

Description

This PR is a part of an ongoing change to support the transition from underscores (_) to dashes (-) in flag naming conventions.

Flags Updated in This PR:
--azblob-backup-account-key-file
--azblob-backup-account-name
--azblob-backup-buffer-size
--azblob-backup-container-name
--azblob-backup-parallelism
--azblob-backup-storage-root
--backup-engine-implementation
--backup-storage-block-size
--backup-storage-compress
--backup-storage-implementation
--backup-storage-number-blocks
--builtinbackup-mysqld-timeout
--builtinbackup-progress
--gcs-backup-storage-bucket
--gcs-backup-storage-root
--heartbeat-enable
--heartbeat-interval
--init-db-name-override
--init-keyspace
--init-shard
--init-tablet-type
--init-tags
--mycnf-bin-log-path
--mycnf-data-dir
--mycnf-error-log-path
--mycnf-general-log-path
--mycnf-innodb-data-home-dir
--mycnf-innodb-log-group-home-dir
--mycnf-master-info-file
--mycnf-mysql-port
--mycnf-pid-file
--mycnf-relay-log-index-path
--mycnf-relay-log-info-path
--mycnf-relay-log-path
--mycnf-secure-file-priv
--mycnf-server-id
--mycnf-slow-log-path
--mycnf-socket-file
--mycnf-tmp-dir
--mysql-auth-server-impl
--mysql-port
--mysql-server-port
--mysql-socket
--s3-backup-aws-endpoint
--s3-backup-aws-min-partsize
--s3-backup-aws-region
--s3-backup-aws-retries
--s3-backup-force-path-style
--s3-backup-log-level
--s3-backup-server-side-encryption
--s3-backup-storage-bucket
--s3-backup-storage-root
--s3-backup-tls-skip-verify-cert
--srv-topo-cache-refresh
--srv-topo-cache-ttl
--srv-topo-timeout
--tablet-grpc-ca
--tablet-grpc-cert
--tablet-grpc-crl
--tablet-grpc-key
--tablet-grpc-server-name
--tablet-hostname
--tablet-protocol
--tablet-refresh-interval
--tablet-refresh-known-tablets
--tablet-types-to-wait
--tablet-uid
--tablet-url-template
--xtrabackup-backup-flags
--xtrabackup-prepare-flags
--xtrabackup-root-path
--xtrabackup-stream-mode
--xtrabackup-stripe-block-size
--xtrabackup-stripes
--xtrabackup-user
--consul-auth-static-file
--replication-connect-retry
--remote-operation-timeout
--initialize-with-random-data
--emit-stats
--pool-hostname-resolve-interval

Flag Count Before vs After:

Flags with _ Flags with -
Before 738 1342
After 465 1615

# of migrated flags: 273

Related Issue(s)

#17880

Checklist

  • "Backport to:" labels have been added if this change should be back-ported to release branches
  • If this change is to be back-ported to previous releases, a justification is included in the PR description
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on CI?
  • Documentation was added or is not required

@mounicasruthi mounicasruthi added Type: Enhancement Logical improvement (somewhere between a bug and feature) Component: General Changes throughout the code base labels Apr 2, 2025
@vitess-bot
Copy link
Contributor

vitess-bot bot commented Apr 2, 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 Apr 2, 2025
@github-actions github-actions bot added this to the v22.0.0 milestone Apr 2, 2025
@mounicasruthi mounicasruthi 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 Apr 2, 2025
@codecov
Copy link

codecov bot commented Apr 2, 2025

Codecov Report

Attention: Patch coverage is 69.06475% with 43 lines in your changes missing coverage. Please review.

Project coverage is 67.57%. Comparing base (7f16f70) to head (5bc2a91).
Report is 2 commits behind head on flags-refactor.

Files with missing lines Patch % Lines
go/cmd/vtgate/cli/cli.go 0.00% 6 Missing ⚠️
go/cmd/vtbackup/cli/vtbackup.go 0.00% 5 Missing ⚠️
go/cmd/vtcombo/cli/main.go 0.00% 5 Missing ⚠️
go/vt/discovery/healthcheck.go 0.00% 4 Missing ⚠️
go/cmd/mysqlctl/command/root.go 0.00% 3 Missing ⚠️
go/cmd/mysqlctld/cli/mysqlctld.go 0.00% 3 Missing ⚠️
go/vt/mysqlctl/mycnf_flag.go 85.00% 3 Missing ⚠️
go/vt/topo/consultopo/server.go 50.00% 2 Missing ⚠️
go/vt/utils/flags.go 50.00% 2 Missing ⚠️
go/vt/vtgate/plugin_mysql_server.go 0.00% 2 Missing ⚠️
... and 6 more
Additional details and impacted files
@@               Coverage Diff               @@
##           flags-refactor   #18095   +/-   ##
===============================================
  Coverage           67.56%   67.57%           
===============================================
  Files                1598     1598           
  Lines              259817   259847   +30     
===============================================
+ Hits               175557   175580   +23     
- Misses              84260    84267    +7     

☔ 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.

Signed-off-by: mounicasruthi <mounicasruthi30@gmail.com>
Signed-off-by: mounicasruthi <mounicasruthi30@gmail.com>
…der versions

Signed-off-by: mounicasruthi <mounicasruthi30@gmail.com>
…older versions

Signed-off-by: mounicasruthi <mounicasruthi30@gmail.com>
Signed-off-by: mounicasruthi <mounicasruthi30@gmail.com>
@mounicasruthi mounicasruthi force-pushed the flags-refactor-4 branch 2 times, most recently from 51fc2bb to f83dc43 Compare April 8, 2025 19:21
Signed-off-by: mounicasruthi <mounicasruthi30@gmail.com>
Signed-off-by: mounicasruthi <mounicasruthi30@gmail.com>
Signed-off-by: mounicasruthi <mounicasruthi30@gmail.com>
…est failure

Signed-off-by: mounicasruthi <mounicasruthi30@gmail.com>
@mounicasruthi mounicasruthi marked this pull request as ready for review April 9, 2025 16:24
… flag is treated as required

Signed-off-by: mounicasruthi <mounicasruthi30@gmail.com>
@mounicasruthi mounicasruthi marked this pull request as ready for review April 9, 2025 19:56
…Downgrade Test failure

Signed-off-by: mounicasruthi <mounicasruthi30@gmail.com>
Signed-off-by: mounicasruthi <mounicasruthi30@gmail.com>
Signed-off-by: mounicasruthi <mounicasruthi30@gmail.com>

Main.MarkFlagRequired("tablet_types_to_wait")
// Support both variants until v25
// Main.MarkFlagRequired("tablet-types-to-wait")
Copy link
Member

Choose a reason for hiding this comment

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

This is no longer required, right? Remove this comment in the next PR.

@rohit-nayak-ps rohit-nayak-ps merged commit 522cdb4 into vitessio:flags-refactor Apr 13, 2025
100 of 103 checks passed
@frouioui frouioui modified the milestones: v22.0.0, v23.0.0 Apr 24, 2025
mounicasruthi added a commit to mounicasruthi/vitess that referenced this pull request May 20, 2025
Signed-off-by: mounicasruthi <mounicasruthi30@gmail.com>
mounicasruthi added a commit to mounicasruthi/vitess that referenced this pull request May 20, 2025
Signed-off-by: mounicasruthi <mounicasruthi30@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: General Changes throughout the code base Type: Enhancement Logical improvement (somewhere between a bug and feature)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants