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

ci: Convert all Go tests into a single job #13046

Merged
merged 2 commits into from
Nov 25, 2024
Merged

Conversation

mslipper
Copy link
Collaborator

@mslipper mslipper commented Nov 22, 2024

Takes all the go-e2e and go-test jobs and combines them into one single super-job. This has the following benefits:

  1. We can centralize all config for Go tests in one place and simplify our CI pipeline.
  2. It leaves parallelism up to the Go runtime, which is more efficient.
  3. It makes our test reporting more accurate.

As part of this PR, I also:

  1. Created a new resource class just for Go tests. It runs on the large Latitude runner, but limits the number of parallel go test jobs to 3 to prevent resource starvation.
  2. Enabled test retries on gotestsum. This should reduce the number of flakes we see from the Go tests by retrying them up to 2 times in the event that they fail. Failures are still captured by the test reporting, so we can address them.

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.77%. Comparing base (6a871c5) to head (e5af9d3).
Report is 4 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #13046      +/-   ##
===========================================
- Coverage    68.78%   66.77%   -2.02%     
===========================================
  Files           56       56              
  Lines         4665     4665              
===========================================
- Hits          3209     3115      -94     
- Misses        1274     1378     +104     
+ Partials       182      172      -10     
Flag Coverage Δ
cannon-go-tests-32 61.85% <ø> (-2.02%) ⬇️
cannon-go-tests-64 56.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 8 files with indirect coverage changes

---- 🚨 Try these New Features:

Takes all the go-e2e and go-test jobs and combines them into one single super-job. This has the following benefits:

1. We can centralize all config for Go tests in one place and simplify our CI pipeline.
2. It leaves parallelism up to the Go runtime, which is more efficient.
4. It makes our test reporting more accurate.

As part of this PR, I also:

1. Created a new resource class just for Go tests. It runs on the large Latitude runner, but limits the number of parallel go test jobs to 3 to prevent resource starvation.
2. Enabled test retries on `gotestsum`. This should reduce the number of flakes we see from the Go tests by retrying them up to 2 times in the event that they fail. Failures are still captured by the test reporting, so we can address them.
@mslipper mslipper marked this pull request as ready for review November 23, 2024 00:19
@mslipper mslipper requested a review from a team as a code owner November 23, 2024 00:19
@mslipper mslipper added this pull request to the merge queue Nov 25, 2024
Merged via the queue into develop with commit 418f0cc Nov 25, 2024
44 checks passed
@mslipper mslipper deleted the feat/single-go-job branch November 25, 2024 17:13
# constraint that gotestsum does not currently (nor likely will) accept files from different packages when building.
JUNIT_FILE=../tmp/test-results/<<parameters.module>>_<<parameters.target>>.xml JSON_LOG_FILE=../tmp/testlogs/test.log make <<parameters.target>>
working_directory: <<parameters.module>>
export OP_E2E_SKIP_SLOW_TEST=true
Copy link
Contributor

@Inphi Inphi Nov 25, 2024

Choose a reason for hiding this comment

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

We've lost coverage for slow running tests. Working on a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants