ci(license-exceptions): harden decision-workflow parser and untrack stale site/exceptions.json - #1511
Merged
Merged
Conversation
site/exceptions.json is a build/test artifact: pretest copies the canonical exceptions.json in and posttest removes it, and the Netlify build overwrites it. The tracked copy was stale (2026-06-01, 487 entries vs 494) and running npm test left the tree dirty. Ignore it instead. Signed-off-by: Jeffrey Sica <me@jeefy.dev>
… workflow - Keep empty table cells so column positions stay stable. Previously .filter(c => c) dropped blanks, so an empty Upstream URL shifted the license value into the wrong field. - Unwrap markdown links ([text](url)) and <url> in the Upstream URL column so packageUrl is a bare URL. - Only set comment when the cell is non-empty. Verified against the body of cncf#1482 and a synthetic row with an empty cell. Signed-off-by: Jeffrey Sica <me@jeefy.dev>
…orkflow The repo enforces DCO; the first real run (cncf#1512) failed the DCO check because the generated commit had no Signed-off-by trailer. Signed-off-by: Jeffrey Sica <me@jeefy.dev>
jeefy
force-pushed
the
fix/license-exception-workflow-hygiene
branch
from
September 7, 2026 04:30
3517e5d to
21230bb
Compare
…-origin reads Downstream consumers were fetching site/exceptions.json from raw.githubusercontent.com, which is a build artifact and had drifted from the source of truth. Document https://exceptions.cncf.io/ as the place to fetch JSON/CSV/SPDX from and add Access-Control-Allow-Origin on those three files so browser-based consumers can use it too. Signed-off-by: Jeffrey Sica <me@jeefy.dev>
Decision PRs are intentionally not auto-merged; assign them so they land in the reviewer's queue rather than sitting unowned. Signed-off-by: Jeffrey Sica <me@jeefy.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
While verifying the
License Exception Decisionworkflow (the one that updatesexceptions.json/ CSV / SPDX when a decision label is applied), I found it has never actually executed — all 7 historical runs areskippedbecause the label guard didn't match until #69bbe5b. The parser and generator do work when dry-run offline, but two hygiene issues surfaced:1. Parser: empty table cells shift columns
row.split('|').map(trim).filter(c => c)dropped blank cells, so a request with an empty Upstream URL column would put the Project Usage URL intopackageUrland the License into... the wrong field entirely (licensewould become the Purpose text). Now only the leading/trailing pipes are stripped and positions are preserved.Also unwraps markdown links (
[grafana/k6](https://github.com/grafana/k6)→ bare URL) and<url>in the URL column, and only setscommentwhen non-empty.Verified by extracting the exact
github-scriptblock from the YAML and running it against the real body of #1482 plus a synthetic table with an empty cell and no leading pipe.2.
site/exceptions.jsonwas tracked but is a build artifactpretestcopies the canonical file in andposttestdeletes it; the Netlify build overwrites it. The committed copy was stale (2026-06-01, 487 entries vs 494) and everynpm testleft the tree dirty. Removed and gitignored —app.jsalready falls back to../exceptions.json.4. Publish the canonical data URL
A downstream consumer was fetching
site/exceptions.jsonviaraw.githubusercontent.com(and therefore getting the stale copy). README now documentshttps://exceptions.cncf.io/{exceptions.json,CNCF-licensing-exceptions.csv,cncf-exceptions-current.spdx}as the URLs to consume, andnetlify.tomladdsAccess-Control-Allow-Origin: *on those three files.5. Assign generated PRs
Decision PRs stay as PRs (no auto-merge; the
mainruleset requires a PR anyway) and are now assigned to @joannalee333 so they have an owner. #1512 was assigned manually.Test plan
site/exceptions.jsonremovednode scripts/generate-all.jsidempotent (no diff)license-exception/not-eligibleto [License Exception Request] [OpenTelemetry Demo] [AGPL-3.0-only] #1482 (decision by @joannalee333 on 2026-08-19) -> workflow succeeded and opened Record license exception decision (not-eligible) for OpenTelemetry (OpenTelemetry Demo, https://github.com/open-telemetry/opentelemetry-demo) (#1482) #1512 (not-eligible, 1 entry). That run exposed a third issue, also fixed here.3. Generated commit lacks DCO sign-off
#1512 fails the repo's DCO check because the
create-pull-requestcommit has noSigned-off-by. Addedsignoff: true.Not addressed here
peter-evans/create-pull-requestusesGITHUB_TOKEN, so the PRs it opens won't triggervalidate-exceptions/ E2E on themselves. Worth a PAT or GitHub App token as a follow-up.