Skip to content

ci(nexus): per-mod success/fail status in upload summary#2260

Merged
alandtse merged 2 commits into
community-shaders:devfrom
alandtse:fix/nexus-summary-per-mod-status
May 2, 2026
Merged

ci(nexus): per-mod success/fail status in upload summary#2260
alandtse merged 2 commits into
community-shaders:devfrom
alandtse:fix/nexus-summary-per-mod-status

Conversation

@alandtse
Copy link
Copy Markdown
Collaborator

@alandtse alandtse commented May 2, 2026

Summary

  • The upload summary was using needs.upload-to-nexus.result (aggregate) which only reports pass/fail for the entire matrix, with no per-mod breakdown
  • Replace with a post-upload Nexus API query (same approach as the dry-run version check) that checks whether each mod's target version actually landed
  • Summary now shows ✅/❌ per feature, with artifact name shown only for failures and a re-run reminder

Example output when some fail:

⚠️ 2 upload(s) failed, 7 succeeded

| Status | Feature      | Version | Nexus  | Artifact               |
|--------|--------------|---------|--------|------------------------|
| ✅     | Cloud Shadows | 1.3.0  | View   | —                      |
| ❌     | Upscaling     | 1.3.0  | View   | `nexus-upload-Upscaling` |

Test plan

  • Trigger real upload run and verify summary shows per-mod status

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved upload summary logic: outcomes are now validated by querying existing artifact versions, classifying each upload as succeeded, failed, or unknown.
    • Summary now reports accurate counts of failures/unknowns versus successes.
    • Upload result table was reformatted to include a status column and only show artifact links for failed/unknown entries.

Replace the aggregate pass/fail summary with a Nexus API check that
queries each mod's actual file list after upload. The summary now shows
✅/❌ per feature, lists the artifact name only for failures, and keeps
the re-run instruction when any failed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 825a1455-3170-409c-96bb-54453400bdf7

📥 Commits

Reviewing files that changed from the base of the PR and between 20b5d3d and 20dd126.

📒 Files selected for processing (1)
  • .github/workflows/upload-nexus.yaml

📝 Walkthrough

Walkthrough

The "Report upload result" step in the Upload Summary job was refactored to query the Nexus API per matrix feature (via nexus_versions(mod_id)) and compare planned versions against Nexus' /files.json, classifying rows as uploaded, failed, or unknown and regenerating the summary/table without relying on UPLOAD_RESULT.

Changes

Nexus Upload Verification

