feat: add disable changelog flag and env var#8969
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a mechanism to disable target changelog retrieval during pipeline execution, exposed via a shared --disable-changelog CLI flag and the UPDATECLI_DISABLE_CHANGELOG environment variable, to reduce runtime and avoid unnecessary network calls.
Changes:
- Introduced
DisableChangelogpipeline option and used it to skip changelog collection inPipeline.RunTarget. - Added shared CLI flag registration for relevant commands, with env-var-backed defaults.
- Added unit tests covering env parsing, flag registration/precedence, and pipeline behavior when changelog is disabled.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/core/pipeline/targets.go | Skips changelog retrieval when Options.DisableChangelog is enabled. |
| pkg/core/pipeline/targets_test.go | Adds test ensuring changelog collection is skipped when disabled. |
| pkg/core/pipeline/options.go | Adds DisableChangelog to pipeline options. |
| cmd/root.go | Introduces global disableChangelog variable used by command flags. |
| cmd/pipeline_diff.go | Wires flag into pipeline diff and propagates option to engine/pipeline. |
| cmd/pipeline_apply.go | Wires flag into pipeline apply and propagates option to engine/pipeline. |
| cmd/diff.go | Wires flag into deprecated diff and propagates option. |
| cmd/apply.go | Wires flag into deprecated apply and propagates option. |
| cmd/compose_diff.go | Wires flag into compose diff and propagates option. |
| cmd/compose_apply.go | Wires flag into compose apply and propagates option. |
| cmd/flags.go | Adds shared addDisableChangelogFlag helper using env var default. |
| cmd/flags_test.go | Adds tests for flag registration, env defaults, and flag precedence. |
| cmd/env.go | Adds env var constant and getEnvBoolOrDefault helper. |
| cmd/env_test.go | Adds tests for boolean env var parsing behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
olblak
left a comment
There was a problem hiding this comment.
Thank you @omer-cengel for the pull request
|
Hi @olblak ! It looks like the failing The failure appears to come from existing Gitea release tests timing out while calling the external Codeberg API:
My changes only touch the This looks like an external/flaky test issue, but I can investigate further if needed. |
|
Yes this happens from time to time as we test on third API like gitea |
Fix #8953
Summary
Adds a --disable-changelog CLI option and UPDATECLI_DISABLE_CHANGELOG environment variable to disable changelog retrieval during pipeline execution.
When enabled, Updatecli skips target changelog collection, which can help reduce execution time and avoid unnecessary network requests.
What changed
Test
To test this pull request, you can run the following commands:
Additional Information
Checklist