Skip to content

build: Don't have both a pip and pip-tools requirements files.#37636

Merged
feanil merged 3 commits intomasterfrom
feanil/fix_make_upgrade
Nov 20, 2025
Merged

build: Don't have both a pip and pip-tools requirements files.#37636
feanil merged 3 commits intomasterfrom
feanil/fix_make_upgrade

Conversation

@feanil
Copy link
Copy Markdown
Contributor

@feanil feanil commented Nov 14, 2025

Previously we would upgrade pip before we upgrade pip-tools. This
breaks when the latest version of pip is not compatible with the current
version of pip-tools as happened with jazzband/pip-tools#2252

If we re-order the steps so that we upgrade pip-tools first, we know
that this upgrade call will work since it will run with the versions of
pip and pip-compile that ran the last full upgrade.

However in this case the pip.txt file is redundant as the pip-tools.txt
file already has the latest version of pip that is compatible with the
current version of pip-tools being installed.

This changeset also updates the compile-requirements command to ignore
the common_constraints entry for pip so that we can verify the upstream
fix of pip-compile before we remove the entry from
common_constraints.txt upstream.

@feanil feanil requested a review from timmc-edx November 14, 2025 16:29
@feanil
Copy link
Copy Markdown
Contributor Author

feanil commented Nov 14, 2025

@timmc-edx I feel like you've thought about this a bit before so I'd love your thoughts on this change if you have a sec for it. Though, review from others is also welcome.

@feanil feanil requested review from a team and kdmccormick November 17, 2025 14:17
@timmc-edx
Copy link
Copy Markdown
Contributor

I'm having some trouble seeing the logic here. Won't this still break during a period of incompatible latest/latest? Or is the idea that pip-tools will constrain the pip version somehow and ensure we get a compatible pair?

@feanil
Copy link
Copy Markdown
Contributor Author

feanil commented Nov 18, 2025

The pip-tools.txt file has a pip version in it that is compatible with that version of pip-tools. So the initial install of pip-tools should always install co-compatible versions of both. Then we attempt to upgrade both.

@timmc-edx
Copy link
Copy Markdown
Contributor

In a situation where latest of pip and pip-tools are incompatible, I would predict the following:

  • We upgrade and install pip-tools.txt, bringing in the max compatible pip version.
  • We then upgrade and install pip.txt, bringing in a newer (incompatible) pip.
  • We then proceed with pip-compile commands, which break.

What am I missing here?

@timmc-edx
Copy link
Copy Markdown
Contributor

...actually, why have pip.txt at all if pip-tools.txt includes it?

@feanil
Copy link
Copy Markdown
Contributor Author

feanil commented Nov 18, 2025

Yea, I was thinking about that too, like do we need both? Thinking about it more, the pip-compile of pip-tools.txt should upgrade both so yea maybe we can just drop that. Let me make that change.

Previously we would upgrade pip before we upgrade pip-tools.  This
breaks when the latest version of pip is not compatible with the current
version of pip-tools as happened with jazzband/pip-tools#2252

If we re-order the steps so that we upgrade pip-tools first, we know
that this upgrade call will work since it will run with the versions of
pip and pip-compile that ran the last full upgrade.

However in this case the pip.txt file is redundant as the pip-tools.txt
file already has the latest version of pip that is compatible with the
current version of pip-tools being installed.

This changeset also updates the compile-requirements command to ignore
the common_constraints entry for pip so that we can verify the upstream
fix of pip-compile before we remove the entry from
common_constraints.txt upstream.
Use the `pre-requirements` target to ensure that pip is installed at a
version that's valid for the rest of the workflow.
@feanil feanil force-pushed the feanil/fix_make_upgrade branch from 647ad0e to 6f37e0b Compare November 19, 2025 16:52
Copy link
Copy Markdown
Contributor

@timmc-edx timmc-edx left a comment

Choose a reason for hiding this comment

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

Looks good! Just needs updated PR title/desc.

@feanil feanil changed the title build: Change requirements compilation order. build: Don't have both a pip and pip-tools requirements files. Nov 20, 2025
@feanil feanil merged commit 53b5a8b into master Nov 20, 2025
53 checks passed
@feanil feanil deleted the feanil/fix_make_upgrade branch November 20, 2025 14:36
feanil added a commit to openedx/openedx-calc that referenced this pull request Nov 24, 2025
We need the two to always be compatible so just have the pip-tools file
which controls both the version of pip and pip-tools.

See openedx/openedx-platform#37636 for rationale
which is the same for this repo.
feanil added a commit to openedx/openedx-translations that referenced this pull request Dec 15, 2025
When we track the two packages separately it's easy to get into a
deadlock situation where one prevents the other from being upgraded.
Update both in lockstep so we know that the versions will work together
when either one is updated.

Similar to openedx/openedx-platform#37636
OmarIthawi pushed a commit to openedx/openedx-translations that referenced this pull request Dec 17, 2025
When we track the two packages separately it's easy to get into a
deadlock situation where one prevents the other from being upgraded.
Update both in lockstep so we know that the versions will work together
when either one is updated.

Similar to openedx/openedx-platform#37636
dianakhuang added a commit to edx/public-dockerfiles that referenced this pull request Dec 19, 2025
Due to openedx/openedx-platform#37636
the pip.txt file used during build does not exist anymore.

This now installs the consolidated pip-tools.txt file.
dianakhuang added a commit to edx/public-dockerfiles that referenced this pull request Dec 19, 2025
Due to openedx/openedx-platform#37636
the pip.txt file used during build does not exist anymore.

This now installs the consolidated pip-tools.txt file.
dianakhuang added a commit to edx/public-dockerfiles that referenced this pull request Dec 19, 2025
* feat: Add support for arm64 builds.

This allows the docker image to be built on
arm64 machines by paramaterizing based on the
architecture.

* fix: Point to correct pip requirements file.

Due to openedx/openedx-platform#37636
the pip.txt file used during build does not exist anymore.

This now installs the consolidated pip-tools.txt file.
feanil added a commit to openedx/openedx-chem that referenced this pull request Dec 22, 2025
Combine pip and pip-tools install into a single text file.  We need them
to always be in sync with each other so it doesn't make sense to
separate their requirements files or upgrades.

See openedx/openedx-platform#37636 for more details.
feanil added a commit to openedx/openedx-chem that referenced this pull request Dec 22, 2025
Combine pip and pip-tools install into a single text file.  We need them
to always be in sync with each other so it doesn't make sense to
separate their requirements files or upgrades.

See openedx/openedx-platform#37636 for more details.
feanil added a commit to openedx/codejail that referenced this pull request Dec 22, 2025
The two should be built in sync not in separate files.

See openedx/openedx-platform#37636 for more details.
feanil added a commit to openedx/sample-plugin that referenced this pull request Dec 23, 2025
feanil added a commit to openedx/sample-plugin that referenced this pull request Dec 23, 2025
feanil added a commit to openedx/edx-search that referenced this pull request Dec 29, 2025
This is applying the same fix as
openedx/openedx-platform#37636 to the edx-search
repo so that we can more safely do make upgrades in the future.
feanil added a commit to openedx/edx-search that referenced this pull request Dec 29, 2025
This is applying the same fix as
openedx/openedx-platform#37636 to the edx-search
repo so that we can more safely do make upgrades in the future.
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