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

Update all usages of fleettools to use the installed Agent ID #7054

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

blakerouse
Copy link
Contributor

@blakerouse blakerouse commented Feb 26, 2025

What does this PR do?

Updates all integration tests to use the installed Elastic Agent ID from the status output to check with Fleet for information about the specific Elastic Agent.

Why is it important?

This ensures that the tests in the integration framework are only communicating with Fleet about that specific Elastic Agent. This removes the need to filter based on hostname or doing any type of paging with the Kibana API to find that specific Elastic Agent. We know the Elastic Agent ID as the test installed it, it should always use that ID.

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 (all integration tests)
  • [ ] I have added an entry in ./changelog/fragments using the changelog tool (testing only)
  • I have added an integration test or an E2E test

Disruptive User Impact

None

How to test this PR locally

mage integration:test

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

@blakerouse blakerouse added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team skip-changelog backport-8.x Automated backport to the 8.x branch with mergify backport-8.18 Automated backport to the 8.18 branch backport-9.0 Automated backport to the 9.0 branch labels Feb 26, 2025
@blakerouse blakerouse self-assigned this Feb 26, 2025
@blakerouse blakerouse requested a review from a team as a code owner February 26, 2025 22:11
@elasticmachine
Copy link
Contributor

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

@jlind23
Copy link
Contributor

jlind23 commented Feb 27, 2025

There were cloud instability while creating deployment, restarting tests.

@blakerouse
Copy link
Contributor Author

buildkite test this

Copy link
Contributor

mergify bot commented Feb 28, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b integration-use-agent-id-with-fleet upstream/integration-use-agent-id-with-fleet
git merge upstream/main
git push upstream integration-use-agent-id-with-fleet

Copy link
Contributor

@pkoutsovasilis pkoutsovasilis left a comment

Choose a reason for hiding this comment

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

until we discuss with the team about what DRY is and when to try to perform it and what developers of integration tests should seek out and all of us collectively agree to a definition, I believe that this PR should not be merged

@blakerouse
Copy link
Contributor Author

until we discuss with the team about what DRY is and when to try to perform it and what developers of integration tests should seek out and all of us collectively agree to a definition, I believe that this PR should not be merged

Happy to discuss.

@blakerouse
Copy link
Contributor Author

I am working on cleaning this up more from @cmacknz comments to have the install functions return the agent ID, that way its clear what the Agent ID is from the installation with enrollment step. Placing back in draft while I do this.

@blakerouse blakerouse marked this pull request as draft March 6, 2025 19:09
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify backport-8.18 Automated backport to the 8.18 branch backport-9.0 Automated backport to the 9.0 branch skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
7 participants