diff --git a/.github/workflows/release-validation.yml b/.github/workflows/release-validation.yml index cfa447319..375ff4dfa 100644 --- a/.github/workflows/release-validation.yml +++ b/.github/workflows/release-validation.yml @@ -52,7 +52,7 @@ permissions: jobs: build-artifacts: - name: build-artifacts + name: "Release Validation / build-artifacts" runs-on: ubuntu-latest timeout-minutes: 20 outputs: @@ -133,7 +133,7 @@ jobs: retention-days: 14 install-and-smoke: - name: install-and-smoke + name: "Release Validation / install-and-smoke" needs: build-artifacts runs-on: ubuntu-latest timeout-minutes: 10 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9450bab75..472ccd441 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,8 +32,17 @@ repos: rev: v4.5.0 hooks: - id: trailing-whitespace - # ensures files are either empty or end with a blank line + # burr/examples is a symlink. trailing-whitespace would mangle the + # link target text (treating "../examples" as a "trailing whitespace" + # situation) and break the symlink. + exclude: '^burr/examples$' + # ensures files are either empty or end with a blank line. + # NOTE: burr/examples is excluded — end-of-file-fixer will append "\n" + # to the symlink target turning "../examples" into "../examples\n", + # which makes the symlink unresolvable on strict consumers (Apache RAT + # and several Linux tarball extractors). See PR #748. - id: end-of-file-fixer + exclude: '^burr/examples$' # sorts requirements - id: requirements-txt-fixer # valid python file diff --git a/burr/examples b/burr/examples index beeced1f9..a6573af9c 120000 --- a/burr/examples +++ b/burr/examples @@ -1 +1 @@ -../examples +../examples \ No newline at end of file diff --git a/scripts/verify_apache_artifacts.py b/scripts/verify_apache_artifacts.py index 54350deb5..1939f7242 100755 --- a/scripts/verify_apache_artifacts.py +++ b/scripts/verify_apache_artifacts.py @@ -318,7 +318,15 @@ def _check_licenses_with_rat( ) if result.returncode != 0: - print(f" ⚠️ RAT exited with code {result.returncode}") + # A nonzero exit means RAT crashed mid-scan (e.g. on a broken + # symlink). The XML report it produced will be truncated and + # parsing it gives a falsely clean result, so fail hard here. + print(f" ✗ RAT exited with code {result.returncode}") + if result.stderr: + print(" --- RAT stderr ---") + for line in result.stderr.splitlines()[-25:]: + print(f" {line}") + return False print(f" ✓ RAT XML report: {rat_report_xml}") except Exception as e: