Skip to content

fix(ci): publish PR plugin after unrelated failures - #2046

Merged
Eli Bosley (elibosley) merged 1 commit into
mainfrom
fix/pr-plugin-upload-gating
Jul 21, 2026
Merged

fix(ci): publish PR plugin after unrelated failures#2046
Eli Bosley (elibosley) merged 1 commit into
mainfrom
fix/pr-plugin-upload-gating

Conversation

@elibosley

@elibosley Eli Bosley (elibosley) commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

PR plugin previews were not published when any unrelated CI job failed; this changes the upload workflow to publish whenever the upstream PR run produced a plugin artifact.

Why This Exists

The PR 2044 plugin built successfully, but an Audit Dependencies failure made the aggregate workflow conclusion fail. The upload workflow required an overall success conclusion, so it skipped and left the advertised preview URL returning 404.

Resolution

Run the uploader for every completed pull-request workflow and use the plugin artifact itself as the gate. If the artifact exists, publication proceeds even when another job failed. If no artifact exists, the workflow records a notice and cleanly skips extraction, upload, and commenting.

Reviewer Considerations

  • Confirm artifact presence is the correct boundary for publishing a test-only PR preview.
  • Upload validation, Cloudflare credentials, and file checks remain unchanged.
  • This does not weaken merge protection or alter the status of unrelated CI failures.

Behavior Changes

A successfully built PR plugin is uploaded to the preview bucket even when another job in the upstream workflow fails. PR runs without a plugin artifact do not attempt an upload.

Implementation Summary

  • Removed aggregate workflow success from the uploader job condition.
  • Added an explicit artifact-found output.
  • Conditioned extraction, Cloudflare upload, and PR commenting on that output.

Verification

  • git diff --check passed.
  • actionlint .github/workflows/upload-pr-plugin.yml passed.
  • The repository pre-commit hook could not run because lint-staged is not installed in this isolated worktree; the workflow-specific validations above passed.

Risk

Low; the change only broadens preview publication to already-produced artifacts and retains all existing artifact and file validation.

Summary by CodeRabbit

  • Bug Fixes
    • Improved pull request validation workflows to gracefully handle missing plugin artifacts.
    • Prevented unnecessary upload attempts and pull request comments when no plugin artifact is available.
    • Workflows now continue without failure when the expected artifact is absent.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@elibosley
Eli Bosley (elibosley) merged commit a2b0833 into main Jul 21, 2026
6 of 8 checks passed
@elibosley
Eli Bosley (elibosley) deleted the fix/pr-plugin-upload-gating branch July 21, 2026 21:00
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3bef8144-f623-411a-9f02-084e37e917ea

📥 Commits

Reviewing files that changed from the base of the PR and between 9bc9f0a and bea4051.

📒 Files selected for processing (1)
  • .github/workflows/upload-pr-plugin.yml

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


Walkthrough

The plugin upload workflow now treats a missing unraid-plugin artifact as non-fatal and skips extraction, Cloudflare upload, and PR commenting unless the artifact is found.

Changes

Plugin artifact flow

Layer / File(s) Summary
Workflow eligibility and artifact output
.github/workflows/upload-pr-plugin.yml
The workflow condition no longer requires a successful workflow_run conclusion, and the download step exposes an artifact-found output.
Conditional plugin processing
.github/workflows/upload-pr-plugin.yml
Missing artifacts generate a notice instead of failing; extraction, upload, and URL commenting require a found artifact.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • unraid/api#2014: Introduced the related plugin artifact download and downstream workflow handling.

Suggested reviewers: simonfair

Poem

A bunny found no plugin in sight,
So skipped the upload with gentle delight.
No failure, no comment, no cloud-bound fare—
Just a quiet notice floating there.
When artifacts hop back in the queue,
The workflow knows just what to do.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pr-plugin-upload-gating

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 requested a review from SimonFair July 21, 2026 21:00
@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 52.90%. Comparing base (9bc9f0a) to head (bea4051).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2046   +/-   ##
=======================================
  Coverage   52.90%   52.90%           
=======================================
  Files        1035     1035           
  Lines       72088    72088           
  Branches     8313     8313           
=======================================
  Hits        38135    38135           
  Misses      33826    33826           
  Partials      127      127           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@github-actions

Copy link
Copy Markdown
Contributor

This plugin has been deployed to Cloudflare R2 and is available for testing.
Download it at this URL:

https://preview.dl.unraid.net/unraid-api/tag/PR2046/dynamix.unraid.net.plg

Eli Bosley (elibosley) pushed a commit that referenced this pull request Jul 21, 2026
🤖 I have created a release *beep* *boop*
---


## [4.36.0](v4.35.1...v4.36.0)
(2026-07-21)


### Features

* add docker restart mutation
([#2022](#2022))
([b58120c](b58120c))
* update dependencies
([#2028](#2028))
([1c8522d](1c8522d))


### Bug Fixes

* **ci:** publish PR plugin after unrelated failures
([#2046](#2046))
([a2b0833](a2b0833))
* **ci:** resolve PR number for fork PR plugin uploads
([#2040](#2040))
([a086778](a086778))
* **ui:** smooth notification drawer slide-in/out
([#2038](#2038))
([66e86fe](66e86fe))
* **web:** send CSRF token on fetch-based webGUI requests
([#2039](#2039))
([8cb15f1](8cb15f1))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Eli Bosley (elibosley) added a commit that referenced this pull request Jul 22, 2026
## Summary
The `Audit Dependencies` job (`pnpm run audit --prod`) fails the entire
**CI - Main (API)** workflow whenever a transitive production dependency
has an open advisory. This turned the [4.36.0 release
run](https://github.com/unraid/api/actions/runs/29869430785) red over
unrelated advisories (`hono`, `fast-uri`, `immutable`) and required
manual recovery of the production publish. This change marks the audit
job `continue-on-error` so it can never block a release again.

## Why This Exists
`audit` is not in any publish job's `needs`, so it doesn't gate
publishing through the dependency graph — it blocks by turning the
**aggregate workflow conclusion** red, which branch protection,
downstream `workflow_run` gates, and humans all key off of. This is the
same class of failure already patched for PR plugin previews in #2046,
whose commit note reads: *"an Audit Dependencies failure made the
aggregate workflow conclusion fail."* Rather than papering over the
three current advisories in the ignore list, this keeps the audit fully
decoupled from the publish path.

## Resolution
Add `continue-on-error: true` to the `audit` job. The audit still runs
on every PR and push and still surfaces vulnerable dependencies as step
annotations and logs, but a finding no longer fails the workflow.

## Behavior Changes
- A dependency advisory no longer fails **CI - Main (API)** or blocks a
release/publish.
- The `Audit Dependencies` job now reports success (with the failing
step annotated) even when advisories are present.

## Trade-off
The audit becomes advisory-only: a genuinely high/critical advisory will
also no longer block a release. Individual advisories can still be
triaged/suppressed via the existing `pnpm.auditConfig` (`ignoreCves` /
`ignoreGhsas`) mechanism in `package.json` if a hard gate on specific
CVEs is ever wanted.

## Verification
- `actionlint .github/workflows/main.yml` reports only pre-existing
shellcheck/type notes in untouched jobs; no new issues from this change.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Dependency audit checks are now advisory and will no longer block the
workflow when issues are detected.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.

1 participant