GitHub clang scan build portability - #34275
Conversation
Derive the fixed archive destination from the discovered repository root instead of a GitHub Actions path containing the canonical repository name. This keeps reports inside the checkout when a fork is renamed. AI-assisted: root cause analysis and patch drafted with OpenAI Codex.
autotest sets TMPDIR to the checkout tmp directory, but the workflow creates and uploads reports through a path containing the canonical repository name. Forks with another name therefore point scan-build at a directory that does not exist. Use GitHub's workspace path so the job is independent of repository name. AI-assisted: root cause analysis and patch drafted with OpenAI Codex.
|
Automated review note — AI-generated (Claude), validated against the live diff. Please sanity-check before acting. Full report: https://uav.tridgell.net/DevCallReviews/2026_09_03/devcall_pr_reviews.html#pr34275 Reviewed at head The stated goal is achievedThe hardcoded
|
Summary
Make clang-scan-build CI derive temporary and artifact paths from the current checkout so the workflow also runs in renamed forks.
Classification & Testing (check all that apply and add your own)
The configured pre-commit hooks pass for both changed files, including YAML validation, flake8, Ruff and codespell.
Tools/scripts/check_branch_conventions.py --base-branch origin/masteralso passes.A local regression harness relocated
ProcessScanBuildOutput.repo_rootto a temporary directory namedrenamed-forkand verified that the report directory and captured stdout were archived beneath that repository'stmp/scan-builddirectory.The failure is also demonstrated by the same commit running in two repositories: the renamed fork fails, while ArduPilot/ardupilot succeeds. A complete patched GitHub Actions run remains to be performed after pushing the branch.
Description
autotest.pyexportsTMPDIRas the checkout'stmpdirectory. The clang-scan-build workflow instead created that directory under/__w/ardupilot/ardupilot, and the report processor and artifact upload repeated the same canonical-repository path. A fork with another repository name therefore gave scan-build aTMPDIRthat did not exist. LLVM's scan-build diagnostic misleadingly reports this as an inaccessible/tmpdirectory even when anotherTMPDIRwas selected.Use
GITHUB_WORKSPACEfor workflow paths and the report processor's discovered repository root for its archive destination. Canonical-repository behavior is unchanged, while renamed forks keep all reports inside their own checkout