Skip to content

ci: run Python CodeQL on standard Ubuntu ARM64 - #3834

Merged
Daniel Meppiel (danielmeppiel) merged 1 commit into
mainfrom
danielmeppiel-codeql-python-arm
Nov 18, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 1 commit into
mainfrom
danielmeppiel-codeql-python-arm

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

Description

Move only Python CodeQL to the existing ubuntu-24.04-arm runner. The Actions-language job stays on ubuntu-latest. No matrix axis, check name, triggers, queries, reporting category, upload, permissions, cache settings or release gates change. The contributor guide documents the runner split.

Measured: on the same-source, same-query comparison, Python took 7:06 on x86 vs 3:02 on ARM, including the initial 4s / 6s of queue time. Actual runner occupation was 7:02 vs 2:56: approximately 4.1 fewer runner-minutes per scan, not a billing estimate. Both had four CPU threads and about 14.5 GB available to CodeQL. The uploaded SARIF contained identical rule IDs, findings, file locations and partial fingerprints: 43 rules, 26 findings; 2,426 of 2,426 Python files scanned on both. No scan status or evidence was removed.

Why this job: CodeQL finished last on five of the first eight successful build-bearing pushes after #3830. On the latest comparison base, all checks took 8:01; the build took 7:15. A faster Python scan would move that push's critical path to the build, a projected 46s end-to-end saving, not four minutes. Even a free Windows binary build would have saved zero seconds on the median push, so no additional shards or jobs are proposed.

Note

Both isolated benchmark jobs used the pinned production CodeQL 2.27.4 and overlay-base to include main-style extraction and queries. A branch run doesn't publish the default branch's overlay cache or database bundles; the 7:15 figure is a projection, not a second production measurement. Production keeps its automatic overlay/cache and database upload behavior.

Issue and approved scope

Issue: Refs #3581; follow-up to #3830, not a substitute for #3582. This does not complete #3581.

Human scope-approval comment: Daniel requested measured, uncomplicated follow-on CI speedups and ordinary review and landing through Lane L in the coordinating session. No separate public approval comment for this runner change is cited; the older release-only approval is not treated as one.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally

  • All existing tests pass

  • Added tests for new functionality (if applicable)

  • actionlint -shellcheck= .github/workflows/codeql.yml — passed.

  • uv run --frozen --extra dev pytest -q tests/unit/test_security_workflow_contracts.py — 4 passed. Covers unchanged trigger, language and upload contracts. No product behavior or new test selection.

  • git diff --check — passed; local CI lint mirror passed.

  • Hosted x86 and ARM runs both completed on the first attempt and uploaded accepted SARIF. No added capacity or settings change.

Spec conformance (OpenAPM v0.1)

If this PR changes behaviour that an OpenAPM v0.1 req-XXX covers,
confirm the three-step ritual in the
development guide:

  • Spec edit: docs/src/content/docs/specs/openapm-v0.1.md updated
    (new/changed <a id="req-XXX"></a> anchor + prose + Appendix C
    row).
  • Manifest edit: docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.yml
    updated.
  • Test edit: a @pytest.mark.req("req-XXX") test under
    tests/spec_conformance/ added or extended.
  • CONFORMANCE.{md,json} regenerated via
    uv run --extra dev python -m tests.spec_conformance.gen_statement
    and committed.
  • N/A -- this PR does not change OpenAPM-observable behaviour.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

In a same-source, four-core hosted A/B, Python scan runtime fell from 7m02s to 2m56s with identical rules and findings. Keep the matrix, analysis category and Actions runner unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the CodeQL runner split and accompanying documentation update.

No open issues 🎉

What changed in this PR

This follow-up to #3830 targets CodeQL scan time as part of the CI speedup work tracked in #3581, without changing analysis settings or release gates.

Changes:

  • Run Python CodeQL on ubuntu-24.04-arm, while keeping GitHub Actions analysis on ubuntu-latest.
  • Document the runner split in the contributor development guide.
File Description
docs/​src/​content/​docs/​contributing/​development-guide.md Documents ARM64 for Python analysis and x86_64 for Actions analysis.
.github/​workflows/​codeql.yml Selects the runner based on the existing language matrix.

Review effort: Balanced

@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit d26ecd9 into main Nov 18, 2026
26 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-codeql-python-arm branch November 18, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants