Skip to content

ci: prevent renaming or reusing config proto tags - #5275

Draft
PranjalC100 wants to merge 2 commits into
masterfrom
feat-telemetry-proto-tag-guard
Draft

PranjalC100 wants to merge 2 commits into
masterfrom
feat-telemetry-proto-tag-guard

Conversation

@PranjalC100

@PranjalC100 PranjalC100 commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Description

Released GCSFuse versions keep sending config proto tags in the mount config payload, and the server decodes every version with master's config.proto. So a tag must keep its name and type on every branch. #5100 reused tag 130 for a renamed flag (metrics_use_new_names → metrics_enable_new_metrics_schema) and CI passed: the same PR regenerates cfg/config.proto, and format-test only checks that it matches params.yaml.

This adds two format-test steps that run buf breaking (buf v1.50.0, already used by go generate) on PRs:

  • Against the base branch: fails if a tag is renamed, changes type, is deleted without being reserved, or is removed from retired-params.
  • Against master, for PRs into v4+ release branches: fails if a tag on the release has a different name or type than on master, or isn't on master at all.

To rename a param, add its old tag to retired-params and give it a new tag. A flag cherry-picked from master to a release branch keeps its master tag. If that skips newer master tags, add them to retired-params on the release branch (noted in params.yaml and parser.go). The build and cve-patching skills now cover these errors after a rebase or cherry-pick and how to fix them.

Link to the issue in case of a bug fix.

b/573055940 (Prevent renaming flags to keep the same tag)

Testing details

  1. Manual - Ran both steps in a shallow clone, as in CI.
    • On master: a rename that keeps tag 164 fails; retiring 164 with new tag 165 passes.
    • On v4.0_release, against a master with 21 newer flags: cherry-picking flag 185 with 164–184 in retired-params passes; renumbering it to 164 fails; un-retiring a skipped tag later fails.
    • Codegen leaves no diff, and the cfg and config-gen tests pass.
  2. Unit tests - NA
  3. Integration tests - NA

Any backward incompatible change? If so, please explain.

No. Renaming or retyping a param now needs a new tag.

Released GCSFuse versions keep sending config proto tags in the mount
config payload, so a tag must keep its name and type. #5100 reused tag
130 for a renamed flag and CI passed: the same PR regenerates
cfg/config.proto, and format-test only checks that it matches
params.yaml.

format-test now runs buf breaking (buf v1.50.0, already used by
go generate) on PRs to compare the regenerated cfg/config.proto with the
base branch's copy. It fails if a tag is renamed, changes type, is
deleted without being reserved, or is removed from the reserved list. To
rename a param, add its old tag to retired-params and give it a new tag.

Fixes b/573055940
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.13%. Comparing base (dd019ff) to head (04092b4).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5275      +/-   ##
==========================================
- Coverage   85.13%   85.13%   -0.01%     
==========================================
  Files         181      181              
  Lines       19875    19875              
==========================================
- Hits        16921    16920       -1     
- Misses       2953     2954       +1     
  Partials        1        1              
Flag Coverage Δ
unittests 85.13% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.
The server decodes every GCSFuse version with master's config.proto, so
PRs into v4+ release branches now also compare the regenerated
cfg/config.proto with master's: every tag must have master's name and
type, or be reserved on master.

Document that a flag cherry-picked from master to a release branch keeps
its master proto-tag, and that any newer master tags it skips go into
retired-params on the release branch. The build and cve-patching skills
now cover the config-gen errors seen after a rebase or cherry-pick and
how to fix them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant