Skip to content

[8.18](backport #5283) Remove extra search when preparing agent policies - #5303

Merged
michel-laterman merged 1 commit into
8.18from
mergify/bp/8.18/pr-5283
Aug 22, 2025
Merged

michel-laterman merged 1 commit into
8.18from
mergify/bp/8.18/pr-5283

Conversation

@mergify

@mergify mergify Bot commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

What is the problem this PR solves?

Preparing the agent policy makes an unneeded search.

How does this PR solve the problem?

Remove an extra search (for the agent) when preparing the agent's policy when a POLICY_CHANGE action is needed, use the agent retrieved when the API key is validated instead.

Design Checklist

  • I have ensured my design is stateless and will work when multiple fleet-server instances are behind a load balancer.
  • I have or intend to scale test my changes, ensuring it will work reliably with 100K+ agents connected.
  • I have included fail safe mechanisms to limit the load on fleet-server: rate limiting, circuit breakers, caching, load shedding, etc.

Checklist

  • 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
    This is an automatic backport of pull request Remove extra search when preparing agent policies #5283 done by Mergify.

@mergify mergify Bot added the backport label Aug 20, 2025
@mergify
mergify Bot requested a review from a team as a code owner August 20, 2025 21:42
@mergify
mergify Bot requested review from kaanyalti and michel-laterman August 20, 2025 21:42
@mergify mergify Bot mentioned this pull request Aug 20, 2025
4 tasks done
@prodsecmachine

prodsecmachine commented Aug 20, 2025 •

Copy link
Copy Markdown

🎉 Snyk checks have passed. No issues have been found so far.

✅ security/snyk check is complete. No issues have been found. (View Details)

✅ license/snyk check is complete. No issues have been found. (View Details)

@github-actions github-actions Bot added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Aug 20, 2025
@elastic-sonarqube

Copy link
Copy Markdown

@michel-laterman
michel-laterman merged commit de6a0c3 into 8.18 Aug 22, 2025
@michel-laterman
michel-laterman deleted the mergify/bp/8.18/pr-5283 branch August 22, 2025 17:11
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 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