-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elastic-agent snapshot lookup will use proxy settings #27904
Elastic-agent snapshot lookup will use proxy settings #27904
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
Change the HTTP client from the standard library client to one built from the http settings supplied to the artifact downloader (`agent.download` in fleet.yml) so that proxy settings are used for the initial request to find the artifact location as well as the subsequent download.
7885f03
to
f8410a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks fairly simple and contained - this is great. Still, is there any benefit or simple place to add in a test for the new config? I guess that would entail possibly adding in more error handling to the code base too. Might be particularly needed if the values in the config are not formatted correctly or if the url exists but the artifact isn't found?
i've tested that the elastic-agent can now (correctly) download snapshot artifacts when behind a proxy. |
Pinging @elastic/agent (Team:Agent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@EricDavisX, my fix here is to apply an existing config option to another request when retrieving the snapshot artifacts. Config validation already has an issue made for tracking it (#26685), we can also ensure that url values are correct as part of that issue. |
Change the HTTP client from the standard library client to one built from the http settings supplied to the artifact downloader (`agent.download` in fleet.yml) so that proxy settings are used for the initial request to find the artifact location as well as the subsequent download. (cherry picked from commit 0ee910f)
Change the HTTP client from the standard library client to one built from the http settings supplied to the artifact downloader (`agent.download` in fleet.yml) so that proxy settings are used for the initial request to find the artifact location as well as the subsequent download. (cherry picked from commit 0ee910f)
Change the HTTP client from the standard library client to one built from the http settings supplied to the artifact downloader (`agent.download` in fleet.yml) so that proxy settings are used for the initial request to find the artifact location as well as the subsequent download. (cherry picked from commit 0ee910f)
Change the HTTP client from the standard library client to one built from the http settings supplied to the artifact downloader (`agent.download` in fleet.yml) so that proxy settings are used for the initial request to find the artifact location as well as the subsequent download. (cherry picked from commit 0ee910f) Co-authored-by: Michel Laterman <[email protected]>
Change the HTTP client from the standard library client to one built from the http settings supplied to the artifact downloader (`agent.download` in fleet.yml) so that proxy settings are used for the initial request to find the artifact location as well as the subsequent download. (cherry picked from commit 0ee910f) Co-authored-by: Michel Laterman <[email protected]>
…settings (#27926) * Elastic-agent snapshot lookup will use proxy settings (#27904) Change the HTTP client from the standard library client to one built from the http settings supplied to the artifact downloader (`agent.download` in fleet.yml) so that proxy settings are used for the initial request to find the artifact location as well as the subsequent download. (cherry picked from commit 0ee910f) * Fix CHANGELOG Co-authored-by: Michel Laterman <[email protected]> Co-authored-by: michel-laterman <[email protected]>
Change the HTTP client from the standard library client to one built from the http settings supplied to the artifact downloader (`agent.download` in fleet.yml) so that proxy settings are used for the initial request to find the artifact location as well as the subsequent download.
What does this PR do?
Change the HTTP client from the standard library client to one built
from the http settings supplied to the artifact downloader
(
agent.download
in fleet.yml) so that proxy settings are used for theinitial request to find the artifact location as well as the subsequent
download.
Why is it important?
Allows agent to upgrade to snapshot versions when agents are behind an Internet proxy.
Checklist
I have commented my code, particularly in hard-to-understand areasI have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
agent.download.proxy_url
setting tofleet.yml
.Related issues