Layer / File(s) Summary
API Query Helper
/.github/workflows/upload-nexus.yaml
Adds nexus_versions(mod_id) to fetch and parse Nexus /files.json for a module to extract available versions.
Status Determination
/.github/workflows/upload-nexus.yaml
Replaces UPLOAD_RESULT branching: per-feature status computed by checking planned mod_version (or VERSION) against Nexus-returned versions; outcomes: uploaded, failed, unknown.
Environment / Wiring
/.github/workflows/upload-nexus.yaml
Removes UPLOAD_RESULT from the step env and adds UNEX_APIKEY so the script can query Nexus; matrix data fed into the script unchanged otherwise.
Output & Reporting
/.github/workflows/upload-nexus.yaml
Summary counts and message updated; results table now has `Status

Sequence Diagram

sequenceDiagram
    participant Job as GitHub Actions Job
    participant Script as Report Python Script
    participant Nexus as Nexus API

    Job->>Script: Invoke report step with matrix rows + UNEX_APIKEY
    activate Script
    loop For each feature row
        Script->>Nexus: GET /modules/{mod_id}/files.json (uses UNEX_APIKEY)
        activate Nexus
        Nexus-->>Script: Return files.json (or error)
        deactivate Nexus
        Script->>Script: Parse versions, compare planned version
        Script-->>Script: Classify as uploaded / failed / unknown
    end
    Script->>Job: Emit status table & summary counts
    deactivate Script
Loading

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly Related PRs

Suggested Reviewers

  • SkrubbySkrubInAShrub
  • davo0411

Poem

🐰🌿 I hopped to Nexus, sniffed each file,
Compared the tags and paused a while,
If versions match I give a cheer,
If not, I flag them loud and clear,
A tidy table now makes it worthwhile.

🚥 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 accurately describes the main change: implementing per-mod success/fail status tracking in the upload summary workflow, replacing aggregate matrix status with per-feature API verification.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 actionlint (1.7.12)
.github/workflows/upload-nexus.yaml

could not read ".github/workflows/upload-nexus.yaml": open .github/workflows/upload-nexus.yaml: no such file or directory

🔧 YAMLlint (1.38.0)
.github/workflows/upload-nexus.yaml

[Errno 2] No such file or directory: '.github/workflows/upload-nexus.yaml'

🔧 Checkov (3.2.525)
.github/workflows/upload-nexus.yaml

2026-05-02 06:36:31,864 [MainThread ] [ERROR] Template file not found: .github/workflows/upload-nexus.yaml
2026-05-02 06:36:31,866 [MainThread ] [ERROR] Template file not found: .github/workflows/upload-nexus.yaml
2026-05-02 06:36:31,893 [MainThread ] [ERROR] Template file not found: .github/workflows/upload-nexus.yaml
2026-05-02 06:36:31,901 [MainThread ] [ERROR] Failed to invoke function /usr/local/lib/python3.11/dist-packages/checkov/common/runners/object_runner. with .github/workflows/upload-nexus.yaml
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/checkov/common/parallelizer/parallel_runner.py", line 88, in func_wrapper
result = original_func(item)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/checkov/common/runners/object_runner.py", line 74, in
results = parallel_runner.run_function(lambda f: (f, self._parse_file(f)), files_to_load)

... [truncated 9182 characters] ...

or directory: '.github/workflows/upload-nexus.yaml'
2026-05-02 06:36:31,945 [MainThread ] [ERROR] Exception traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/checkov/main.py", line 647, in run
self.scan_reports = runner_registry.run(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/checkov/common/runners/runner_registry.py", line 177, in run
for result in parallel_runner_results:
File "/usr/local/lib/python3.11/dist-packages/checkov/common/parallelizer/parallel_runner.py", line 118, in _run_function_multiprocess_fork
raise v.internal_exception.with_traceback(v.internal_exception.traceback)
FileNotFoundError: [Errno 2] No such file or directory: '.github/workflows/upload-nexus.yaml'


Review rate limit: 9/10 reviews remaining, refill in 6 minutes.

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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

No actionable suggestions for changed features.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/upload-nexus.yaml (1)

429-448: 💤 Low value

Consider filtering for MAIN category files to match the dry-run check.

The dry-run version check (lines 333-340) filters for category_name == 'MAIN' before collecting versions, but this function collects versions from all files. This inconsistency could produce different version lists in edge cases.

♻️ Optional: align with dry-run filtering
                  def nexus_versions(mod_id):
                      if not api_key or not mod_id:
                          return None
                      url = f'https://api.nexusmods.com/v1/games/{game_id}/mods/{mod_id}/files.json'
                      req = urllib.request.Request(url, headers={
                          'apikey': api_key,
                          'User-Agent': 'community-shaders-ci/1.0',
                          'Accept': 'application/json',
                      })
                      try:
                          with urllib.request.urlopen(req, timeout=15) as resp:
                              files = json.load(resp).get('files', [])
+                         main = [f for f in files if f.get('category_name') == 'MAIN']
+                         check = main if main else files
                          seen = []
-                         for f in files:
+                         for f in check:
                              v = f.get('version', '')
                              if v and v not in seen:
                                  seen.append(v)
                          return seen
                      except Exception:
                          return None
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/upload-nexus.yaml around lines 429 - 448, The
nexus_versions function collects versions from all files but the dry-run check
filters for files with category_name == 'MAIN', causing inconsistency; update
nexus_versions to only consider files where f.get('category_name') == 'MAIN'
(e.g., inside the for f in files loop, skip entries without category_name ==
'MAIN') before extracting f.get('version') and appending unique values to seen
so the returned version list matches the dry-run logic in the other check.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/upload-nexus.yaml:
- Around line 450-468: The loop that checks nexus_versions(mod_id) currently
only appends labels to succeeded or failed and leaves 'unknown' items untracked,
causing a misleading "All 0 ... completed successfully" summary; add an unknowns
list (e.g., unknown = []) and append label when versions is None (inside the
versions is None branch), then update the summary generation logic that reads
succeeded/failed to also consider unknown (show a distinct message or include
unknown count and not claim all succeeded when unknowns exist). Refer to the
variables/slots rows, rows_status, succeeded, failed, nexus_versions(mod_id),
and the status/icon branches to locate where to append to unknown and where to
adjust the summary text.

---

Nitpick comments:
In @.github/workflows/upload-nexus.yaml:
- Around line 429-448: The nexus_versions function collects versions from all
files but the dry-run check filters for files with category_name == 'MAIN',
causing inconsistency; update nexus_versions to only consider files where
f.get('category_name') == 'MAIN' (e.g., inside the for f in files loop, skip
entries without category_name == 'MAIN') before extracting f.get('version') and
appending unique values to seen so the returned version list matches the dry-run
logic in the other check.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3952d4b4-de13-4d12-9f5b-06d2f13ca49b

📥 Commits

Reviewing files that changed from the base of the PR and between a7eae21 and 20b5d3d.

📒 Files selected for processing (1)
  • .github/workflows/upload-nexus.yaml

Comment thread .github/workflows/upload-nexus.yaml Outdated
@alandtse alandtse changed the title fix(nexus): per-mod success/fail status in upload summary ci(nexus): per-mod success/fail status in upload summary May 2, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

✅ A pre-release build is available for this PR:
Download

- Filter MAIN-category files first in nexus_versions() (matches dry-run
  check behavior); fall back to all files when no MAIN entries exist
- Track unknown (API-unreachable) items in their own list so the
  headline never reads "All 0 succeeded" when all API calls fail
- Show artifact name for unknown rows so re-uploaders know which
  artifact to grab
- Extend re-run hint to unknown results, not just failures

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@alandtse alandtse merged commit aea8df2 into community-shaders:dev May 2, 2026
14 checks passed
ParticleTroned added a commit to ParticleTroned/skyrim-community-shaders that referenced this pull request May 15, 2026
ParticleTroned added a commit to ParticleTroned/skyrim-community-shaders that referenced this pull request May 16, 2026
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