Skip to content

ci(test): skip skipped tests from the Test JUnit output #8084

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 7 commits into from
May 19, 2025

Conversation

v1v
Copy link
Member

@v1v v1v commented May 6, 2025

What does this PR do?

Bump the gotestsum version and eemove skipped tests from the aggregated report.

Why is it important?

The integration tests reporting have a few non-critical reporting issues:

  • Each test step has its own XML and HTML report in atrifacts (Build example)
  • The reports contain many of skipped tests (example)

That affects:

  • General test report readability
  • Buildkite Test Suites show wrong AVG duration and failure percentage

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

How to test this PR locally

Run make and then .

I compared this test-result from main vs this PR

image

vs

image

Related issues

gotestyourself/gotestsum#478 has been merged and https://github.com/gotestyourself/gotestsum/releases/tag/v1.12.2 has been released

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

@v1v v1v self-assigned this May 6, 2025
Copy link
Contributor

mergify bot commented May 6, 2025

This pull request does not have a backport label. Could you fix it @v1v? 🙏
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.

@v1v v1v added skip-changelog backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches backport-8.19 Automated backport to the 8.19 branch labels May 6, 2025
@v1v v1v marked this pull request as ready for review May 6, 2025 12:52
@v1v v1v requested review from a team as code owners May 6, 2025 12:52
@v1v v1v requested review from blakerouse and pkoutsovasilis May 6, 2025 12:52
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.

Should we have here the --junitfile-hide-skipped-tests argument?

@v1v
Copy link
Member Author

v1v commented May 6, 2025

Should we have here the --junitfile-hide-skipped-tests argument?

good catch, I somehow thought it was using the mage specific implementation. Thanks!

See 77dcc3f (#8084)

Copy link
Contributor

mergify bot commented May 7, 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 feature/gotestsum-skip upstream/feature/gotestsum-skip
git merge upstream/main
git push upstream feature/gotestsum-skip

* upstream/main:
  Guard against `nil` pointer dereference (elastic#8107)
  Generate NOTICE.txt with only modules used by binaries (elastic#8053)
  Retry enrollment requests when an error is returned, add enrollment timeout (elastic#8056)
  Changelog for 8.17.6 version (elastic#8062) (elastic#8106)
  [main][Automation] Update versions (elastic#8098)
  Allow using beats receivers for self-monitoring (elastic#8031)
  Adding new configuration setting: `agent.upgrade.rollback.window` (elastic#8065)
  [Integration Testing] Allow tests to declare themselves as needing a FIPS environment (elastic#8083)
  fix(agentless): overcome SIGPIPE in agentless promotion pipeline (elastic#8094)
  ksm autosharing integration configuration update (elastic#8086)
@pkoutsovasilis
Copy link
Contributor

pkoutsovasilis commented May 8, 2025

@v1v the code changes LGTM but maybe also @pazone should have a look and somehow cross-check that now that the skipped tests are not reported buildkite statistics do not have the reported inconsistencies? Also don't we want to backport this to all active branches?

Copy link
Contributor

mergify bot commented May 8, 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 feature/gotestsum-skip upstream/feature/gotestsum-skip
git merge upstream/main
git push upstream feature/gotestsum-skip

@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label May 9, 2025
@elasticmachine
Copy link
Collaborator

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

pazone
pazone previously approved these changes May 12, 2025
Copy link
Collaborator

@pazone pazone left a comment

Choose a reason for hiding this comment

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

LGTM. It's now much easier to read the test reports
Should we replace Replace() with ReplaceAll() in gotest.go within this PR?

@v1v v1v requested a review from pkoutsovasilis May 15, 2025 14:16
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.

@v1v we need to add the new --junitfile-hide-skipped-tests flag also here right?

@v1v
Copy link
Member Author

v1v commented May 16, 2025

@v1v we need to add the new --junitfile-hide-skipped-tests flag also here right?

Thanks! see c41303b (#8084)

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

@elasticmachine
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @v1v

@v1v v1v merged commit 05289da into elastic:main May 19, 2025
9 of 12 checks passed
Copy link
Contributor

@Mergifyio backport 9.0

Copy link
Contributor

mergify bot commented May 19, 2025

backport 9.0

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request May 19, 2025
(cherry picked from commit 05289da)

# Conflicts:
#	.buildkite/scripts/integration-tests.ps1
#	go.mod
#	go.sum
mergify bot pushed a commit that referenced this pull request May 19, 2025
(cherry picked from commit 05289da)

# Conflicts:
#	.buildkite/scripts/integration-tests.ps1
@v1v
Copy link
Member Author

v1v commented May 19, 2025

@Mergifyio backport 8.18

Copy link
Contributor

mergify bot commented May 19, 2025

backport 8.18

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request May 19, 2025
(cherry picked from commit 05289da)

# Conflicts:
#	.buildkite/scripts/integration-tests.ps1
#	go.mod
#	go.sum
v1v pushed a commit that referenced this pull request May 19, 2025
v1v pushed a commit that referenced this pull request May 19, 2025
v1v pushed a commit that referenced this pull request May 20, 2025
@pkoutsovasilis
Copy link
Contributor

@Mergifyio backport 8.17

Copy link
Contributor

mergify bot commented Jun 12, 2025

backport 8.17

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 12, 2025
(cherry picked from commit 05289da)

# Conflicts:
#	.buildkite/scripts/buildkite-integration-tests.sh
#	.buildkite/scripts/integration-tests.ps1
#	go.mod
#	go.sum
pkoutsovasilis added a commit that referenced this pull request Jun 12, 2025
…nit output (#8461)

* ci(test): skip skipped tests from the Test JUnit output (#8084)

(cherry picked from commit 05289da)

# Conflicts:
#	.buildkite/scripts/buildkite-integration-tests.sh
#	.buildkite/scripts/integration-tests.ps1
#	go.mod
#	go.sum

* fix: resolve conflicts

* fix: update NOTICE.txt

---------

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.19 Automated backport to the 8.19 branch backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches 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.

5 participants