Repository navigation
Conversation
…mber of days Infrahub 1.13 removes --days-to-keep and --batch-size from `infrahub tasks flush flow-runs`: the task manager deletes up to its own task history retention, and --rewrite returns the disk space (opsmill/infrahub#10869). The tool passed both options, and an unknown option is not the "no such command" that triggers its fallback, so `infrahub-taskmanager flush flow-runs` failed on 1.13. The tool now reads the command's help in the task worker. When it offers --rewrite and no --days-to-keep, the tool runs the command without days, warns when days_to_keep or batch_size were given, and passes the new --rewrite flag. Earlier releases keep the previous behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying infrahub-ops-cli with
|
| Latest commit: |
fda7673
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cd02ec60.infrahub-ops-cli.pages.dev |
| Branch Preview URL: | https://flow-runs-task-manager-reten.infrahub-ops-cli.pages.dev |
saltas888
added a commit
to opsmill/infrahub
that referenced
this pull request
Oct 13, 2026
T063 records opsmill/infrahub-backup#179, which makes the maintenance tool run `flush flow-runs` without a number of days on 1.13, and the report lists it in the next steps. The report's commit IDs follow the replayed stack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 of 5 tasks
saltas888
added a commit
to opsmill/infrahub
that referenced
this pull request
Oct 14, 2026
T063 records opsmill/infrahub-backup#179, which makes the maintenance tool run `flush flow-runs` without a number of days on 1.13, and the report lists it in the next steps. The report's commit IDs follow the replayed stack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
saltas888
added a commit
to opsmill/infrahub
that referenced
this pull request
Oct 27, 2026
T063 records opsmill/infrahub-backup#179, which makes the maintenance tool run `flush flow-runs` without a number of days on 1.13, and the report lists it in the next steps. The report's commit IDs follow the replayed stack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
saltas888
added a commit
to opsmill/infrahub
that referenced
this pull request
Oct 28, 2026
…upports the new flush flow-runs The tool passes --days-to-keep and --batch-size, which this change removes; opsmill/infrahub-backup#179 makes it use the task manager's retention. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
saltas888
added a commit
to opsmill/infrahub
that referenced
this pull request
Oct 28, 2026
…upports the new flush flow-runs The tool passes --days-to-keep and --batch-size, which this change removes; opsmill/infrahub-backup#179 makes it use the task manager's retention. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
saltas888
added a commit
to opsmill/infrahub
that referenced
this pull request
Oct 28, 2026
T063 records opsmill/infrahub-backup#179, which makes the maintenance tool run `flush flow-runs` without a number of days on 1.13, and the report lists it in the next steps. The report's commit IDs follow the replayed stack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
--days-to-keepand--batch-sizefrominfrahub tasks flush flow-runs(opsmill/infrahub#11289): the task manager deletes up to its own task history retention, and--rewritereturns the disk space.infrahub-taskmanager flush flow-runspasses both options. An unknown option is not the "no such command" error that starts the tool's script fallback, so on 1.13 the tool fails.infrahub tasks flush flow-runs --helpin the task worker and strips ANSI color formatting before checking the options. Forced-color help therefore uses the same detection as plain help.--rewriteand no--days-to-keep(1.13 and later), the tool runsinfrahub tasks flush flow-runs, with--rewritewhen the new--rewriteflag is given. It warns whendays_to_keeporbatch_sizewere given, because those releases ignore them, and names the setting to use instead:INFRAHUB_TASK_MANAGER_RETENTION_TASK_HISTORY.--rewriteis then ignored, with a warning.flush stale-runsis unchanged: its options stay in 1.13.Validation of colored-help detection
The new colored-help cases fail against the previous implementation and pass with ANSI normalization, alongside the existing detection, command and warning cases. These tests ran in an isolated Go package containing the affected production declarations and the repository's test file; gofmt passed. The full package suite could not run locally because dependency downloads were denied and the embedded watchdog binaries were absent.
Original branch validation
COLUMNS=100by the Infrahub 1.11.4 image and by a build of feat(backend): clean up old task history in the task manager and during the upgrade [INFP-507] infrahub#10869.go vet,gofmtand golangci-lint v2.5.0 (0 issues), in containers.flush flow-runs 7 --rewritewarned that the 7 days are ignored, then deleted 20,000 runs that ended 35 days ago and printed the per-table rewrite summary (21.4 MB before, 3.7 MB after);flush flow-runs --rewritewith no days gave no warning and deleted 5,000 runs;flush stale-runscompleted.ExecStream, which builds itskubectl execarguments, environment included, with the same function asExec, and returns an error when the command fails; the tool's script fallback already uses it.go test ./...also fails insrc/internal/updater(install_test.go:22: direct: got "container") when run inside a container, onmainas well; it is unrelated to this change.🤖 Generated with Claude Code
Summary by cubic
Fixes
infrahub-taskmanager flush flow-runson Infrahub 1.13, which removed--days-to-keepand--batch-sizefrominfrahub tasks flush flow-runs. The tool passes both options, and since an unknown option isn't the "no such command" error that triggers its script fallback, the command failed on 1.13.The tool now reads the command's help in the task worker to detect the Infrahub version. When 1.13 or later is detected, it runs the command without the removed flags, passes the new
--rewriteflag when requested, and warns whendays_to_keeporbatch_sizewere given that they are ignored, pointing toINFRAHUB_TASK_MANAGER_RETENTION_TASK_HISTORYinstead. Earlier releases keep the previous behavior, with--rewriteignored and a warning.Migration
days_to_keepandbatch_sizeare meaningless; setINFRAHUB_TASK_MANAGER_RETENTION_TASK_HISTORYinstead.Written for commit 0dd2c44. Summary will update on new commits.