Skip to content

Extract the e2e retry block into a composite action - #126

Open
sscarduzio wants to merge 2 commits into
masterfrom
ci/extract-run-e2e-tests-action
Open

Extract the e2e retry block into a composite action#126
sscarduzio wants to merge 2 commits into
masterfrom
ci/extract-run-e2e-tests-action

Conversation

@sscarduzio

@sscarduzio sscarduzio commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Follow-up to @coutoPL's review on #121, which is merged. Rebased onto master, so this carries only the extraction.

The duplication

Three call sites ran the suite through the same retry wrapper — prod-e2e-tests and dev-e2e-tests in all-e2e-tests.yml, and the hand-dispatched job in targeted-e2e-tests.yml. All three pinned the same nick-fields/retry SHA, the same timeout_minutes, the same retry_wait_seconds, and two carried a near-identical copy of the reason for the cap.

The copies had already drifted once: one was corrected while the other kept a claim the first had retracted. #121 had to edit the cap in three places, and so would the next change.

The action

.github/run-e2e-tests, next to docker-memory-monitor, upload-videos and cleanup-disk-space. The call sites differ only in things that map onto inputs:

input prod dev targeted
env, elk matrix matrix dispatch inputs
mode prod dev dispatch input, may be empty
ror_es / ror_kbn the per-run tag, both two independent inputs
max_attempts 2 2 1
electron_extra_launch_args --disable-gpu --disable-gpu

The runner invocation is the PARAMS array that targeted-e2e-tests.yml already used, so an input left empty drops its flag and one command string covers all three.

56 lines of workflow removed, 24 added, and one place to change the cap.

The two decisions you flagged

  • Secrets. A composite action cannot read them, so ROR_ENT_ACTIVATION_TOKEN is an activation_key input. That is what upload-videos already does with the S3 credentials.
  • retry_on. The targeted workflow did not set it, and folding it in gives it retry_on: any. At max_attempts: 1 the retry never fires, so nothing changes today. It is now stated in the action rather than inherited by accident, and the comment beside it says the retry covers transient infrastructure and not a failing suite.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Added a reusable end-to-end test action for consistent execution across production, development, and targeted test workflows.
    • Standardized test parameter handling, including environment, version, mode, activation key, and browser launch options.
    • Centralized retry behavior with configurable attempt limits, retry waits, and execution timeouts.
    • Updated development runs to pass image versions through action inputs rather than command-line flags.

@coderabbitai

This comment was marked as outdated.

@sscarduzio
sscarduzio requested a review from coutoPL September 10, 2026 09:40
Three call sites ran the suite through the same retry wrapper: both
matrix jobs in all-e2e-tests.yml and the hand-dispatched job in
targeted-e2e-tests.yml. All three pinned the same action SHA, the same
cap and the same wait, and two carried a near-identical copy of the
reason for the cap. The next change to the cap would have had to edit
three places, and the copies had already drifted once.

.github/run-e2e-tests holds it now. The call sites differ only in
inputs: the env and the version, the mode, the two optional image tags,
how many attempts, and the Electron flags. The runner invocation is the
PARAMS array the targeted workflow already used, so an input left empty
drops its flag.

A composite action cannot read secrets, so the activation key is an
input, as the S3 credentials already are for upload-videos.

The targeted workflow gains retry_on: any, which it did not set before.
At max_attempts 1 the retry never fires, so this changes nothing today.
It is stated rather than inherited by accident.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sscarduzio
sscarduzio changed the base branch from ci/fit-the-e2e-timeout to master September 10, 2026 10:12
@sscarduzio
sscarduzio force-pushed the ci/extract-run-e2e-tests-action branch from a010321 to eb32480 Compare September 10, 2026 10:12
@sscarduzio

This comment was marked as outdated.

Comment thread .github/run-e2e-tests/action.yml Outdated
Comment thread .github/run-e2e-tests/action.yml Outdated
Comment thread .github/run-e2e-tests/action.yml Outdated
Comment thread .github/run-e2e-tests/action.yml Outdated
Comment thread .github/run-e2e-tests/action.yml Outdated
Five points from the review.

`env` said "elk-ror" or "eck-ror". Those are the directory names the
runner resolves to, not the values it takes: --env accepts `docker` or
`eck-<version>` and rejects the rest.

`ror_es` said "image tag", which it is not. It is one field of the tag,
`<elk>-ror-<this>`, and it takes a ROR version or a pre-build run tag.
`ror_kbn` now points at that instead of repeating it.

`activation_key` explained why a composite action needs the value passed
in. That is about the mechanism, not about the input.

The timeout comment claimed 2 x 75. max_attempts is an input, so the
worst case is max_attempts x 75.

The retry comment named the same two transients twice over. One sentence
each now.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sscarduzio
sscarduzio requested a review from coutoPL September 10, 2026 10:39

@coutoPL coutoPL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

one comment left, but I'm giving you the approve. But please fix it.

LGTM

required: false
default: ''
ror_kbn:
description: 'The same for the Kibana image.'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Oh, just rewrite it here.

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.

2 participants