ci(nexus): per-mod success/fail status in upload summary#2260
Conversation
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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe "Report upload result" step in the Upload Summary job was refactored to query the Nexus API per matrix feature (via ChangesNexus Upload Verification
Sequence DiagramsequenceDiagram
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
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly Related PRs
Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.yamlcould 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.yaml2026-05-02 06:36:31,864 [MainThread ] [ERROR] Template file not found: .github/workflows/upload-nexus.yaml ... [truncated 9182 characters] ... or directory: '.github/workflows/upload-nexus.yaml' Review rate limit: 9/10 reviews remaining, refill in 6 minutes. Comment |
|
No actionable suggestions for changed features. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/upload-nexus.yaml (1)
429-448: 💤 Low valueConsider 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
📒 Files selected for processing (1)
.github/workflows/upload-nexus.yaml
|
✅ A pre-release build is available for this PR: |
- 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>
…haders#2260) Adapted from PR community-shaders#2260 onto this branch's Nexus upload workflow.
…haders#2260) Adapted from PR community-shaders#2260 onto this branch's Nexus upload workflow.
Summary
needs.upload-to-nexus.result(aggregate) which only reports pass/fail for the entire matrix, with no per-mod breakdownExample output when some fail:
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit