Skip to content
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

[9.0](backport #6675) resolve proxy to inject using http package #6759

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 7, 2025

What does this PR do?

Agent is injecting proxy env variables into components configs if no proxy is already specified by the config. Unfortunately with this approach the NO_PROXY variable is lost, so the target URL has to be evaluated against the environment proxy to determine if the proxy should be used. Go http provides such functionality.

Why is it important?

The environment proxy may be defined with exclusion for Fleet and Output addresses.

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

Related issues


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

* resolve proxy to inject using http package

* unit tests

* golint

* golint

* changelog fragment

* changelog fragment

* move environment manipulation, trying to fix test run in CI

* fix unit test, localhost never goes through environment proxy

* use internal function to be able to unit test the behavior

* make lint happy

* fix build

* update NOTICE

(cherry picked from commit be179d8)
@mergify mergify bot requested a review from a team as a code owner February 7, 2025 15:39
@mergify mergify bot added the backport label Feb 7, 2025
@mergify mergify bot requested review from pkoutsovasilis and kaanyalti and removed request for a team February 7, 2025 15:39
@mergify mergify bot assigned intxgo Feb 7, 2025
@github-actions github-actions bot added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Feb 7, 2025
@elasticmachine
Copy link
Contributor

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

@intxgo intxgo enabled auto-merge (squash) February 7, 2025 15:56
@intxgo intxgo merged commit 8385934 into 9.0 Feb 7, 2025
16 checks passed
@intxgo intxgo deleted the mergify/bp/9.0/pr-6675 branch February 7, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 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