Require Flux 2.9 for the deprecated-API check#44
Merged
stefanprodan merged 1 commit intoJul 10, 2026
Merged
Conversation
stefanprodan
requested changes
Jul 10, 2026
| local version | ||
| version="$(flux version --client 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1)" | ||
| if [[ -z "$version" ]]; then | ||
| echo "ERROR - unable to determine the Flux CLI version" >&2 |
Member
There was a problem hiding this comment.
This is dead code! How can Opus be this bad at Bash? LOL
Fix to avoid an exit 1 with no message (due to set -o pipefail):
version="$(flux version --client 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)"
check-deprecated.sh runs 'flux migrate --dry-run', but older Flux CLIs lack the migrate subcommand. The error was swallowed by '|| true' and the version-arrow grep never matched, so the script printed "No deprecated Flux API versions found" and exited 0 — a false negative reporting the repo as clean when the check never ran. Add a minimum-version gate (Flux >= 2.9.0) to check_prerequisites so the script fails with an actionable message instead. Fixes fluxcd#42 Signed-off-by: Landry Zetam <[email protected]> Assisted-by: Claude Code/claude-opus-4-8
lyzetam
force-pushed
the
fix/check-deprecated-require-flux-min-version
branch
from
July 10, 2026 18:09
34509fc to
b37f10d
Compare
Contributor
Author
|
Good catch, thanks — you're right. Under |
Contributor
Author
|
@stefanprodan fix pushed and re-verified — ready for another look when you have a moment. Thanks for the catch! |
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.
Fixes #42.
Per @stefanprodan's suggestion on the issue, this adds a minimum Flux CLI version gate to
check-deprecated.shso the deprecated-API check fails loudly on older clients instead of reporting a false "clean".Problem
check-deprecated.shrunsflux migrate -f . --dry-run, but older Flux CLIs lack themigratesubcommand. The error is swallowed by|| trueand the version-arrow grep never matches, so the script printsNo deprecated Flux API versions foundand exits 0 — a false negative that reports the repo as clean when the check never ran.Change
check_prerequisites()now parses the client version (flux version --client) and requires Flux >= 2.9.0 (the release that providesflux migrate), failing with an actionable upgrade message otherwise. Version comparison is a small pure-bash numeric helper — nosort -V/GNU dependency — so it stays portable across operator environments.Testing
shellcheck skills/gitops-repo-audit/scripts/*.sh— cleanFlux CLI v2.5.1 is too old; 'flux migrate' requires Flux 2.9.0 or later(previously printed the false "No deprecated Flux API versions found")