Skip to content

[CI] Integration tests regrouping #6349

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

Merged
merged 16 commits into from
Feb 13, 2025
Merged

[CI] Integration tests regrouping #6349

merged 16 commits into from
Feb 13, 2025

Conversation

pazone
Copy link
Contributor

@pazone pazone commented Dec 17, 2024

What does this PR do?

Extracts 3 new test groups that are executed separately:

  • standalone-upgrade
  • fleet-endpoint-security
  • install-uninstall (our favorite)

Now the longest running group is fleet-endpoint-security (42 minutes)

The TestRepeatedInstallUninstall on PRs will have 50 iterations instead of 100. For the main and release branches the iterations number will stay 100.

Why is it important?

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
  • I have added an integration test or an E2E test

Disruptive User Impact

How to test this PR locally

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?
  • ...

@pazone pazone marked this pull request as ready for review December 17, 2024 22:02
@pazone pazone requested review from a team as code owners December 17, 2024 22:02
@pazone pazone requested review from swiatekm and pchila December 17, 2024 22:02
@pazone pazone marked this pull request as draft December 17, 2024 22:31
@pazone pazone changed the title [CI] TestRepeatedInstallUninstallFleet optimisation [CI] Integration tests regrouping Dec 17, 2024
@pazone pazone added backport-8.x Automated backport to the 8.x branch with mergify backport-8.16 Automated backport with mergify backport-8.17 Automated backport with mergify and removed backport-skip labels Dec 18, 2024
@pazone pazone marked this pull request as ready for review December 18, 2024 10:31
Comment on lines +502 to +504
if os.Getenv("BUILDKITE_PULL_REQUEST") != "" {
return 50
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This deserves a comment in my opinion.

@@ -40,8 +40,11 @@ steps:
matrix:
- default
- fleet
- fleet-endpoint-security
Copy link
Contributor

Choose a reason for hiding this comment

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

The ordering in these matrix lists looks arbitrary. Is there a reason for the ordering, or should we have them sorted alphabetically?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Honestly, there are no ordering rules. Just placed fleet groups together

Copy link
Contributor

Choose a reason for hiding this comment

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

Are you going to sort them? If the order doesn't matter, I think it'd be a better user experience when engineers are scrolling through the results of a BK job to have them alphabetical. Plus it would make these lists more easily maintainable (until we figure out making the groups/matrix dynamic).

@blakerouse
Copy link
Contributor

This seems to be better and no longer getting the weird enrollment race conditions that used to be present. The change I made was just an improvement to an error message in hopes to track this down. That error is no longer occurring on many tests like it was before. Does seem to have one test related to windows still failing, giving this another clean run to see if I can track that one down.

Copy link

@v1v v1v added backport-active-all Automated backport with mergify to all the active branches backport-9.0 Automated backport to the 9.0 branch backport-8.18 Automated backport to the 8.18 branch and removed backport-active-all Automated backport with mergify to all the active branches labels Feb 12, 2025
@blakerouse
Copy link
Contributor

This is looking like it is now passing, I think this is ready to be merged. I recently did some changes to enrollment in Fleet Server that might relate to this being less likely to cause issues with enrollment. Whatever the case was it is no longer an issue with this PR.

Needs an approval from @elastic/ingest-eng-prod to allow merge.

@jlind23
Copy link
Contributor

jlind23 commented Feb 13, 2025

@pkoutsovasilis heads up, this is going to be merged.

@pazone pazone merged commit 37be67f into main Feb 13, 2025
18 checks passed
@pazone pazone deleted the ci_integration_test_regroup branch February 13, 2025 11:31
@pazone pazone added backport-9.0 Automated backport to the 9.0 branch and removed backport-9.0 Automated backport to the 9.0 branch labels Feb 13, 2025
mergify bot pushed a commit that referenced this pull request Feb 13, 2025
* TestRepeatedInstallUninstall optimisation

* cleanup

* cleanup

* cleanup

* cleanup

* TestInstallDefendWithMTLSandEncCertKey to fleet-install-defend group

* Extracted standalone-upgrade group

* Commented iterations for TestRepeatedInstallUninstall

* Reordered groups in pipeline matrix

* Fix error message to only include agents on the same policy.

---------

Co-authored-by: Denis <denis.rechkunov@elastic.co>
Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
(cherry picked from commit 37be67f)

# Conflicts:
#	pkg/testing/tools/fleettools/fleet.go
#	testing/integration/install_test.go
mergify bot pushed a commit that referenced this pull request Feb 13, 2025
* TestRepeatedInstallUninstall optimisation

* cleanup

* cleanup

* cleanup

* cleanup

* TestInstallDefendWithMTLSandEncCertKey to fleet-install-defend group

* Extracted standalone-upgrade group

* Commented iterations for TestRepeatedInstallUninstall

* Reordered groups in pipeline matrix

* Fix error message to only include agents on the same policy.

---------

Co-authored-by: Denis <denis.rechkunov@elastic.co>
Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
(cherry picked from commit 37be67f)
mergify bot pushed a commit that referenced this pull request Feb 13, 2025
* TestRepeatedInstallUninstall optimisation

* cleanup

* cleanup

* cleanup

* cleanup

* TestInstallDefendWithMTLSandEncCertKey to fleet-install-defend group

* Extracted standalone-upgrade group

* Commented iterations for TestRepeatedInstallUninstall

* Reordered groups in pipeline matrix

* Fix error message to only include agents on the same policy.

---------

Co-authored-by: Denis <denis.rechkunov@elastic.co>
Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
(cherry picked from commit 37be67f)

# Conflicts:
#	pkg/testing/tools/fleettools/fleet.go
#	testing/integration/install_test.go
mergify bot pushed a commit that referenced this pull request Feb 13, 2025
* TestRepeatedInstallUninstall optimisation

* cleanup

* cleanup

* cleanup

* cleanup

* TestInstallDefendWithMTLSandEncCertKey to fleet-install-defend group

* Extracted standalone-upgrade group

* Commented iterations for TestRepeatedInstallUninstall

* Reordered groups in pipeline matrix

* Fix error message to only include agents on the same policy.

---------

Co-authored-by: Denis <denis.rechkunov@elastic.co>
Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
(cherry picked from commit 37be67f)
mergify bot pushed a commit that referenced this pull request Feb 13, 2025
* TestRepeatedInstallUninstall optimisation

* cleanup

* cleanup

* cleanup

* cleanup

* TestInstallDefendWithMTLSandEncCertKey to fleet-install-defend group

* Extracted standalone-upgrade group

* Commented iterations for TestRepeatedInstallUninstall

* Reordered groups in pipeline matrix

* Fix error message to only include agents on the same policy.

---------

Co-authored-by: Denis <denis.rechkunov@elastic.co>
Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
(cherry picked from commit 37be67f)
pazone added a commit that referenced this pull request Feb 15, 2025
* TestRepeatedInstallUninstall optimisation

* cleanup

* cleanup

* cleanup

* cleanup

* TestInstallDefendWithMTLSandEncCertKey to fleet-install-defend group

* Extracted standalone-upgrade group

* Commented iterations for TestRepeatedInstallUninstall

* Reordered groups in pipeline matrix

* Fix error message to only include agents on the same policy.

---------

Co-authored-by: Denis <denis.rechkunov@elastic.co>
Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
(cherry picked from commit 37be67f)

Co-authored-by: Pavel Zorin <pavel.zorin@elastic.co>
pazone added a commit that referenced this pull request Feb 17, 2025
* [CI] Integration tests regrouping (#6349)

* TestRepeatedInstallUninstall optimisation

* cleanup

* cleanup

* cleanup

* cleanup

* TestInstallDefendWithMTLSandEncCertKey to fleet-install-defend group

* Extracted standalone-upgrade group

* Commented iterations for TestRepeatedInstallUninstall

* Reordered groups in pipeline matrix

* Fix error message to only include agents on the same policy.

---------

Co-authored-by: Denis <denis.rechkunov@elastic.co>
Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
(cherry picked from commit 37be67f)

# Conflicts:
#	pkg/testing/tools/fleettools/fleet.go
#	testing/integration/install_test.go

* Resolved Conflicts

---------

Co-authored-by: Pavel Zorin <pavel.zorin@elastic.co>
pazone added a commit that referenced this pull request Feb 17, 2025
* TestRepeatedInstallUninstall optimisation

* cleanup

* cleanup

* cleanup

* cleanup

* TestInstallDefendWithMTLSandEncCertKey to fleet-install-defend group

* Extracted standalone-upgrade group

* Commented iterations for TestRepeatedInstallUninstall

* Reordered groups in pipeline matrix

* Fix error message to only include agents on the same policy.

---------

Co-authored-by: Denis <denis.rechkunov@elastic.co>
Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
(cherry picked from commit 37be67f)

Co-authored-by: Pavel Zorin <pavel.zorin@elastic.co>
pazone added a commit that referenced this pull request Feb 20, 2025
* [CI] Integration tests regrouping (#6349)

* TestRepeatedInstallUninstall optimisation

* cleanup

* cleanup

* cleanup

* cleanup

* TestInstallDefendWithMTLSandEncCertKey to fleet-install-defend group

* Extracted standalone-upgrade group

* Commented iterations for TestRepeatedInstallUninstall

* Reordered groups in pipeline matrix

* Fix error message to only include agents on the same policy.

---------

Co-authored-by: Denis <denis.rechkunov@elastic.co>
Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
(cherry picked from commit 37be67f)

# Conflicts:
#	pkg/testing/tools/fleettools/fleet.go
#	testing/integration/install_test.go

* Resolved install_test.go

* Resolved conflicts

---------

Co-authored-by: Pavel Zorin <pavel.zorin@elastic.co>
Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
pazone added a commit that referenced this pull request Feb 21, 2025
* TestRepeatedInstallUninstall optimisation

* cleanup

* cleanup

* cleanup

* cleanup

* TestInstallDefendWithMTLSandEncCertKey to fleet-install-defend group

* Extracted standalone-upgrade group

* Commented iterations for TestRepeatedInstallUninstall

* Reordered groups in pipeline matrix

* Fix error message to only include agents on the same policy.

---------

Co-authored-by: Denis <denis.rechkunov@elastic.co>
Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
(cherry picked from commit 37be67f)

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-8.x Automated backport to the 8.x branch with mergify backport-8.16 Automated backport with mergify backport-8.17 Automated backport with mergify backport-8.18 Automated backport to the 8.18 branch backport-9.0 Automated backport to the 9.0 branch enhancement New feature or request skip-changelog Team:Ingest-EngProd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants