Fix GitHub Codespaces setup - #42596
Open
cxzhong wants to merge 3 commits into
Open
Conversation
|
Documentation preview for this PR (built with commit 8def099; changes) is ready! 🎉 |
Contributor
Author
|
Could you help me verify this? @soehms |
Contributor
Author
|
I have verified this works in codespace. |
cxzhong
marked this pull request as ready for review
July 29, 2026 17:20
Member
I ran a test using the link from the README.md:
Is the following expected behavior?
However, after accepting the blue button, I was able to start and use Sage in the GH-Codespace: But I'm probably not the right person to review the code, since I'm not familiar with |
Contributor
Author
|
Thanks very much |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Root cause
The default container performed dependency setup and the editable install only in
onCreateCommand, which runs once when a prebuild is created. Setup failures were hidden by|| true, and later terminals stayed in Conda's base environment. A reused stale prebuild could therefore combine an old Python environment and Meson build directory with a newer Sage checkout, producing the Python 3.11/Ninja failure reported in #42201.A live Codespaces launch also exposed a second incompatibility: the old Debian Bullseye base provides glibc 2.31, while the generated Linux lock pins
sysroot_linux-64=2.39, whose package metadata requires__glibc >=2.39. The contributor configuration now uses the official major-pinned Debian Trixie image, which provides glibc 2.41 while preserving thevscodeuser and Debian-based setup.The new
updateContentCommandhashes the complete Conda lock, detects a mismatched Python environment, frees generated Meson builds and caches before Conda transactions, synchronizes dependencies, reinstalls Sage editable, runspip check, and forces a real Sage smoke test before recording success.The README now uses a separate Miniforge configuration for users who want prebuilt Sage rather than a contributor source build.
Validation
updateContentCommandand reproduced the Bullseye/glibc incompatibilitysysroot_linux-64=2.39=hc4b9eeb_6dry-run solve fails with a simulated glibc 2.31 and succeeds with glibc 2.39environment-3.12-linux.ymldry-run solve succeeds with Trixie's glibc 2.41mcr.microsoft.com/devcontainers/base:2-trixiemanifest exists for amd64 and arm64@devcontainers/cli@0.83.3 read-configuration(the Codespaces log version) parses the updated contributor configurationsh -nandbash -nfor all lifecycle hooks@devcontainers/cli@0.86.0 read-configurationfor the default, downstream, and dedicated Codespaces configurationssage -c 'assert ZZ(2) + ZZ(2) == 4'git diff --checkThe PR remains a draft pending one fresh live Codespaces rebuild on the Trixie image.
Fixes #42201