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

Accept fleet.proxy_url policy options #2172

Merged
merged 4 commits into from
Jan 25, 2023

Conversation

michalpristas
Copy link
Contributor

@michalpristas michalpristas commented Jan 25, 2023

What does this PR do?

This PR reloads proxy settings and takes these settings into account when comparing clients.

Why is it important?

When proxy settings come as part of policy they are ignored because

  • we do not set them at all
  • they are not evaluated when comparing client.

First one is self explanatory. second one means that even though we change proxy for a fleet server host, it is not applied because we don't look at proxy settings when comparing clients. when clients are considered equal we do not reload them and keep using old one.

Checklist

  • 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

UT is difficult to add as this relies on pings of new fleet server. Suitable for new Integration test framework

Fixes: #1728

@michalpristas michalpristas added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Team:Elastic-Agent Label for the Agent team skip-changelog backport-v8.6.0 Automated backport with mergify labels Jan 25, 2023
@michalpristas michalpristas requested a review from a team as a code owner January 25, 2023 10:11
@michalpristas michalpristas self-assigned this Jan 25, 2023
@michalpristas michalpristas requested review from blakerouse and michel-laterman and removed request for a team January 25, 2023 10:11
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-01-25T10:12:10.512+0000

  • Duration: 17 min 16 sec

Test stats 🧪

Test Results
Failed 0
Passed 4849
Skipped 13
Total 4862

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages.

  • run integration tests : Run the Elastic Agent Integration tests.

  • run end-to-end tests : Generate the packages and run the E2E Tests.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Contributor

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 98.305% (58/59) 👍
Files 69.268% (142/205) 👍
Classes 69.231% (270/390) 👍
Methods 54.047% (828/1532) 👍
Lines 39.264% (9042/23029) 👎 -0.026
Conditionals 100.0% (0/0) 💚

Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

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

Looks good.

I do think we need to have unit tests to cover this method as its getting more complex.

@michalpristas michalpristas merged commit b19ec2a into elastic:main Jan 25, 2023
mergify bot pushed a commit that referenced this pull request Jan 25, 2023
Accept `fleet.proxy_url` policy options (#2172)

(cherry picked from commit b19ec2a)
michalpristas added a commit that referenced this pull request Jan 25, 2023
Accept `fleet.proxy_url` policy options (#2172)

(cherry picked from commit b19ec2a)

Co-authored-by: Michal Pristas <michal.pristas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.6.0 Automated backport with mergify bug Something isn't working skip-changelog Team:Elastic-Agent Label for the Agent team 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.

[Fleet] fleet.proxy_url change in the policy is not reloaded
3 participants