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

[flakiness]: List agents by hostname and policy id #7012

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

pkoutsovasilis
Copy link
Contributor

@pkoutsovasilis pkoutsovasilis commented Feb 25, 2025

What does this PR do?

This PR re-works how we extract an Agent status from the fleet api and fixes the current issue we have we paginated results.

Why is it important?

It fixes frequent flaky issues that make our CI red

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

Disruptive User Impact

N/A

How to test this PR locally

Related issues

Copy link
Contributor

mergify bot commented Feb 25, 2025

This pull request does not have a backport label. Could you fix it @pkoutsovasilis? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label that automatically backports to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@pkoutsovasilis pkoutsovasilis force-pushed the fix/get_agent_status_by_id branch from 8a00d06 to 568029e Compare February 26, 2025 13:25
@pkoutsovasilis pkoutsovasilis force-pushed the fix/get_agent_status_by_id branch 4 times, most recently from 4d74041 to 249838e Compare February 26, 2025 16:12
@blakerouse
Copy link
Contributor

buildkite test this

@pkoutsovasilis pkoutsovasilis changed the title [wip]: Get agent status by id [integration tests]: List agents by hostname and policy id Feb 26, 2025
@pkoutsovasilis pkoutsovasilis force-pushed the fix/get_agent_status_by_id branch from 249838e to 6821a6c Compare February 26, 2025 21:28
@pkoutsovasilis
Copy link
Contributor Author

buildkite test this

@pkoutsovasilis pkoutsovasilis force-pushed the fix/get_agent_status_by_id branch from 6821a6c to f3090a2 Compare February 27, 2025 20:02
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@pkoutsovasilis pkoutsovasilis added the backport-active-all Automated backport with mergify to all the active branches label Feb 27, 2025
@pkoutsovasilis pkoutsovasilis marked this pull request as ready for review February 27, 2025 21:11
@pkoutsovasilis pkoutsovasilis requested a review from a team as a code owner February 27, 2025 21:11
@pkoutsovasilis
Copy link
Contributor Author

pkoutsovasilis commented Feb 27, 2025

@blakerouse this one addresses the list agents flakiness with a smaller blast radius (no dilemma of whether to retry or not that I introduced 😆 in this PR). The latter is where we wanna go 100% but wdyt of merging this one first to make the CI happy and then work on the other one with some peace of mind?

@pkoutsovasilis pkoutsovasilis added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Feb 27, 2025
@elasticmachine
Copy link
Contributor

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

@pkoutsovasilis pkoutsovasilis changed the title [integration tests]: List agents by hostname and policy id [flakiness]: List agents by hostname and policy id Feb 27, 2025
@pkoutsovasilis pkoutsovasilis added the flaky-test Unstable or unreliable test cases. label Feb 27, 2025
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

History

cc @pkoutsovasilis

Copy link
Member

@pchila pchila left a comment

Choose a reason for hiding this comment

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

LGTM
This is a good first iteration for fixing test flakiness before switching to using agentId for querying Fleet about agent status

Copy link
Contributor

@swiatekm swiatekm left a comment

Choose a reason for hiding this comment

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

LGTM

@pazone
Copy link
Contributor

pazone commented Feb 28, 2025

This PR improves tests stability. Let's merge it now

@pazone pazone merged commit 68aa6d1 into elastic:main Feb 28, 2025
17 checks passed
mergify bot pushed a commit that referenced this pull request Feb 28, 2025
mergify bot pushed a commit that referenced this pull request Feb 28, 2025
mergify bot pushed a commit that referenced this pull request Feb 28, 2025
mergify bot pushed a commit that referenced this pull request Feb 28, 2025
mergify bot pushed a commit that referenced this pull request Feb 28, 2025
blakerouse pushed a commit that referenced this pull request Feb 28, 2025
(cherry picked from commit 68aa6d1)

Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
blakerouse pushed a commit that referenced this pull request Feb 28, 2025
(cherry picked from commit 68aa6d1)

Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
blakerouse pushed a commit that referenced this pull request Feb 28, 2025
(cherry picked from commit 68aa6d1)

Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
pkoutsovasilis added a commit that referenced this pull request Mar 1, 2025
(cherry picked from commit 68aa6d1)

Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
pazone added a commit that referenced this pull request Mar 3, 2025
(cherry picked from commit 68aa6d1)

Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
Co-authored-by: Pavel Zorin <pavel.zorin@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-active-all Automated backport with mergify to all the active branches flaky-test Unstable or unreliable test cases. skip-changelog 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.

6 participants