Skip to content

CodeQL Analyze (python) fails on PR branches cut before main had Python files #9562

Description

@usirin

Summary

The CodeQL "Analyze (python)" check goes red on any PR branch whose base is older than the first Python files on main. The branch has no Python, so the scan finds nothing and fails. The check is not required, but it shows red and cannot be re-run.

What I was doing

Driving lane 9514 (PR #9525) to ship. The shipper parked the lane on head-ci-red, and I read the PR's failing checks.

What I observed

GitHub's CodeQL default setup added python as a language after #8063 put the first .py files on main. On PR #9525 at head f5f4341, job 106152276286 fails at database finalize:

Error: CodeQL could not process any code written in Python.
Encountered a fatal error while running "codeql database finalize ... codeql_databases/python". Exit code was 32

gh run rerun on that run is refused because default setup has no workflow file. On the same PR a roadmap-guard run from before a later main commit was also red, and the shipper reported head-ci-red with both.

Why it matters

Every open branch older than #8063 carries a red check until it takes main. It might be read as a real CI failure by a shipper or a person, and it may have contributed to a lane park. It stops once old branches drain, so the cost is bounded.

Pointers

Suggested next step (non-binding)

A guess: have the heal-ci path update the branch from main when this is the only red check, or make ship's head-CI read skip non-required checks. Dropping python from the default-setup language list is the other option.


Filed by an agent · session 1114d1ad-d769-4169-bb00-4d899c13bc18 · branch main · 2026-09-20T22:19:47Z

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-by-triageClosed not-planned by triage; auditable + reversible

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions