Skip to content

chore(ci): read python pin from pyproject.toml instead of hardcoding per workflow - #59478

Closed
rnegron wants to merge 1 commit into
pr-2b-python313-uvfrom
pr-4-python313-workflow-refactor
Closed

chore(ci): read python pin from pyproject.toml instead of hardcoding per workflow#59478
rnegron wants to merge 1 commit into
pr-2b-python313-uvfrom
pr-4-python313-workflow-refactor

Conversation

@rnegron

@rnegron rnegron commented May 21, 2026

Copy link
Copy Markdown
Member

Problem

CI workflows hardcode the Python version (~14 pins across 10 workflows), so every patch bump has to touch all of them. This converts them to read the version from pyproject.toml instead. Landing it before the cutover (#59440) means that bump becomes a single requires-python change which every workflow picks up automatically — no per-workflow Python edits in the cutover.

Changes

  • 14 hardcoded python-version: pins → python-version-file: pointing at the appropriate pyproject.toml (root, services/llm-gateway/, or tools/hogli/).
  • 4 "python-version" strings in the ci-backend.yml jq matrix builder → derived once at job runtime from pyproject.toml via grep + jq --arg pv.
  • Net: future Python version bumps touch one line (pyproject.toml) instead of ~14.

How did you test this code?

Agent-authored. YAML syntax check on the modified workflows; grep confirms zero remaining hardcoded python-version pins across .github/workflows/. No runtime test — depends on CI runners exercising the conversion. At this point in the stack pyproject.toml still pins 3.12.12, so the workflows resolve to 3.12.12; the cutover then flips it to 3.13.13 and they follow.

Publish to changelog?

no

🤖 Agent context

Part of the python 3.13 stack: deps (#59439) → uv (#60144) → this → cutover (#59440). Reordered before the cutover (originally sat after it) so the bump stays a clean pyproject.toml flip and this refactor is reviewable on its own.

rnegron commented May 21, 2026

Copy link
Copy Markdown
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@tests-posthog

tests-posthog Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Query snapshots: Backend query snapshots updated

Changes: 1 snapshots (1 modified, 0 added, 0 deleted)

What this means:

  • Query snapshots have been automatically updated to match current output
  • These changes reflect modifications to database queries or schema

Next steps:

  • Review the query changes to ensure they're intentional
  • If unexpected, investigate what caused the query to change

Review snapshot changes →

@rnegron
rnegron force-pushed the pr-4-python313-workflow-refactor branch from c3f7029 to cfecfe8 Compare May 26, 2026 14:49
@rnegron
rnegron force-pushed the pr-3-python313-cutover branch 2 times, most recently from f26a985 to dccfd86 Compare May 26, 2026 17:45
@rnegron
rnegron force-pushed the pr-4-python313-workflow-refactor branch from cfecfe8 to e4268b2 Compare May 26, 2026 17:45
@rnegron
rnegron force-pushed the pr-3-python313-cutover branch from 9176547 to dbc0768 Compare May 26, 2026 19:44
@rnegron
rnegron force-pushed the pr-4-python313-workflow-refactor branch from e4268b2 to bb5ca2d Compare May 26, 2026 19:44
@rnegron
rnegron changed the base branch from pr-3-python313-cutover to graphite-base/59478 May 26, 2026 20:24
@rnegron
rnegron force-pushed the graphite-base/59478 branch from dbc0768 to ee94c87 Compare May 26, 2026 20:24
@rnegron
rnegron force-pushed the pr-4-python313-workflow-refactor branch from bb5ca2d to 268610b Compare May 26, 2026 20:24
@rnegron
rnegron changed the base branch from graphite-base/59478 to pr-2b-python313-uv May 26, 2026 20:24
@rnegron
rnegron force-pushed the pr-4-python313-workflow-refactor branch from 268610b to ffa43c8 Compare May 26, 2026 20:25
@rnegron
rnegron force-pushed the pr-2b-python313-uv branch from ee94c87 to 294636e Compare May 26, 2026 20:25

@webjunkie webjunkie 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.

We might have already tried this, and it was part of rate limit issues.

Since with just giving the file, it must read the file and then figure out what version matches from the specified range and this hit the rate limits.

Might be fixed now or not, I dunno

astral-sh/setup-uv#802
astral-sh/setup-uv#325

@rnegron
rnegron force-pushed the pr-4-python313-workflow-refactor branch from ffa43c8 to 7d4ef08 Compare May 27, 2026 16:49
@rnegron
rnegron force-pushed the pr-2b-python313-uv branch from 294636e to 855f6b6 Compare May 27, 2026 16:49
@rnegron rnegron closed this May 27, 2026
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