ci: warn when plugin metric field names are removed or renamed#18957
Open
yaseen-vm wants to merge 5 commits into
Open
ci: warn when plugin metric field names are removed or renamed#18957yaseen-vm wants to merge 5 commits into
yaseen-vm wants to merge 5 commits into
Conversation
This reverts commit ab48a5d.
Adds scripts/check-metric-names.sh and a GitHub Actions workflow that runs on every PR targeting master. When a plugin README's metric table loses a field name that was present on master, the check emits a ::warning annotation and explains the backward-compatibility impact, helping contributors acknowledge breaking changes before they merge. Closes influxdata#18955
Contributor
|
Thanks so much for the pull request! |
Author
|
!signed-cla |
Contributor
|
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
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.
Summary
Closes #18955
scripts/check-metric-names.sh— extracts backtick-quoted field names from plugin README metric tables and warns when any name present onmasterdisappears in the PR.github/workflows/metric-names.yml— runs the script on every PR targetingmaster, only when plugin READMEs are modified0(informational warning, not a hard block), consistent with the issue's request for a CI warningHow it works
Each plugin README documents its metrics in markdown tables like:
The script compares the set of backtick-quoted names in the first column between
origin/masterandHEAD. If any name is gone, a::warningannotation is emitted pointing contributors to:legacy_*include optionTest
Verified locally by temporarily renaming
n_cpus→n_cpus_RENAMEDinplugins/inputs/system/README.md(replicating the exact change from #18919 that triggered this issue). The check correctly identifiedn_cpusas removed and emitted the warning with guidance.Test plan
No plugin READMEs changed)::warningwhen a field name is removed from a metric tableplugins/**/README.mdfiles are modified🤖 Generated with Claude Code