Skip to content

feat: add disable changelog flag and env var#8969

Merged
olblak merged 4 commits into
updatecli:mainfrom
omer-cengel:feat/disable-changelog
May 29, 2026
Merged

feat: add disable changelog flag and env var#8969
olblak merged 4 commits into
updatecli:mainfrom
omer-cengel:feat/disable-changelog

Conversation

@omer-cengel

Copy link
Copy Markdown
Contributor

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

  • Added shared --disable-changelog flag registration for supported commands
  • Added UPDATECLI_DISABLE_CHANGELOG environment variable support
  • Added DisableChangelog pipeline option
  • Skipped changelog collection in target execution when the option is enabled
  • Added tests for environment variable parsing, flag registration, and pipeline behavior

Test

To test this pull request, you can run the following commands:

go test ./cmd
go test ./pkg/core/pipeline

Additional Information

Checklist

  • I have updated the documentation via pull request in website repository.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 DisableChangelog pipeline option and used it to skip changelog collection in Pipeline.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.

Comment thread pkg/core/pipeline/targets.go
Comment thread cmd/flags_test.go
Comment thread cmd/flags.go Outdated

@olblak olblak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @omer-cengel for the pull request

@olblak olblak enabled auto-merge (squash) May 29, 2026 13:05
@olblak olblak added enhancement New feature or request core All things related to Updatecli core engine labels May 29, 2026
@omer-cengel

Copy link
Copy Markdown
Contributor Author

Hi @olblak !

It looks like the failing Go / Build (pull_request) check is unrelated to this change.

The failure appears to come from existing Gitea release tests timing out while calling the external Codeberg API:

context deadline exceeded
GET https://codeberg.org/api/v1/repos/updatecli/updatecli-action/releases?...

My changes only touch the --disable-changelog flag, env var handling, and related unit tests.

This looks like an external/flaky test issue, but I can investigate further if needed.

@olblak

olblak commented May 29, 2026

Copy link
Copy Markdown
Member

Yes this happens from time to time as we test on third API like gitea

@olblak olblak merged commit 1ac1f5e into updatecli:main May 29, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core All things related to Updatecli core engine enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: parameter to disable changelog recovery for Helm

3 participants