Skip to content

ci: Address the flatpak lint module from GITHUB_ACTION_PATH (#2700 regression) - #2707

Closed
zackees wants to merge 2 commits into
masterfrom
fix/flatpak-lint-container-paths
Closed

zackees wants to merge 2 commits into
masterfrom
fix/flatpak-lint-container-paths

Conversation

@zackees

@zackees zackees commented Oct 27, 2026

Copy link
Copy Markdown
Member

Fixes a regression from #2702 (my queue of it), which the Flatpak lane found as soon as a scheduled run reached it.

What broke

flatpak-builder-lint is a ci/ Python module now, and the composite action called it with a path built from ${{ github.workspace }}. That context interpolates to the runner's host path:

Run uv run --no-project "/home/runner/work/obs-studio/obs-studio/ci/flatpak_builder_lint.py" guard --artifact 'manifest'
error: Failed to spawn: /home/runner/work/obs-studio/obs-studio/ci/flatpak_builder_lint.py
  cause: No such file or directory (os error 2)

flatpak-build and flatpak-publish run in a container, where the same tree is mounted at /__w/obs-studio/obs-studio (the job's docker create has --workdir /__w/obs-studio/obs-studio and -v /home/runner/work:/__w). The host path does not exist there, so the step dies before the linter runs. Run 40595018476, job 122510595479.

The fix

Both steps derive the repo root from GITHUB_ACTION_PATH, which is the env value the shell sees container-side — the inline shell this ported already relied on it for exceptions.json:

repo="${GITHUB_ACTION_PATH%/.github/actions/flatpak-builder-lint}"

So the module and exceptions.json are both addressed container-side, and the step's working-directory (and therefore a relative --path) is untouched.

Evidence

  • Reproduced in the lane's own image, ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-26.08, with the worktree mounted as the job mounts it: the host path exits 2 with exactly the CI message, the container path exits 0.
  • End to end in that image with the fixed action: guard --artifact manifest → 0, lint --artifact manifest --path build-aux/io.github.obs_rust.OBSStudioRust.json --exceptions … → 0.
  • RED then GREEN in ci/test_flatpak_builder_lint.py: the new test_action_locates_the_module_from_the_container_side fails on master's action (which still hands over ${{ github.workspace }}) and passes with this change. uv run --no-project python -m unittest ci/test_flatpak_builder_lint.py → 11 tests OK.

No user-visible change, so no docs/features.md line. No PR lane covers flatpak-build/flatpak-publish — like #2703, this one is only proven by a scheduled or dispatched run, which is how it was caught.

Not fixed here: on the same run the Ubuntu lane still fails at
libobs-opengl/gl-wayland-egl.c.h:90: error: no previous prototype for 'gl_wayland_egl_windowinfo_create' [-Werror=missing-prototypes] — first-party C, so it needs a prototype rather than an exemption. That is #2703's remaining work, not this PR's.

The composite action handed uv a path built from ${{ github.workspace }},
which is the runner's host path (/home/runner/work/<repo>/<repo>). In a job
container the workspace is mounted at /__w/<repo>/<repo>, so the spawn failed:

    error: Failed to spawn: .../ci/flatpak_builder_lint.py
      cause: No such file or directory (os error 2)

Reproduced in the Flatpak lane's own image
(ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-26.08): the host
path exits 2 with that message, the container path exits 0.

GITHUB_ACTION_PATH is the value the shell sees container-side -- the inline
shell this ported used it for exceptions.json -- so both steps now derive the
repo root from it and pass exceptions.json from it too.
@zackees

zackees commented Oct 27, 2026

Copy link
Copy Markdown
Member Author

Closing this as superseded by #2706, which fixed the same Failed to spawn regression while I was reproducing it — and does it more cleanly than I did: relative paths off working-directory: ${{ inputs.workingDirectory }} with no shell plumbing in the action, instead of my ${GITHUB_ACTION_PATH%...} derivation.

I verified #2706's form in the lane's own image before closing, with the worktree mounted exactly as the job mounts it (-v <repo>:/__w/obs-studio/obs-studio -w /__w/obs-studio/obs-studio, ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-26.08):

uv run --no-project ci/flatpak_builder_lint.py guard --artifact manifest          -> 0
uv run --no-project ci/flatpak_builder_lint.py lint --artifact manifest \
  --path build-aux/io.github.obs_rust.OBSStudioRust.json \
  --exceptions .github/actions/flatpak-builder-lint/exceptions.json              -> 0

and the host path still exits 2 with Failed to spawn: … (os error 2), which is the failure from run 40595018476.

The one assumption #2706 makes is that no caller overrides workingDirectory; I checked all 11 call sites (7 in build-project.yaml, 4 in publish.yaml) and none does, so the module and exceptions.json resolve against the workspace as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant