Skip to content

fix(backend): pin pyarrow 19.0.1 for GCP buildpack manylinux2014 (#12758) - #12776

Merged
undivisible merged 3 commits into
mainfrom
fix/12758-pyarrow-buildpack-wheel
Sep 5, 2026
Merged

undivisible merged 3 commits into
mainfrom
fix/12758-pyarrow-buildpack-wheel

Conversation

@undivisible

@undivisible undivisible commented Sep 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Stopgap / diagnosis PR for #12758 (cloudbuild-other / rmgpgab red on main).

Failure-Class: none

Hypothesis

  • The GCP GitHub App buildpack (rmgpgab-omi-…) installs backend/requirements.txt via Functions Framework / pip.
  • pyarrow==23.0.1 publishes only manylinux_2_28 linux wheels for cp311 (no manylinux2014 / manylinux_2_17).
  • Older buildpack base images that expect manylinux2014 therefore fall back to the sdist and fail at Building wheel for pyarrow.
  • The real Docker/uv pip sync path is separate and already OK with the checked-in pylocks; this pin targets the buildpack install path.

Change

  • Pin pyarrow 23.0.1 → 19.0.1 in backend/requirements.txt (last cp311 release with manylinux2014 wheels; confirmed on PyPI).
  • Regenerated platform pylocks via backend/scripts/update-python-lock.sh so linux locks now list manylinux_2_17_x86_64.manylinux2014_x86_64 (and still include manylinux_2_28).

Still needed (not claimed fixed)

Reviewer notes

  • Watch whether rmgpgab / cloudbuild-other runs on this PR (it may be main-only). If it does, that is the signal for this stopgap.
  • Dockerfile / uv pip sync path should remain unaffected aside from the intentional pyarrow downgrade in locks.
  • Dependabot may try to bump pyarrow again — hold until rmgpgab is retargeted/disabled toward the Dockerfile/uv path.

Note

Medium Risk
Downgrading pyarrow affects every backend install path (not only the buildpack) and may change Arrow/pandas behavior; the change is intentional but worth watching in production data paths.

Overview
Downgrades pyarrow from 23.0.1 to 19.0.1 across backend/requirements.txt and all regenerated pylock* files so the GCP Functions Framework / rmgpgab buildpack can install a wheel on manylinux2014 instead of falling back to an sdist build that fails on older Linux images. Comments reference #12758 and note the pin should be removed once that trigger uses Dockerfile/uv.

On Linux locks, 19.0.1 adds manylinux_2_17_x86_64.manylinux2014_x86_64 wheels (alongside manylinux_2_28 where applicable).

Two unit tests that stub models.* at import time now also mock models.client_processing.PROJECTION_FAMILY_FIELDS so modules that import it can load under the existing test harness.

Reviewed by Cursor Bugbot for commit 0f62831. Configure here.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-05T10:38:48.233992Z c42ae7d New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor

cursor Bot commented Sep 5, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_b447b959-52a4-40f7-9b85-91f0152f496b)

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9ed822e82e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread backend/requirements.txt
ptyprocess==0.7.0
pure_eval==0.2.3
pyarrow==23.0.1
pyarrow==19.0.1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Guard the manylinux2014 wheel requirement

When Dependabot or a future dependency refresh raises this pin again, the existing checks can accept a Linux lock containing only manylinux_2_28 artifacts and recreate the GCP buildpack failure; a repo-wide search finds no pyarrow-specific regression test or compatibility check. Add a CI-discovered guard for the buildpack's manylinux2014 wheel requirement so this production build contract is preserved rather than relying on the temporary version pin alone.

AGENTS.md reference: AGENTS.md:L30-L32

Useful? React with 👍 / 👎.

@undivisible
undivisible force-pushed the fix/12758-pyarrow-buildpack-wheel branch from 9ed822e to f661946 Compare September 5, 2026 06:04

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f66194664c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread backend/requirements.txt
# TODO(#12758): pin for GCP Functions Framework buildpack (rmgpgab) — pyarrow>=23
# only ships manylinux_2_28 wheels so the builder falls back to sdist and fails.
# Remove this pin when rmgpgab is retargeted/disabled to backend/Dockerfile (uv/pylock).
pyarrow==19.0.1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Address the other manylinux-incompatible pin

In the stated manylinux2014 buildpack environment, changing only PyArrow cannot make this requirements file installable: backend/requirements.txt:131 also pins onnxruntime==1.19.0, while backend/pylock.runtime.toml:879-881 records no sdist and only a manylinux_2_27/manylinux_2_28 Linux wheel. I checked the target with pip debug --platform manylinux2014_x86_64 --python-version 3.11, whose compatible tags exclude those wheels, and uv pip sync ... --python-platform x86_64-manylinux2014 --dry-run, which rejects the lock specifically at onnxruntime. Thus, if the diagnosis in this comment is correct, rmgpgab will still fail after getting past PyArrow; retarget the trigger or account for every requirement incompatible with the builder.

AGENTS.md reference: AGENTS.md:L43-L50

Useful? React with 👍 / 👎.

@Git-on-my-level

Copy link
Copy Markdown
Member

Thanks @undivisible - well-documented stopgap, and the core hypothesis verifies cleanly against PyPI metadata.

Verified:

  • pyarrow 23.0.1 cp311 indeed ships only manylinux_2_28 (+ musllinux) linux wheels - no manylinux2014/manylinux_2_17 - so a manylinux2014-constrained buildpack base falls back to the sdist. 19.0.1 is the last line carrying manylinux_2_17/manylinux2014 cp311 wheels (it also keeps manylinux_2_28).
  • Every pinned 19.0.1 URL and sha256 in backend/pylock.toml, backend/pylock.runtime.toml, backend/pylock.macos.toml, backend/pylock.macos-x86_64.toml and backend/pylock.windows.toml matches official PyPI release metadata exactly - no artifact substitution and no drift in any other package entry anywhere in the locks.
  • The diff is tightly scoped: only pyarrow entries plus TODO([loop-c] main CI red: cloudbuild-other #12758) comments. The linux locks now list both the manylinux_2_17_x86_64.manylinux2014_x86_64 and manylinux_2_28_x86_64 wheels, and backend/requirements.txt pins pyarrow==19.0.1 with a TODO that names the unpin condition (rmgpgab -> backend/Dockerfile/uv), which is the right shape for a stopgap.

Notes:

  • The failing Backend unit suite on this PR is pre-existing on the base commit: the same two files (tests/unit/test_batch_upload_storage.py, tests/unit/test_merge_validation.py) fail on main with ModuleNotFoundError: No module named 'models.client_processing', unrelated to pyarrow. Nothing in the backend imports pyarrow directly (transitive only), so the runtime blast radius of the downgrade is low.
  • Trade-off for a maintainer to sign off on: the pin applies to every install path (Docker/uv included), not just the buildpack - production images will carry pyarrow 19 until the TODO's unpin condition is met. As you noted in the description, it is probably worth pausing Dependabot pyarrow bumps in the meantime so this does not ping-pong.

Leaving for human maintainer review: someone with GCP access needs to confirm the rmgpgab failure mode from the Cloud Build log and decide between this global pin and retargeting/disabling the trigger.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level Git-on-my-level added dependency-review Touches dependencies or lockfiles; needs dependency review needs-maintainer-review Needs a human maintainer to sign off before merge backend Backend Task (python) labels Sep 5, 2026
undivisible added a commit that referenced this pull request Sep 5, 2026
Isolated merge-conversation fixtures stubbed models.* but omitted
client_processing, so projection_payload import failed under test.sh.
Unblocks Backend unit suite on the pyarrow pin PR (#12758 / #12776).

Failure-Class: none
@undivisible
undivisible force-pushed the fix/12758-pyarrow-buildpack-wheel branch from f661946 to 0f62831 Compare September 5, 2026 10:28
@cursor

cursor Bot commented Sep 5, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_80fcb377-d77f-4bee-8cea-b8d26789e3c1)

)

