fix(forgejo): wg-pipeline survives runs calling one reusable N times #652

Open
ryangr0 wants to merge 1 commit from fix/wg-pipeline-orphan-depth into main
Owner

Reported on frontend-toolkit run 1 (the four semantic-release-monorepo trains): Cannot read properties of undefined (reading '6') at wg-pipeline.js:578:64, killing the whole pipeline view.

Root cause: skipped "<name>-1/-2/-3" duplicate jobs (one reusable called N times in a run) match no YAML job label and become orphan descriptors, which were pushed without a depthByIndex map; decorateRail then reads depthByIndex[idx] off undefined. Orphans now get an empty map, every read site is defensive, and the canary carries the same patch. node --check clean on both files.

🤖 Generated with Claude Code

Reported on frontend-toolkit run 1 (the four semantic-release-monorepo trains): `Cannot read properties of undefined (reading '6')` at wg-pipeline.js:578:64, killing the whole pipeline view. Root cause: skipped `"<name>-1/-2/-3"` duplicate jobs (one reusable called N times in a run) match no YAML job label and become orphan descriptors, which were pushed without a `depthByIndex` map; `decorateRail` then reads `depthByIndex[idx]` off `undefined`. Orphans now get an empty map, every read site is defensive, and the canary carries the same patch. `node --check` clean on both files. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(forgejo): wg-pipeline overleeft runs met N trains van één reusable
All checks were successful
e2e / Kyverno Chainsaw (KinD) (pull_request) Successful in 12s
e2e / Lint & static validation (pull_request) Successful in 1m5s
e2e / Validate Renovate config (pull_request) Successful in 1m39s
e2e / Flux-local render (pull_request) Successful in 1m33s
cf1dd9ad51
Een run die dezelfde reusable workflow meermaals aanroept (frontend-toolkit
run 1: vier semantic-release-monorepo-trains) levert geskipte
"<naam>-1/-2"-duplicaatjobs op die als orphan-descriptor binnenkomen — en
die kregen nooit een depthByIndex. decorateRail las vervolgens
depthByIndex[idx] van undefined en de hele visualisatie stierf met
"Cannot read properties of undefined (reading '6')". Orphans krijgen nu
een lege depthByIndex en elke leeslocatie is defensief; zelfde patch in de
canary.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
All checks were successful
e2e / Kyverno Chainsaw (KinD) (pull_request) Successful in 12s
Required
Details
e2e / Lint & static validation (pull_request) Successful in 1m5s
Required
Details
e2e / Validate Renovate config (pull_request) Successful in 1m39s
Required
Details
e2e / Flux-local render (pull_request) Successful in 1m33s
Required
Details
This pull request has changes conflicting with the target branch.
  • kubernetes/apps/forgejo/forgejo/app/custom/wg-pipeline-canary.js
  • kubernetes/apps/forgejo/forgejo/app/custom/wg-pipeline.js
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/wg-pipeline-orphan-depth:fix/wg-pipeline-orphan-depth
git switch fix/wg-pipeline-orphan-depth
Sign in to join this conversation.
No reviewers
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
webgrip/homelab-cluster!652
No description provided.