Skip to content

Added ReassignAgentToPolicy method to Kibana Fleet client#380

Merged
ycombinator merged 3 commits intoelastic:mainfrom
ycombinator:kib-fleet-policy-reassign
Dec 23, 2025
Merged

Added ReassignAgentToPolicy method to Kibana Fleet client#380
ycombinator merged 3 commits intoelastic:mainfrom
ycombinator:kib-fleet-policy-reassign

Conversation

@ycombinator
Copy link
Copy Markdown
Contributor

What does this PR do?

This PR adds a ReassignAgentToPolicy method to the Kibana Fleet client. This method calls the POST /agents/{agentID}/reassign Kibana Fleet API.

Why is it important?

To allow integration tests (or other Go code) to reassign an Agent to a different policy, e.g. the TestPolicyReassignWithTamperProtectedEndpoint integration test in elastic/elastic-agent#11740.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works

@ycombinator ycombinator requested a review from a team as a code owner December 22, 2025 07:07
@ycombinator ycombinator requested review from blakerouse, faec, michel-laterman and rdner and removed request for a team December 22, 2025 07:07
@ycombinator ycombinator added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Dec 22, 2025
@pierrehilbert pierrehilbert requested review from VihasMakwana and khushijain21 and removed request for faec and rdner December 22, 2025 07:55
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Dec 22, 2025
Copy link
Copy Markdown

@mlaterman mlaterman left a comment

Choose a reason for hiding this comment

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

lgtm, but I lack the ability to approve? not sure if this is expected (@pierrehilbert your not on PTO this weekend, can you check if this is expected?)

@pierrehilbert
Copy link
Copy Markdown
Contributor

lgtm, but I lack the ability to approve? not sure if this is expected (@pierrehilbert your not on PTO this weekend, can you check if this is expected?)

Looks like you used the wrong github account.

Copy link
Copy Markdown
Contributor

@michel-laterman michel-laterman left a comment

Choose a reason for hiding this comment

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

🤦

@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

@ycombinator ycombinator enabled auto-merge (squash) December 23, 2025 19:43
@michel-laterman michel-laterman removed the request for review from mlaterman December 23, 2025 19:52
@ycombinator ycombinator merged commit 6d2638a into elastic:main Dec 23, 2025
5 checks passed
@ycombinator ycombinator deleted the kib-fleet-policy-reassign branch January 5, 2026 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants