Skip to content

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

Open
alliasgher wants to merge 1 commit intoossf:mainfrom
alliasgher:ci-use-ginkgo-flake-attempts
Open

🌱 ci: use ginkgo --flake-attempts instead of nick-invision/retry for e2e tests#5013
alliasgher wants to merge 1 commit intoossf:mainfrom
alliasgher:ci-use-ginkgo-flake-attempts

Conversation

@alliasgher
Copy link
Copy Markdown

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
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: No status

Development

Successfully merging this pull request may close these issues.

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

1 participant