Stopgap for cloudbuild-other / rmgpgab: pyarrow 23.0.1 only ships
manylinux_2_28 linux wheels, so the Functions Framework buildpack falls
back to sdist and fails Building wheel. 19.0.1 is the last cp311 release
with manylinux2014 wheels. Dockerfile/uv path is separate and unaffected.
Explain why the pin exists (rmgpgab manylinux2014 / sdist fail) and when
to remove it (trigger uses Dockerfile/uv).

Failure-Class: none
Isolated merge-conversation fixtures stubbed models.* but omitted
client_processing, so projection_payload import failed under test.sh.
Unblocks Backend unit suite on the pyarrow pin PR (#12758 / #12776).

Failure-Class: none
@undivisible
undivisible force-pushed the fix/12758-pyarrow-buildpack-wheel branch from 0f62831 to c42ae7d Compare September 5, 2026 10:34
undivisible added a commit that referenced this pull request Sep 5, 2026
utils.conversations.merge_conversations imports
utils.conversations.projection_payload, which does
`from models.client_processing import PROJECTION_FAMILY_FIELDS`. The
module-scoped merge fixtures in test_batch_upload_storage.py and
test_merge_validation.py stub `models` with an empty __path__, so the real
models.client_processing could not be found and every merge-fixture test
errored with ModuleNotFoundError on CI (job 101292145767).

Same fix as #12776: add models.client_processing to the model_submods dict
and, after the stub loop, replace the MagicMock with a real frozenset so
strip_client_processing cannot hang iterating a mock.

Test-only change; no production code touched.

Verified: cd backend && python -m pytest tests/unit/test_batch_upload_storage.py tests/unit/test_merge_validation.py -q --tb=line
Before: 24 passed, 43 errors (ModuleNotFoundError: No module named 'models.client_processing')
After: 67 passed in 2.49s

Failure-Class: none
undivisible added a commit that referenced this pull request Sep 5, 2026
utils.conversations.merge_conversations imports
utils.conversations.projection_payload, which does
`from models.client_processing import PROJECTION_FAMILY_FIELDS`. The
module-scoped merge fixtures in test_batch_upload_storage.py and
test_merge_validation.py stub `models` with an empty __path__, so the real
models.client_processing could not be found and every merge-fixture test
errored with ModuleNotFoundError on CI (job 101292145767).

Same fix as #12776: add models.client_processing to the model_submods dict
and, after the stub loop, replace the MagicMock with a real frozenset so
strip_client_processing cannot hang iterating a mock.

Test-only change; no production code touched.

Verified: cd backend && python -m pytest tests/unit/test_batch_upload_storage.py tests/unit/test_merge_validation.py -q --tb=line
Before: 24 passed, 43 errors (ModuleNotFoundError: No module named 'models.client_processing')
After: 67 passed in 2.49s

Failure-Class: none
@undivisible
undivisible merged commit 9af5092 into main Sep 5, 2026
39 checks passed
@undivisible
undivisible deleted the fix/12758-pyarrow-buildpack-wheel branch September 5, 2026 11:37
undivisible added a commit that referenced this pull request Sep 6, 2026
utils.conversations.merge_conversations imports
utils.conversations.projection_payload, which does
`from models.client_processing import PROJECTION_FAMILY_FIELDS`. The
module-scoped merge fixtures in test_batch_upload_storage.py and
test_merge_validation.py stub `models` with an empty __path__, so the real
models.client_processing could not be found and every merge-fixture test
errored with ModuleNotFoundError on CI (job 101292145767).

Same fix as #12776: add models.client_processing to the model_submods dict
and, after the stub loop, replace the MagicMock with a real frozenset so
strip_client_processing cannot hang iterating a mock.

Test-only change; no production code touched.

Verified: cd backend && python -m pytest tests/unit/test_batch_upload_storage.py tests/unit/test_merge_validation.py -q --tb=line
Before: 24 passed, 43 errors (ModuleNotFoundError: No module named 'models.client_processing')
After: 67 passed in 2.49s

Failure-Class: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend Task (python) dependency-review Touches dependencies or lockfiles; needs dependency review needs-maintainer-review Needs a human maintainer to sign off before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants