Skip to content

Cap azure-ai-projects below 2.5 so the CI image passes pip check - #73627

Merged
potiuk merged 1 commit into
apache:mainfrom
astronomer:cap-azure-ai-projects-openai-override
Sep 23, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
astronomer:cap-azure-ai-projects-openai-override

Conversation

@kaxil

@kaxil kaxil commented Sep 23, 2026

Copy link
Copy Markdown
Member

After #73308 refreshed uv.lock, main started failing pip check, and #73621 reverted the refresh:

azure-ai-projects 2.7.0 has requirement openai>=3.0.0, but you have openai 2.54.0.

The cause is the openai>=2.47.0,<3 override from #73511. A uv override replaces every package's openai requirement, not only pydantic-ai-slim's extra-gated openai>=3.8, which is the one it was added for. azure-ai-projects 2.5.0 moved to an unconditional openai>=3.0.0. Without the override the resolver keeps it at 2.4.0, because litellm and llama-index-llms-openai cap openai below 3. With the override there is no conflict left to see, so uv lock --upgrade moves it to 2.7.0 and only pip check notices.

This caps azure-ai-projects at <2.5, the version the resolver would choose without the override. The Azure provider declares azure-ai-projects>=2.2.0 and main was already on 2.4.0, so the tested version does not change. The comment next to the override now says that any package whose next release needs openai 3 unconditionally has to be capped the same way. It also corrects the condition for dropping the override: besides the two upstream fixes it already names, google-cloud-aiplatform has to lift its litellm cap (<1.86 below Python 3.14), otherwise the lock stays on a litellm that still caps openai.

Checked with breeze ci-image build --python 3.10, which runs the same frozen uv sync and pip check as the failing job:

Tree azure-ai-projects CI image build
main at #73308 (ecfa20322b) 2.7.0 fails in pip check with the error above
that tree plus this change, relocked (azure-ai-projects is the only lock change) 2.4.0 No broken requirements found.
current main plus this change 2.4.0 No broken requirements found.

I also ran a full uv lock --upgrade with this change and compared the PyPI metadata of every locked package that depends on openai against the locked openai 2.54.0. azure-ai-projects was the only unconditional requirement it failed. pydantic-ai-slim's openai>=3.8 still sits behind its openai extra, which pip check skips, same as on main today.

Moving the override to openai 3 instead does not work yet. The latest litellm (1.102.1) and llama-index-llms-openai (0.8.1) still require openai below 3, so pip check would fail on them instead.

The pandas reorder in uv.lock is uv lock restoring the order #73308's lock already had; the revert brought back the unsorted entry.


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

The openai>=2.47.0,<3 override replaces every package's openai
requirement, so the resolver no longer rejects azure-ai-projects 2.5+,
which requires openai>=3.0.0 unconditionally. A lock refresh then moved
it to 2.7.0 and the CI image build failed in pip check. Cap it at its
last openai 2.x release, which is what the resolver picks without the
override.
@kaxil
kaxil requested review from ashb and potiuk September 23, 2026 16:17
@potiuk
potiuk merged commit 675d3e3 into apache:main Sep 23, 2026
45 checks passed
@potiuk

potiuk commented Sep 23, 2026

Copy link
Copy Markdown
Member

Yeah. I was distracted :)

@potiuk

potiuk commented Sep 23, 2026

Copy link
Copy Markdown
Member

Thanks for fixing @kaxil. Had practically the same draft ;)

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