Skip to content

Decouple default glibc from MANYLINUX_TAGS maximum - #903

Open
maresb wants to merge 4 commits into
conda:mainfrom
maresb:fix-manylinux-test-invariant
Open

Decouple default glibc from MANYLINUX_TAGS maximum#903
maresb wants to merge 4 commits into
conda:mainfrom
maresb:fix-manylinux-test-invariant

Conversation

@maresb

@maresb maresb commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Human-written content:

Back in the day, @romain-intel and I added a test in #566 that in retrospect I believe was in error. The problem is "Verify that the default repodata uses the highest glibc version" in test_manylinux_tags because it imposes what I believe is an artificial constraint on the glibc version: that the default glibc version must track the latest glibc version.

In order to understand why I believe this constraint is artificial, it's necessary to have a clear view of what the virtual package versions represent. I personally find the concept very confusing. Thinking hard about what I found confusing, realized that it's because the versions specified are functioning simultaneously as an upper-bound (for filtering) and a lower-bound (for system compatibility), and hence represent a tradeoff. I tried to rewrite the documentation in plain language to make it easier to understand the crux:

Each virtual package version acts as an upper bound on which packages are considered by
the solver (packages requiring a newer version are excluded) and as a lower bound on
compatible target systems (the lockfile is installable on systems that meet or exceed
these versions).

There is a tradeoff: increasing a version widens the set of candidate packages but narrows
the set of compatible target systems. If a package you need is being filtered out, increase the
relevant version. If the lockfile is incompatible with your target system, decrease it.

So the problem I see with the test is that if we max out the default virtual package glibc version, then we generate lockfiles that may contain packages that require this high glibc version, and hence are uninstallable on systems for which the glibc version is lagging. I believe the optimal default virtual package versions should be a middle ground to avoid both tradeoff extremes.

I don't think we should increase the default glibc version as part of #900, and looking at why the version was bumped there, I believe it was due to this test. So I'm hoping here to fix the root cause of the confusion via documentation, and also to fix the test so that the right compromise remains possible with the defaults.


LLM content:

Summary

  • Relax test_manylinux_tags assertion from == to set inclusion (<=): the default glibc versions must be covered by MANYLINUX_TAGS, but the max tag can exceed the default
  • Remove misleading "Keep this in sync with the MANYLINUX_TAGS maximum" comments
  • Document virtual package version semantics in default-virtual-packages.yaml, README.md, and docs/flags.md

Motivation

The previous test and comments incorrectly coupled two independent concerns:

  1. Default glibc (default-virtual-packages.yaml): a conservative assumption about the target system — should be kept low (e.g., 2.28, matching Pixi's default)
  2. MANYLINUX_TAGS maximum (pypi_solver.py): the highest manylinux tag the solver understands — can be higher than the default, since users can opt in via --virtual-package-spec

The old invariant forced contributors to bump the default glibc whenever adding a new manylinux tag (see #900), which would silently change solver behavior for all users and risk producing lockfiles incompatible with older glibc systems.

The correct invariant is: every default glibc version must appear in MANYLINUX_TAGS (set inclusion), but the max tag can exceed the default.

Context: #847 (discussion about dynamically generating tags), #566 (original manylinux filtering), #900 (motivated this fix)

Test plan

  • test_manylinux_tags passes with the relaxed assertion
  • All pre-commit hooks pass
  • No content hash changes (comments in YAML don't affect hashes)

Made with Cursor

maresb added 4 commits April 7, 2026 21:51
The test_manylinux_tags test incorrectly asserted that the default glibc
version must equal the maximum of MANYLINUX_TAGS. This forced contributors
to bump the default glibc whenever adding a new tag, even though these
are independent concerns: the default glibc is a conservative policy for
the target system, while MANYLINUX_TAGS entries are capabilities available
via --virtual-package-spec.

Relax the assertion to set inclusion (default glibc versions must be
covered by MANYLINUX_TAGS) and remove the misleading "keep in sync"
comments that guided contributors toward the wrong invariant.

Made-with: Cursor
Explain in default-virtual-packages.yaml and README.md that each
virtual package version acts as an upper bound on candidate packages
and a lower bound on compatible target systems.

Made-with: Cursor
Replace the technical jargon about "injecting" and "gating on system
features" with a clearer explanation of what virtual packages are,
what the version numbers mean, and how to adjust them.

Made-with: Cursor
Apply the same documentation improvements to the docs site version
of the --virtual-package-spec section.

Made-with: Cursor
@maresb
maresb requested a review from a team as a code owner April 7, 2026 20:20
@cursor

cursor Bot commented Apr 7, 2026

Copy link
Copy Markdown

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@netlify

netlify Bot commented Apr 7, 2026

Copy link
Copy Markdown

Deploy Preview for conda-lock ready!

Name Link
🔨 Latest commit 3afd8e5
🔍 Latest deploy log https://app.netlify.com/projects/conda-lock/deploys/69d5670a081b0c0008f80218
😎 Deploy Preview https://deploy-preview-903--conda-lock.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

1 participant