This is an automated email from the ASF dual-hosted git repository.
Xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 93ca5528a9 ci: fix Tier B retries and first-attempt reporting (#9404)
93ca5528a9 is described below
commit 93ca5528a91ed3bcfa01fb573830c65c65727e3e
Author: Xuanwo <[email protected]>
AuthorDate: Mon Nov 30 04:43:25 2026 +0800
ci: fix Tier B retries and first-attempt reporting (#9404)
Evaluate the retry flag before composite actions replace the inputs
context. Use a completed matching retry to recover the first outcome when the
Jobs API reports a tolerated failure as success.
---
.github/scripts/nightly/report.py | 13 +++
.github/scripts/nightly/test_report.py | 100 ++++++++++++---------
.github/workflows/test_behavior_binding_c.yml | 5 +-
.github/workflows/test_behavior_binding_cpp.yml | 5 +-
.github/workflows/test_behavior_binding_dotnet.yml | 5 +-
.github/workflows/test_behavior_binding_go.yml | 5 +-
.github/workflows/test_behavior_binding_java.yml | 5 +-
.github/workflows/test_behavior_binding_nodejs.yml | 5 +-
.github/workflows/test_behavior_binding_python.yml | 5 +-
.github/workflows/test_behavior_binding_ruby.yml | 4 +-
.github/workflows/test_behavior_core.yml | 5 +-
.../test_behavior_integration_object_store.yml | 5 +-
12 files changed, 110 insertions(+), 52 deletions(-)
diff --git a/.github/scripts/nightly/report.py
b/.github/scripts/nightly/report.py
index 8f7b466aae..139fbbc7de 100755
--- a/.github/scripts/nightly/report.py
+++ b/.github/scripts/nightly/report.py
@@ -264,6 +264,19 @@ def extract_outcomes(
first_res = _step_state(first_step) or str(conclusion or status or
"unknown")
retry_res = _step_state(retry_step)
+ # The Jobs API reports the conclusion after continue-on-error. These
+ # matching retries only run when the first test's outcome is failure.
+ if (
+ tier == "tier-b"
+ and first_step is not None
+ and first_step.get("conclusion") == "success"
+ and retry_step is not None
+ and retry_step["name"] == f"Retry {first_step['name']}"
+ and retry_step.get("status") == "completed"
+ and retry_res in ("success", "failure")
+ ):
+ first_res = "failure"
+
failed_step = next(
(
str(s.get("name"))
diff --git a/.github/scripts/nightly/test_report.py
b/.github/scripts/nightly/test_report.py
index 8d9e16640d..a330adc271 100644
--- a/.github/scripts/nightly/test_report.py
+++ b/.github/scripts/nightly/test_report.py
@@ -240,46 +240,61 @@ class NightlyReportTests(unittest.TestCase):
self.assertEqual(summary["counts"], {"passed": 0, "failed": 1,
"unknown": 0})
def test_extracts_top_level_test_and_retry_steps(self):
- jobs = [
- {
- "name": "behavior / core / ubuntu-latest / s3 / aws_s3",
- "status": "completed",
- "conclusion": "success",
- "labels": ["ubuntu-latest"],
- "html_url": "https://example.invalid/s3",
- "steps": [
- {"name": "Test Core", "conclusion": "failure"},
- {"name": "Retry Test Core", "conclusion": "success"},
- ],
- },
- {
- "name": "behavior / core / ubuntu-latest / s3 / aws_s3_sse",
- "status": "completed",
- "conclusion": "failure",
- "labels": ["ubuntu-latest"],
- "html_url": "https://example.invalid/s3-sse",
- "steps": [
- {"name": "Test Core", "conclusion": "failure"},
- {"name": "Retry Test Core", "conclusion": "failure"},
- ],
- },
- ]
- outcomes = report.extract_outcomes(jobs, "tier-b", "Report Nightly
Status")
- by_id = {o.item_id: o for o in outcomes}
- self.assertEqual(
- by_id["behavior / core / ubuntu-latest / s3 / aws_s3"].state,
"passed"
- )
- self.assertEqual(
- by_id["behavior / core / ubuntu-latest / s3 /
aws_s3"].first_attempt,
- "failure",
- )
- self.assertEqual(
- by_id["behavior / core / ubuntu-latest / s3 /
aws_s3"].retry_attempt,
- "success",
- )
- self.assertEqual(
- by_id["behavior / core / ubuntu-latest / s3 / aws_s3_sse"].state,
"failed"
- )
+ for test_name, retry_name in (
+ ("Test Core", "Retry Test Core"),
+ ("Test", "Retry Test"),
+ ("Test service", "Retry Test service"),
+ ):
+ for retry_result, job_result, state, first_attempt in (
+ ("success", "success", "passed", "failure"),
+ ("failure", "failure", "failed", "failure"),
+ ("skipped", "success", "passed", "success"),
+ ("cancelled", "cancelled", "unknown", "success"),
+ ):
+ with self.subTest(test=test_name, retry=retry_result):
+ job = {
+ "name": "behavior_live / live-service",
+ "status": "completed",
+ "conclusion": job_result,
+ "steps": [
+ {
+ "name": test_name,
+ "status": "completed",
+ "conclusion": "success",
+ },
+ {
+ "name": retry_name,
+ "status": "completed",
+ "conclusion": retry_result,
+ },
+ ],
+ }
+ [outcome] = report.extract_outcomes(
+ [job], "tier-b", "Report Nightly Status"
+ )
+ self.assertEqual(outcome.state, state)
+ self.assertEqual(outcome.first_attempt, first_attempt)
+ self.assertEqual(
+ outcome.retry_attempt,
+ None if retry_result == "skipped" else retry_result,
+ )
+ self.assertEqual(
+ outcome.failed_step,
+ retry_name if retry_result == "failure" else None,
+ )
+
+ def test_unrelated_retry_does_not_change_first_attempt(self):
+ job = {
+ "name": "behavior_live / live-service",
+ "status": "completed",
+ "conclusion": "success",
+ "steps": [
+ {"name": "Test Core", "status": "completed", "conclusion":
"success"},
+ {"name": "Retry Test", "status": "completed", "conclusion":
"success"},
+ ],
+ }
+ [outcome] = report.extract_outcomes([job], "tier-b", "Report Nightly
Status")
+ self.assertEqual(outcome.first_attempt, "success")
def test_tier_b_requires_two_consecutive_failures(self):
job_fail = [
@@ -290,8 +305,8 @@ class NightlyReportTests(unittest.TestCase):
"labels": ["ubuntu-latest"],
"html_url": "https://example.invalid/s3",
"steps": [
- {"name": "Test Core", "conclusion": "failure"},
- {"name": "Retry Test Core", "conclusion": "failure"},
+ {"name": "Test Core", "status": "completed", "conclusion":
"success"},
+ {"name": "Retry Test Core", "status": "completed",
"conclusion": "failure"},
],
}
]
@@ -347,6 +362,7 @@ class NightlyReportTests(unittest.TestCase):
gh_second.created[0]["title"],
"[Nightly Live] behavior / core / ubuntu-latest / s3 / aws_s3",
)
+ self.assertIn("**First Attempt:** `failure`",
gh_second.created[0]["body"])
def
test_only_explicit_pass_closes_open_issue_not_cancelled_or_missing(self):
open_issues = [
diff --git a/.github/workflows/test_behavior_binding_c.yml
b/.github/workflows/test_behavior_binding_c.yml
index b7abf56085..8d98a59bf5 100644
--- a/.github/workflows/test_behavior_binding_c.yml
+++ b/.github/workflows/test_behavior_binding_c.yml
@@ -52,6 +52,9 @@ jobs:
fail-fast: false
matrix:
cases: ${{ fromJson(inputs.cases) }}
+ env:
+ # The runner uses composite inputs when it evaluates continue-on-error.
+ RETRY_ENABLED: ${{ inputs.retry_attempts > 1 }}
steps:
- uses: actions/checkout@v7
- name: Setup Rust toolchain
@@ -82,7 +85,7 @@ jobs:
- name: Test Core
id: test
- continue-on-error: ${{ inputs.retry_attempts > 1 }}
+ continue-on-error: ${{ env.RETRY_ENABLED == 'true' }}
uses: ./.github/actions/test_behavior_binding_c
with:
setup: ${{ matrix.cases.setup }}
diff --git a/.github/workflows/test_behavior_binding_cpp.yml
b/.github/workflows/test_behavior_binding_cpp.yml
index ddc56da10f..213f1d89e1 100644
--- a/.github/workflows/test_behavior_binding_cpp.yml
+++ b/.github/workflows/test_behavior_binding_cpp.yml
@@ -52,6 +52,9 @@ jobs:
fail-fast: false
matrix:
cases: ${{ fromJson(inputs.cases) }}
+ env:
+ # The runner uses composite inputs when it evaluates continue-on-error.
+ RETRY_ENABLED: ${{ inputs.retry_attempts > 1 }}
steps:
- uses: actions/checkout@v7
- name: Setup Rust toolchain
@@ -100,7 +103,7 @@ jobs:
- name: Test Core
id: test
- continue-on-error: ${{ inputs.retry_attempts > 1 }}
+ continue-on-error: ${{ env.RETRY_ENABLED == 'true' }}
uses: ./.github/actions/test_behavior_binding_cpp
with:
setup: ${{ matrix.cases.setup }}
diff --git a/.github/workflows/test_behavior_binding_dotnet.yml
b/.github/workflows/test_behavior_binding_dotnet.yml
index b66eb8ae14..92e92043c7 100644
--- a/.github/workflows/test_behavior_binding_dotnet.yml
+++ b/.github/workflows/test_behavior_binding_dotnet.yml
@@ -52,6 +52,9 @@ jobs:
fail-fast: false
matrix:
cases: ${{ fromJson(inputs.cases) }}
+ env:
+ # The runner uses composite inputs when it evaluates continue-on-error.
+ RETRY_ENABLED: ${{ inputs.retry_attempts > 1 }}
steps:
- uses: actions/checkout@v7
- name: Setup dotnet toolchain
@@ -78,7 +81,7 @@ jobs:
- name: Test Core
id: test
- continue-on-error: ${{ inputs.retry_attempts > 1 }}
+ continue-on-error: ${{ env.RETRY_ENABLED == 'true' }}
uses: ./.github/actions/test_behavior_binding_dotnet
with:
setup: ${{ matrix.cases.setup }}
diff --git a/.github/workflows/test_behavior_binding_go.yml
b/.github/workflows/test_behavior_binding_go.yml
index 71fb2277ee..73fff03500 100644
--- a/.github/workflows/test_behavior_binding_go.yml
+++ b/.github/workflows/test_behavior_binding_go.yml
@@ -67,6 +67,9 @@ jobs:
fail-fast: false
matrix:
cases: ${{ fromJson(inputs.cases) }}
+ env:
+ # The runner uses composite inputs when it evaluates continue-on-error.
+ RETRY_ENABLED: ${{ inputs.retry_attempts > 1 }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@v7
@@ -117,7 +120,7 @@ jobs:
go work use ./opendal/bindings/go/tests/behavior_tests
- name: Test Core
id: test
- continue-on-error: ${{ inputs.retry_attempts > 1 }}
+ continue-on-error: ${{ env.RETRY_ENABLED == 'true' }}
uses: ./.github/actions/test_behavior_binding_go
with:
setup: ${{ matrix.cases.setup }}
diff --git a/.github/workflows/test_behavior_binding_java.yml
b/.github/workflows/test_behavior_binding_java.yml
index ed067e6c63..a32f71dc8a 100644
--- a/.github/workflows/test_behavior_binding_java.yml
+++ b/.github/workflows/test_behavior_binding_java.yml
@@ -76,6 +76,9 @@ jobs:
fail-fast: false
matrix:
cases: ${{ fromJson(inputs.cases) }}
+ env:
+ # The runner uses composite inputs when it evaluates continue-on-error.
+ RETRY_ENABLED: ${{ inputs.retry_attempts > 1 }}
steps:
- uses: actions/checkout@v7
- name: Setup Rust toolchain
@@ -107,7 +110,7 @@ jobs:
- name: Test Core
id: test
- continue-on-error: ${{ inputs.retry_attempts > 1 }}
+ continue-on-error: ${{ env.RETRY_ENABLED == 'true' }}
uses: ./.github/actions/test_behavior_binding_java
with:
setup: ${{ matrix.cases.setup }}
diff --git a/.github/workflows/test_behavior_binding_nodejs.yml
b/.github/workflows/test_behavior_binding_nodejs.yml
index d5b2935b9d..a12f258cdf 100644
--- a/.github/workflows/test_behavior_binding_nodejs.yml
+++ b/.github/workflows/test_behavior_binding_nodejs.yml
@@ -77,6 +77,9 @@ jobs:
fail-fast: false
matrix:
cases: ${{ fromJson(inputs.cases) }}
+ env:
+ # The runner uses composite inputs when it evaluates continue-on-error.
+ RETRY_ENABLED: ${{ inputs.retry_attempts > 1 }}
steps:
- uses: actions/checkout@v7
- name: Setup Rust toolchain
@@ -114,7 +117,7 @@ jobs:
- name: Test Core
id: test
- continue-on-error: ${{ inputs.retry_attempts > 1 }}
+ continue-on-error: ${{ env.RETRY_ENABLED == 'true' }}
uses: ./.github/actions/test_behavior_binding_nodejs
with:
setup: ${{ matrix.cases.setup }}
diff --git a/.github/workflows/test_behavior_binding_python.yml
b/.github/workflows/test_behavior_binding_python.yml
index f2b42274c9..f0a172c2bd 100644
--- a/.github/workflows/test_behavior_binding_python.yml
+++ b/.github/workflows/test_behavior_binding_python.yml
@@ -73,6 +73,9 @@ jobs:
fail-fast: false
matrix:
cases: ${{ fromJson(inputs.cases) }}
+ env:
+ # The runner uses composite inputs when it evaluates continue-on-error.
+ RETRY_ENABLED: ${{ inputs.retry_attempts > 1 }}
steps:
- uses: actions/checkout@v7
- name: Setup Rust toolchain
@@ -115,7 +118,7 @@ jobs:
- name: Test Core
id: test
- continue-on-error: ${{ inputs.retry_attempts > 1 }}
+ continue-on-error: ${{ env.RETRY_ENABLED == 'true' }}
uses: ./.github/actions/test_behavior_binding_python
with:
setup: ${{ matrix.cases.setup }}
diff --git a/.github/workflows/test_behavior_binding_ruby.yml
b/.github/workflows/test_behavior_binding_ruby.yml
index 7e6c3fa82d..0a4c369766 100644
--- a/.github/workflows/test_behavior_binding_ruby.yml
+++ b/.github/workflows/test_behavior_binding_ruby.yml
@@ -93,6 +93,8 @@ jobs:
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all
steps
BUNDLE_GEMFILE: ${{ github.workspace }}/bindings/ruby/Gemfile
+ # The runner uses composite inputs when it evaluates continue-on-error.
+ RETRY_ENABLED: ${{ inputs.retry_attempts > 1 }}
steps:
- uses: actions/checkout@v7
@@ -121,7 +123,7 @@ jobs:
- name: Test service
id: test
- continue-on-error: ${{ inputs.retry_attempts > 1 }}
+ continue-on-error: ${{ env.RETRY_ENABLED == 'true' }}
uses: ./.github/actions/test_behavior_binding_ruby
with:
setup: ${{ matrix.cases.setup }}
diff --git a/.github/workflows/test_behavior_core.yml
b/.github/workflows/test_behavior_core.yml
index f9d8f001af..fbe5827aa3 100644
--- a/.github/workflows/test_behavior_core.yml
+++ b/.github/workflows/test_behavior_core.yml
@@ -48,6 +48,9 @@ jobs:
fail-fast: false
matrix:
cases: ${{ fromJson(inputs.cases) }}
+ env:
+ # The runner uses composite inputs when it evaluates continue-on-error.
+ RETRY_ENABLED: ${{ inputs.retry_attempts > 1 }}
steps:
- uses: actions/checkout@v7
- name: Setup Rust toolchain
@@ -60,7 +63,7 @@ jobs:
- name: Test Core
id: test
- continue-on-error: ${{ inputs.retry_attempts > 1 }}
+ continue-on-error: ${{ env.RETRY_ENABLED == 'true' }}
uses: ./.github/actions/test_behavior_core
with:
setups: ${{ join(matrix.cases.setups, ',') }}
diff --git a/.github/workflows/test_behavior_integration_object_store.yml
b/.github/workflows/test_behavior_integration_object_store.yml
index c923419b1f..9e91635de0 100644
--- a/.github/workflows/test_behavior_integration_object_store.yml
+++ b/.github/workflows/test_behavior_integration_object_store.yml
@@ -52,6 +52,9 @@ jobs:
fail-fast: false
matrix:
cases: ${{ fromJson(inputs.cases) }}
+ env:
+ # The runner uses composite inputs when it evaluates continue-on-error.
+ RETRY_ENABLED: ${{ inputs.retry_attempts > 1 }}
steps:
- uses: actions/checkout@v7
- name: Setup Rust toolchain
@@ -73,7 +76,7 @@ jobs:
- name: Test Core
id: test
- continue-on-error: ${{ inputs.retry_attempts > 1 }}
+ continue-on-error: ${{ env.RETRY_ENABLED == 'true' }}
uses: ./.github/actions/test_behavior_integration_object_store
with:
setup: ${{ matrix.cases.setup }}