test_package: build the WASM wheel URL with the normalised version - #9443
Open
BIMvoice wants to merge 1 commit into
Open
test_package: build the WASM wheel URL with the normalised version#9443BIMvoice wants to merge 1 commit into
BIMvoice wants to merge 1 commit into
Conversation
The pyodide wheel is published under the PEP 440 normalised version (0.9.0a0), which is what pyodide/build_pyodide.sh stamps into it, while the platform zips keep the raw BINARY_VERSION (0.9.0alpha0). The test interpolated BINARY_VERSION into both, so the WASM URL it built could never resolve regardless of which build is pinned. Normalise the same way the Makefile does for VERSION_PYTHON. Reading VERSION_PYTHON out of the Makefile is not an option: find_make_var returns the unevaluated "$(shell sed 's/alpha/a/' ../../VERSION)", and it is derived from VERSION rather than from the pinned BINARY_VERSION. pyodide/pack_wheel.py builds the same URL from the same variable and had the same defect, so it is fixed alongside. Also report which artifacts are missing in the assertion message.
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.
Follow-up to #9430, where
TestPackageSupportedPlatforms::test_runwas skipped with "Re-enable when builds are fully operational again". The skip has since been replaced by a non-strictxfailin 5aaf210. This PR fixes a real bug the xfail was masking, and reports honestly on what is still missing.Mechanism
WASM_TEMPLATEinterpolatedBINARY_VERSIONread verbatim fromsrc/ifcopenshell-python/Makefile, which is0.9.0alpha0. Wheels are not named that way.pyodide/build_pyodide.shnormalises the version to the canonical PEP 440 form before building:VERSION=`python3 -c "from packaging.version import Version; print(Version('$VERSION'))"`and the Makefile itself carries the same normalisation for its own packaging at line 5:
So every pyodide wheel on the bucket is named
ifcopenshell-0.9.0a0+<sha>-..., and the URL the test built could never resolve, whatever commit is pinned. The platform zips are unaffected, they really are named with the raw0.9.0alpha0.find_make_var("VERSION_PYTHON")cannot be used to get the normalised value. It returns the unevaluated string$(shell sed 's/alpha/a/' ../../VERSION), and it is derived fromVERSIONrather than from the pinnedBINARY_VERSION, which can lag it. The substitution is therefore applied in the test, mirroring what the Makefile does.pyodide/pack_wheel.py::get_wheel_urlbuilds the same URL from the same variable and had the same defect, so it is fixed in the same commit. It is the download path that #9427 extends.URL resolution, measured with HEAD requests today
All 19 URLs the test builds, before and after.
ifcopenshell-python-{310,311,312,313,314}-v0.9.0alpha0-ad113e1-win64.zip(5)ifcopenshell-python-{310,311,312,313,314}-v0.9.0alpha0-ad113e1-linux64.zip(5)ifcopenshell-python-{310,311,312,313,314}-v0.9.0alpha0-ad113e1-macosm164.zip(5)IfcConvert-v0.9.0alpha0-ad113e1-{win64,linux64,macosm164}.zip(3)ifcopenshell-0.9.0alpha0%2Bad113e1-cp313-cp313-pyodide_2025_0_wasm32.whlifcopenshell-0.9.0a0%2Bad113e1-cp313-cp313-pyodide_2025_0_wasm32.whlThe platform half of the test is fully satisfied at the pinned
BUILD_COMMIT:=ad113e1, including all five Python versions andmacosm164, so the stalemacos64entry removed in 66126d2 was the last blocker there.What still blocks removing the xfail
The version fix alone is not enough, so the
xfailadded in 5aaf210 is left in place. No pyodide wheel exists forad113e1under either spelling of the version. What is on the bucket for 0.9.0:ifcopenshell-0.9.0a0+4e887e1-cp313-cp313-pyodide_2025_0_wasm32.whlad113e1ifcopenshell-0.9.0a0+05e5a37-cp313-cp313-pyemscripten_2025_0_wasm32.whlifcopenshell-0.9.0a0+75ec717-cp313-cp313-pyemscripten_2025_0_wasm32.whlTwo things follow.
Build IfcOpenShell WASM / Pyodideisworkflow_dispatchonly and stamps${GITHUB_SHA:0:7}into the wheel name, so the WASM artifact is pinned by whichever commit that workflow last ran on. It did run afterad113e1, on 2026-08-26 and 2026-08-28, but never onad113e1itself. The test can only go green when a WASM build exists at the pinned commit, either by dispatching the workflow atad113e1or by bumpingBUILD_COMMITto a commit where all five build workflows ran.The two most recent WASM builds are tagged
pyemscripten_2025_0_wasm32, notpyodide_2025_0_wasm32, soWASM_PLATFORMin the test would not match them either.pyodide/pack_wheel.pysetsUSE_LEGACY_PLATFORM=1for exactly this reason, with the comment "pyodide 0.34.1 introduced new tag for wheelspyemscripten, which doesn't work with pyodide itself yet" (Bumppyodiderelease to supportpyemscriptentag pyodide/pyodide#6177).pyodide/build_pyodide.sh, which is what the CI workflow runs, does not set it. That looks like an unintended tag change on the CI side rather than something the test should follow, but it needs a decision from whoever owns the pyodide build before the pin is moved.So the sequence to get this test green: dispatch
Build IfcOpenShell WASM / Pyodideat the commit that will be pinned, with the legacy platform tag, then bumpBUILD_COMMITand drop thexfail. Thexfailcondition is already keyed toBUILD_COMMIT:=ad113e1, so it clears itself on the next bump.To make the next failure self-explanatory, the assertion now names the missing artifacts:
Before this PR the same message would have pointed at
0.9.0alpha0, an artifact that never exists, which is a misleading thing to hand the next person bumping the pin.v0.8.0
v0.8.0has the same code shape but not the same bug in practice: itsBINARY_VERSIONis0.8.6, already canonical PEP 440, so the substitution is a no-op there andifcopenshell-0.8.6%2Be333c1c-cp313-cp313-pyodide_2025_0_wasm32.whlresolves 200. Nothing to fix onv0.8.0today, but the same latent trap is there if that branch ever pins an alpha version. Not touched in this PR.