Skip to content

Fix download settings reload#10993

Merged
pchila merged 4 commits intoelastic:mainfrom
pchila:fix-download-proxy-settings-reload
Nov 4, 2025
Merged

Fix download settings reload#10993
pchila merged 4 commits intoelastic:mainfrom
pchila:fix-download-proxy-settings-reload

Conversation

@pchila
Copy link
Copy Markdown
Member

@pchila pchila commented Nov 3, 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?
  • ...

@pchila pchila requested a review from a team as a code owner November 3, 2025 17:20
@pchila pchila requested review from blakerouse and swiatekm November 3, 2025 17:20
@mergify mergify bot assigned pchila Nov 3, 2025
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Nov 3, 2025

This pull request does not have a backport label. Could you fix it @pchila? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label that automatically backports to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@pchila pchila requested a review from ycombinator November 3, 2025 17:37
@pchila pchila added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team backport-active-all Automated backport with mergify to all the active branches labels Nov 3, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

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

ycombinator
ycombinator previously approved these changes Nov 3, 2025
Copy link
Copy Markdown
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

Good catch, thanks for the fix + additional logging.

@cmacknz
Copy link
Copy Markdown
Member

cmacknz commented Nov 3, 2025

Tracking adding an integration test to cover this in #4322 which is now marked as P0.

We can merge this without that to ensure the fix goes out in the upcoming patches and add the test separately.

@pchila
Copy link
Copy Markdown
Member Author

pchila commented Nov 3, 2025

Buildkite test this

@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Nov 4, 2025

💔 Build Failed

Failed CI Steps

History

cc @pchila

@pchila pchila merged commit fa2a03d into elastic:main Nov 4, 2025
21 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 4, 2025

@Mergifyio backport 8.19 9.1 9.2

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Nov 4, 2025

backport 8.19 9.1 9.2

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Nov 4, 2025
* 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 bot pushed a commit that referenced this pull request Nov 4, 2025
* 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 bot pushed a commit that referenced this pull request Nov 4, 2025
* log proxy URL and proxy disable settings

* refresh artifactDownloader when settings change

(cherry picked from commit fa2a03d)
@pchila pchila mentioned this pull request Nov 4, 2025
8 tasks
pchila added a commit that referenced this pull request Nov 4, 2025
* log proxy URL and proxy disable settings

* refresh artifactDownloader when settings change
pchila added a commit that referenced this pull request Nov 4, 2025
* log proxy URL and proxy disable settings

* refresh artifactDownloader when settings change
pchila added a commit that referenced this pull request Nov 4, 2025
* log proxy URL and proxy disable settings

* refresh artifactDownloader when settings change

Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
pchila added a commit that referenced this pull request Nov 4, 2025
* Fix download settings reload (#10993)

* 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

* Fix download settings reload (#10993)

* log proxy URL and proxy disable settings

* refresh artifactDownloader when settings change

---------

Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
pchila added a commit that referenced this pull request Nov 4, 2025
* log proxy URL and proxy disable settings

* refresh artifactDownloader when settings change

(cherry picked from commit fa2a03d)

Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
@pchila pchila added backport-8.18 Automated backport to the 8.18 branch backport-9.0 Automated backport to the 9.0 branch labels Nov 5, 2025
mergify bot pushed a commit that referenced this pull request Nov 5, 2025
* 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 bot pushed a commit that referenced this pull request Nov 5, 2025
* 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
pchila added a commit that referenced this pull request Nov 5, 2025
* log proxy URL and proxy disable settings

* refresh artifactDownloader when settings change
pchila added a commit that referenced this pull request Nov 5, 2025
* log proxy URL and proxy disable settings

* refresh artifactDownloader when settings change
hayotbisonai pushed a commit to hayotbisonai/elastic-agent that referenced this pull request Nov 23, 2025
* log proxy URL and proxy disable settings

* refresh artifactDownloader when settings change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.18 Automated backport to the 8.18 branch backport-9.0 Automated backport to the 9.0 branch backport-active-all Automated backport with mergify to all the active branches bug Something isn't working 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.

Custom download settings are not used by managed elastic-agent

5 participants