Skip to content

fix: remove stray newline from burr/examples symlink target#748

Merged
elijahbenizzy merged 5 commits into
mainfrom
fix/burr-examples-symlink
Apr 26, 2026
Merged

fix: remove stray newline from burr/examples symlink target#748
elijahbenizzy merged 5 commits into
mainfrom
fix/burr-examples-symlink

Conversation

@elijahbenizzy
Copy link
Copy Markdown
Contributor

Summary

The burr/examples symlink in this repo has been committed with target ../examples\n (12 bytes — note the trailing newline) instead of ../examples (11 bytes). Most tools tolerate it, but a few don't:

  • Apache RAT crashes when run against the source tarball: it walks the symlink, gets ../examples\n as the target, can't find that path, and raises FileNotFoundException.
  • Strict tarball extractors on Linux fail to resolve the symlink.

This is the bug that took down the build-artifacts step in our release-validation workflow when we built RC3 artifacts from latest main.

The fix recreates the symlink via rm burr/examples && ln -s ../examples burr/examples. The diff GitHub will render is "two identical-looking lines" — but with a "No newline at end of file" marker on the new side, which is the indicator that the blob is exactly 11 bytes.

Verification

git cat-file -p $(git ls-tree HEAD burr/examples | awk '{print $3}') | wc -c
# 11

Before this fix that would print 12.

Test plan

  • CI passes
  • Confirm a fresh git archive HEAD extracted on Linux resolves burr/examples/__init__.py

The burr/examples symlink was committed with target '../examples\n'
(12 bytes) instead of '../examples' (11 bytes). Most tools tolerate
the trailing newline, but stricter consumers (Java's FileReader via
Apache RAT, some Linux extractors of the source tarball) treat
'../examples\n' as a literal nonexistent target and fail.

Manifested in CI as a RAT crash on the source tarball produced by
git-archive: the symlink in the tarball points to '../examples\n',
which doesn't resolve, and RAT raises FileNotFoundException trying
to read it as a file.

Recreate the symlink via 'rm burr/examples && ln -s ../examples
burr/examples' to write the correct 11-byte target.
Previously, if RAT crashed partway through scanning (e.g. on the
broken burr/examples symlink that motivated this PR), the verify
script would print a warning, parse the truncated XML report, find
zero unapproved licenses in whatever RAT managed to scan before the
crash, and report success.

That false green is what hid the symlink corruption when PR #745
merged into main, even though our release-validation workflow
technically ran on main. The CI run scanned 14 files (out of ~700),
saw RAT exit code 1, swallowed it, and called the build green.

Treat any nonzero exit from RAT as a hard failure of license
verification. Print the last 25 lines of RAT stderr so the next
debug session has the trace immediately.
@github-actions github-actions Bot added the area/ci Workflows, build, release scripts label Apr 25, 2026
elijahbenizzy added a commit that referenced this pull request Apr 25, 2026
…hook

end-of-file-fixer mistreats the symlink as a regular text file and
appends '\n' to the link target, turning '../examples' (11 bytes) into
'../examples\n' (12 bytes). Strict consumers (Apache RAT, Linux tar
extractors) then fail to resolve the symlink. This is exactly the bug
that motivated PR #748 — without this exclude, the next pre-commit run
on a maintainer's machine would silently re-corrupt the symlink.

Also exclude trailing-whitespace defensively for the same reason.
…hook

end-of-file-fixer mistreats the symlink as a regular text file and
appends '\n' to the link target, turning '../examples' (11 bytes) into
'../examples\n' (12 bytes). Strict consumers (Apache RAT, Linux tar
extractors) then fail to resolve the symlink. This is exactly the bug
that motivated PR #748 — without this exclude, the next pre-commit run
on a maintainer's machine would silently re-corrupt the symlink.

Also exclude trailing-whitespace defensively for the same reason.
@elijahbenizzy elijahbenizzy force-pushed the fix/burr-examples-symlink branch from f4df928 to 8d45fbe Compare April 25, 2026 20:21
@elijahbenizzy elijahbenizzy enabled auto-merge (squash) April 25, 2026 20:22
…exts

GitHub branch protection matches the check_run.name field exactly. The
actual check names produced by our workflow are 'build-artifacts' and
'install-and-smoke (3.12)' — the 'Release Validation / ...' prefix
appears in the PR Checks tab UI but is not part of the check name.
With the prefixed names in .asf.yaml, branch protection is stuck on
'Expected — Waiting for status to be reported' even though the checks
have completed successfully.
Branch protection requires "Release Validation / build-artifacts" and
"Release Validation / install-and-smoke (3.12)" as exact context names.
Set the workflow's job 'name:' fields to match, so the check_run names
that GitHub reports satisfy those contexts directly.

Reverts the .asf.yaml change in 612f36b — the source of truth is the
prefixed names; align the workflow to them rather than the other way
around so this PR can land without admin override.
@elijahbenizzy elijahbenizzy merged commit b707b1d into main Apr 26, 2026
25 checks passed
@elijahbenizzy elijahbenizzy deleted the fix/burr-examples-symlink branch April 26, 2026 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci Workflows, build, release scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants