Skip to content

🌱 ci: use ginkgo --flake-attempts instead of nick-invision/retry for e2e tests#5013

Merged
spencerschrock merged 3 commits intoossf:mainfrom
alliasgher:ci-use-ginkgo-flake-attempts
Apr 27, 2026
Merged

🌱 ci: use ginkgo --flake-attempts instead of nick-invision/retry for e2e tests#5013
spencerschrock merged 3 commits intoossf:mainfrom
alliasgher:ci-use-ginkgo-flake-attempts

Conversation

@alliasgher
Copy link
Copy Markdown
Contributor

Summary

Replace the nick-invision/retry GitHub Action with ginkgo's built-in --flake-attempts=3 for all e2e test targets. This retries only the individual specs that fail rather than re-running the entire test suite.

Motivation

As described in #2897, when an e2e test fails, the retry action re-runs make e2e-* from scratch — all 54+ specs. With --flake-attempts=3, ginkgo retries only the failed spec up to 3 times in-process, saving:

  • GitHub API token quota (no redundant API calls from passing specs)
  • CI time (seconds to retry one spec vs minutes to re-run all)

Changes

Makefile

Added --flake-attempts=3 to all ginkgo e2e targets:

  • e2e-pat
  • e2e-gh-token
  • e2e-gitlab-token
  • e2e-gitlab
  • e2e-azure-devops-token

Workflows

Removed nick-invision/retry wrapper from e2e steps in:

  • .github/workflows/main.yml (PAT e2e)
  • .github/workflows/integration.yml (GITHUB_TOKEN e2e)
  • .github/workflows/gitlab.yml (both GitLab e2e steps)

Non-e2e retry wrappers (generate-mocks, generate-docs, publishimage) are intentionally unchanged — they don't use ginkgo.

Fixes #2897

@alliasgher alliasgher requested a review from a team as a code owner April 13, 2026 01:59
@alliasgher alliasgher requested review from jeffmendoza and spencerschrock and removed request for a team April 13, 2026 01:59
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Apr 13, 2026
@alliasgher alliasgher changed the title ci: use ginkgo --flake-attempts instead of nick-invision/retry for e2e tests 🌱 ci: use ginkgo --flake-attempts instead of nick-invision/retry for e2e tests Apr 13, 2026
…e tests

Replace the nick-invision/retry GitHub Action wrapper around e2e test
targets with ginkgo's built-in --flake-attempts=3 flag. This retries
only the individual specs that fail rather than re-running the entire
suite, saving GitHub API token quota and CI time.

Changes:
- Makefile: add --flake-attempts=3 to all ginkgo e2e targets
  (e2e-pat, e2e-gh-token, e2e-gitlab-token, e2e-gitlab, e2e-azure-devops-token)
- main.yml: remove retry wrapper from PAT e2e step
- integration.yml: remove retry wrapper from GITHUB_TOKEN e2e step
- gitlab.yml: remove retry wrapper from both GitLab e2e steps

Non-e2e retry wrappers (generate-mocks, generate-docs, publishimage)
are intentionally left unchanged as they don't use ginkgo.

Fixes ossf#2897

Signed-off-by: Ali <alliasgher123@gmail.com>
@alliasgher alliasgher force-pushed the ci-use-ginkgo-flake-attempts branch from 591d9c9 to a2b5802 Compare April 15, 2026 12:12
@spencerschrock
Copy link
Copy Markdown
Member

Did you take a look at the timeout field? I vaguely remember there being a motivation for having it, but I'm a little rusty on the issue

#2897 (comment)

Signed-off-by: Ali <alliasgher123@gmail.com>
@alliasgher
Copy link
Copy Markdown
Contributor Author

Good catch — added back timeout-minutes: 30 on all four e2e steps in c6275eb. Ginkgo's --flake-attempts retries the flaky spec in-process, so the 30-min ceiling still applies to the whole step.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.78%. Comparing base (353ed60) to head (29b3fe0).
⚠️ Report is 355 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5013      +/-   ##
==========================================
+ Coverage   66.80%   69.78%   +2.98%     
==========================================
  Files         230      252      +22     
  Lines       16602    15736     -866     
==========================================
- Hits        11091    10982     -109     
+ Misses       4808     3873     -935     
- Partials      703      881     +178     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@spencerschrock spencerschrock left a comment

Choose a reason for hiding this comment

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

Thanks!

@spencerschrock spencerschrock merged commit cc033d6 into ossf:main Apr 27, 2026
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

e2e tests: use ginkgo's --flake-attempts flag instead of nick-invision/retry

2 participants