You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ascheman (via GitHub)" <gi...@apache.org> on 2026/09/08 15:22:12 UTC

[PR] Skip flaky consolidate-caches on PRs; never fail the run [maven]

ascheman opened a new pull request, #13079:
URL: https://github.com/apache/maven/pull/13079

   The `consolidate-caches` job reds the whole CI run when a transient GitHub artifact-download flake hits its `Download Caches` step (`actions/download-artifact`, ~2 GB of `cache-<os>*` per OS), even though the entire build + IT matrix is green:
   
   ```
   ##[error]Unable to download artifact(s): … Artifact download failed after 5 retries.
   ```
   
   The job's only real output — `Publish cache` — is already gated `if: github.event_name != 'pull_request'`, so on a PR it downloads ~2 GB just to discard it, and its sole failure mode is this flake.
   
   This:
   - **skips the job on `pull_request`** (`if: ${{ github.event_name != 'pull_request' }}`) — no payoff there + saves the ~2 GB download per PR run;
   - **`continue-on-error: true`** so on non-PR runs the flake never reds the run — the consolidated cache is best-effort (the next run rebuilds it).
   
   Discussed on Slack with @sjaranowski and @cstamas (both OK with the approach). Example failing run: https://github.com/apache/maven/actions/runs/34209185905
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Skip flaky consolidate-caches on PRs; never fail the run [maven]

Posted by "ascheman (via GitHub)" <gi...@apache.org>.
ascheman merged PR #13079:
URL: https://github.com/apache/maven/pull/13079


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Skip flaky consolidate-caches on PRs; never fail the run [maven]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13079:
URL: https://github.com/apache/maven/pull/13079#discussion_r3959719856


##########
.github/workflows/maven.yml:
##########
@@ -353,6 +353,14 @@ jobs:
             ~/.mimir/*.log
 
   consolidate-caches:
+    # This job downloads the per-job cache artifacts to publish a single consolidated
+    # cache. The "Publish cache" step below is already gated to non-PR events, so on a
+    # pull_request the job has nothing to publish and only risks a flaky ~2 GB artifact
+    # download (actions/download-artifact "failed after 5 retries"). Skip it on PRs, and
+    # keep it non-fatal elsewhere: the consolidated cache is best-effort (the next run
+    # rebuilds it), so a transient download flake must never fail the whole run.
+    if: ${{ github.event_name != 'pull_request' }}

Review Comment:
   GitHub Actions `if:` conditions are already evaluated as expressions, so the `${{ }}` wrapper is unnecessary here. Using `if: github.event_name != 'pull_request'` matches the documented idiom and avoids any ambiguity about string vs expression parsing in YAML contexts.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org