Skip to content

[9.1] (backport #10993) Fix download settings reload#11014

Merged
pchila merged 2 commits into9.1from
mergify/bp/9.1/pr-10993
Nov 4, 2025
Merged

[9.1] (backport #10993) Fix download settings reload#11014
pchila merged 2 commits into9.1from
mergify/bp/9.1/pr-10993

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Nov 4, 2025

What does this PR do?

This PR fixes reloading artifact download settings using an artifactDownloader introduced with PR #9122
Without this fix artifactDownloader will use a snapshot of the settings as they are when Upgrader is created, although Upgrader itself updates its settings in the Reload() method.

This PR will re-instantiate artifactDownloader in Reload() with the updated settings containing Proxy URL and other download settings.

Why is it important?

Restore settings reload for downloading upgrade packages to allow setting Proxy URL, custom binary download location etc.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

How to test this PR locally

Follow the steps described in #10994

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

This is an automatic backport of pull request #10993 done by [Mergify](https://mergify.com).

* log proxy URL and proxy disable settings

* refresh artifactDownloader when settings change

(cherry picked from commit fa2a03d)

# Conflicts:
#	internal/pkg/agent/application/upgrade/upgrade.go
@mergify mergify bot requested a review from a team as a code owner November 4, 2025 09:09
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Nov 4, 2025
@mergify mergify bot requested review from blakerouse and ycombinator and removed request for a team November 4, 2025 09:09
@mergify mergify bot added conflicts There is a conflict in the backported pull request backport labels Nov 4, 2025
@mergify mergify bot assigned pchila Nov 4, 2025
@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Nov 4, 2025

Cherry-pick of fa2a03d has failed:

On branch mergify/bp/9.1/pr-10993
Your branch is up to date with 'origin/9.1'.

You are currently cherry-picking commit fa2a03d3e.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   changelog/fragments/1762196103-recreate-artifactdownloader-with-updated-settings.yaml
	modified:   internal/pkg/agent/application/upgrade/step_download.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   internal/pkg/agent/application/upgrade/upgrade.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot mentioned this pull request Nov 4, 2025
8 tasks
@github-actions github-actions bot added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Nov 4, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

* log proxy URL and proxy disable settings

* refresh artifactDownloader when settings change
@pchila pchila enabled auto-merge (squash) November 4, 2025 09:40
@pchila pchila merged commit 0e1da33 into 9.1 Nov 4, 2025
21 checks passed
@pchila pchila deleted the mergify/bp/9.1/pr-10993 branch November 4, 2025 11:26
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @pchila

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport bug Something isn't working conflicts There is a conflict in the backported pull request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants