Skip to content

ci: enable e2e retries on merge queue runs - #41496

Merged
ggazzo merged 1 commit into
developfrom
ci/merge-queue-retries
Jul 21, 2026
Merged

ci: enable e2e retries on merge queue runs#41496
ggazzo merged 1 commit into
developfrom
ci/merge-queue-retries

Conversation

@ggazzo

@ggazzo ggazzo commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

E2E test retries (PLAYWRIGHT_RETRIES=2) were only enabled for release events and pushes to develop/master. Merge queue runs come in as merge_group events, so they ran with 0 retries and flaky tests could evict PRs from the queue.

This adds merge_group to the retries condition for the three e2e jobs (test-ui, test-api-ee, test-ui-ee), so merge queue runs get the same 2 retries as develop.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Improved reliability of UI end-to-end test runs in merge queue validation by allowing up to two retries when needed.

Task: ARCH-2285

@dionisio-bot

dionisio-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7e6a5f1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ggazzo ggazzo added this to the 8.8.0 milestone Jul 21, 2026
@ggazzo
ggazzo marked this pull request as ready for review July 21, 2026 13:19
@ggazzo
ggazzo requested a review from a team as a code owner July 21, 2026 13:19
@KevLehman KevLehman added the stat: QA assured Means it has been tested and approved by a company insider label Jul 21, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 21, 2026
@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.61%. Comparing base (0986cc2) to head (7e6a5f1).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41496      +/-   ##
===========================================
+ Coverage    68.59%   68.61%   +0.01%     
===========================================
  Files         4134     4134              
  Lines       160802   160802              
  Branches     29248    29281      +33     
===========================================
+ Hits        110310   110341      +31     
+ Misses       45385    45349      -36     
- Partials      5107     5112       +5     
Flag Coverage Δ
e2e 58.88% <ø> (-0.01%) ⬇️
e2e-api 45.60% <ø> (+0.25%) ⬆️
unit 70.54% <ø> (ø)

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

🚀 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.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The CI workflow now enables up to two retries for UI CE, EE, and FIPS end-to-end test jobs when triggered by merge_group, while preserving existing retry conditions.

Changes

UI test retry configuration

Layer / File(s) Summary
Enable merge group retries
.github/workflows/ci.yml
The UI CE, EE, and FIPS test jobs include merge_group in the conditions that set retries to 2.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested labels: type: chore

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main CI change: enabling E2E retries for merge queue runs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Line 824: Update the test-ui-fips job condition near the retries configuration
to handle merge_group explicitly: allow the job based on the merge_group event
without evaluating github.event.pull_request.labels, while retaining the
existing fips-label check for pull request events and other current gating
behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 05089729-fce1-4d37-b815-fe1bac7eb5a4

📥 Commits

Reviewing files that changed from the base of the PR and between 0986cc2 and 7e6a5f1.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
📜 Review details
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-04-27T18:32:21.871Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 40321
File: .github/workflows/ci.yml:137-145
Timestamp: 2026-04-27T18:32:21.871Z
Learning: In .github/workflows/ci.yml, the `diff` step under `release-versions` intentionally uses a bash `if` with `gh pr diff ... | grep -q ...; then ... fi`. For non-`pull_request` workflow triggers where `GH_PR_NUM` can be empty, the `gh` command may fail, but the surrounding bash `if` is relied on to treat that failure as the condition being false and skip the `then` block, allowing the step/job to exit cleanly. Do not add extra guards for non-PR event types unless this failure/skip behavior is intentionally changed.

Applied to files:

  • .github/workflows/ci.yml
🔇 Additional comments (1)
.github/workflows/ci.yml (1)

662-662: LGTM!

Also applies to: 753-753

Comment thread .github/workflows/ci.yml
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
gh-docker-tag: ${{ needs.release-versions.outputs.gh-docker-tag }}
retries: ${{ (github.event_name == 'release' || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master') && 2 || 0 }}
retries: ${{ (github.event_name == 'release' || github.event_name == 'merge_group' || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master') && 2 || 0 }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the job and the relevant condition/retry lines in the workflow.
rg -n -C 4 "test-ui-fips|contains\\(github\\.event\\.pull_request\\.labels|retries:" .github/workflows/ci.yml

Repository: RocketChat/Rocket.Chat

Length of output: 1973


🌐 Web query:

Rocket.Chat .github/workflows/ci.yml test-ui-fips merge_group contains(github.event.pull_request.labels)

💡 Result:

Based on the provided search results from the Rocket.Chat repository and general GitHub Actions practices, there is no evidence of a test-ui-fips job or configuration in the Rocket.Chat ci.yml file [1][2][3][4]. The repository's CI workflow focuses on standard UI and API tests (both Community and Enterprise editions) [1][2][3][4]. Regarding the technical concern about merge_group and contains(github.event.pull_request.labels), GitHub Actions merge_group events do not contain the pull_request object [5][6]. Consequently, using contains(github.event.pull_request.labels) within a job triggered by a merge_group event will fail because github.event.pull_request is undefined in that context [5][6]. To handle label-based logic in workflows that support both pull_request and merge_group events, best practices involve checking the event name [5][6]. For example: - if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'your-label') If a job must run for a merge group, it is common to either skip the label check or assume the necessary validation was completed during the original pull request check [5][6].

Citations:


🌐 Web query:

"contains(github.event.pull_request.labels.*.name, 'fips')" "Rocket.Chat" ".github/workflows/ci.yml"

💡 Result:

The expression contains(github.event.pull_request.labels.*.name, 'fips') is a GitHub Actions expression used to check if a pull request has a label named "fips" [1]. This pattern is commonly used in conditional logic within GitHub Actions workflow files to trigger specific jobs or steps [1]. While the "fips" label is used in Rocket.Chat's development context—such as in pull request #18661 regarding FIPS-compliant algorithms [2] and referenced in internal Jira tasks related to FIPS compliance [3]—there is no evidence that this specific contains expression is a hardcoded or standard part of the main Rocket.Chat .github/workflows/ci.yml file [4][5]. Rocket.Chat maintains FIPS-compliant Docker images for federal deployments [6], but the CI pipeline logic primarily relies on standard event triggers (e.g., pull_request, push, release) and input-driven workflows rather than label-based filtering for FIPS specifically [4][5][7]. If you are implementing this in a workflow, you must ensure that your job trigger includes the labeled or unlabeled types if you intend to run the workflow specifically when a label is added or removed [1]. Without these, the github.event.pull_request object may not contain the updated labels in all contexts [1].

Citations:


🌐 Web query:

site:github.com/RocketChat/Rocket.Chat/blob e75965c0 .github/workflows/ci.yml "test-ui-fips" "merge_group" "github.event.pull_request.labels"

💡 Result:

The query components refer to files and configuration logic within the Rocket.Chat repository (specifically at commit e75965c) [1][2][3]. 1. e75965c: This is a specific Git commit hash from the RocketChat/Rocket.Chat repository [1][2][3]. 2..github/workflows/ci.yml: This is the primary continuous integration workflow file for the project [1]. It defines the triggers for the CI pipeline, including pull_request, merge_group, and push events [1][4]. 3. test-ui-fips: This appears to be a specific CI job name or a referenced test suite configuration within the project's ecosystem, often utilized for FIPS-compliant UI testing [4][5]. 4. merge_group: This is a GitHub Actions trigger used to run workflows when a pull request is added to a merge group (part of GitHub's Merge Queue feature) [1][4]. 5. github.event.pull_request.labels: This is a GitHub Actions context expression used to access the labels associated with a pull request [4]. It is commonly used in conditional logic (if statements) within workflow steps or jobs to determine whether they should execute based on specific labels attached to a PR (e.g., triggering specialized tests only when a certain label is present) [4][5]. In the context of the Rocket.Chat repository, these elements are part of a complex CI/CD setup that utilizes reusable workflows (like ci-test-e2e.yml) [2][4] and conditional execution based on workflow events, branches, and PR metadata to manage testing, building, and deployment [1][4].

Citations:


🌐 Web query:

GitHub Actions merge_group event payload pull_request object official docs

💡 Result:

The merge_group event in GitHub Actions does not contain a pull_request object [1]. This is a frequent point of confusion, as the merge_group event is distinct from the pull_request event [2][3][4]. While the pull_request event payload provides comprehensive details about a specific pull request, the merge_group event payload is focused on the temporary merge group branch created by the merge queue to validate changes [5][4][6]. Key points regarding the merge_group event payload: 1. Payload Structure: The top-level object for a merge_group event includes a merge_group field (an object) [6], but it does not include a pull_request field [1]. 2. Event Purpose: The merge_group event is triggered when a pull request is added to a merge queue [2][4]. It notifies workflows that they need to run status checks on the merge group branch [5][6]. 3. Data Availability: Because a single merge group can contain multiple queued pull requests [4][6], the event payload is structurally different from a standard pull_request event, which typically relates to a single, specific pull request [1]. 4. Accessing Information: If your workflow needs to interact with the pull request that triggered the queue, you cannot rely on the event payload to provide a pull_request object. Developers often have to use the GitHub API to fetch details about the pull requests included in the merge group if that information is required [1]. For further details on the specific fields available in the merge_group object (such as head_sha and base_sha), refer to the official GitHub Webhook events and payloads documentation [6].

Citations:


Gate test-ui-fips for merge_group explicitly
.github/workflows/ci.yml still checks contains(github.event.pull_request.labels.*.name, 'fips'), which won’t work on merge_group runs because that event has no pull_request label context. If this job should run in the merge queue, split the condition by event name and skip the label lookup for merge_group.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml at line 824, Update the test-ui-fips job condition
near the retries configuration to handle merge_group explicitly: allow the job
based on the merge_group event without evaluating
github.event.pull_request.labels, while retaining the existing fips-label check
for pull request events and other current gating behavior.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 1 file

Re-trigger cubic

@ggazzo
ggazzo merged commit eb8c624 into develop Jul 21, 2026
31 checks passed
@ggazzo
ggazzo deleted the ci/merge-queue-retries branch July 21, 2026 13:37
@ggazzo

ggazzo commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

/jira ARCH-2228

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants