Releasing official WASI binaries as part of releases

Now that python3 Platforms/WASI release is a thing, I’m getting really close to wanting to have the RM release official WASI binaries via release-tools/.github/workflows/build-release.yml at main · python/release-tools · GitHub . But before I go and send Savannah a PR to let me do it for Python 3.16 (which I have discussed with her and other RMs before over the years and gotten tacit approval for), I wanted to see if there were any concerns or anything people wanted to see happen before I did that.

The closest I could see is testing the resulting .tar.xz file, but from what I can tell we don’t actually test installed copies of Python on a buildbot or CI. It would be a little annoying as I would be duplicating either make test or make buildbottest manually since the Makefile doesn’t work on files unpacked in some random place that isn’t tied to the build. Plus it would seemingly be a test for making sure I didn’t miss copying a file more than validating the interpreter didn’t break. But if people want me to add a second test run in CI or repurpose the WASI buildbot to handle this I can (I don’t think having the buildbot test both an install and a build from a checkout is worth it). My guess, though, is that people don’t want a second full test run just for this.

Otherwise I am going to do one last pass at asking folks in the WASI community if there’s any specific build flags I should be thinking about before opening a PR.

8 Likes

I think it would be great to have official WASI binaries! I presume these would these be signed via sigstore and include SBOM information like the source tarballs?

We do actually run several installed buildbots for Unix, so I think it would be valuable to have the WASI buildbot test the installed version buildmaster-config/master/custom/builders.py at 0cb56386b7320b1e19185f8fc2f3bbe666de4536 · python/buildmaster-config · GitHub

I think we could use more testing against installed Pythons in general.

I wonder if you could add a command for the Platforms/WASI CLI to test against the installed layout?

1 Like

Historically the platform release managers have done some small amount of manual testing with the installer before calling it done, and it’s built into the Windows release pipeline now.

Depending on where you put the actual build steps, having a simple “does it install and can you get -m site output” or something like that before it triggers the final publish step is worth it. Running the whole suite probably isn’t - it’s more likely to flake out and mess up the release process.

1 Like

I would assume eventually, but if that’s a blocker then I can try and figure out what has to happen on my end since I doubt it’s as simple as “just copy what the source tarball does”. Basically I haven’t bugged @sethmlarson about it as that’s a release problem and not a all-code-devs problem.

The search box at Buildbot did not turn that up under “install”, so I blame Buildbot for that mistake on my part. :grin:

Yes, but I assume your question was more than just a hypothetical. :wink: I’m assuming you’re asking so the test command used on the buildbots could be used locally by someone. And I could, but it’s a risk of having skew from make buildbottest, although maybe I can override TESTRUNNER to do the appropriate thing.

2 Likes

Yes, I am asking I suppose! I do think changing make buildbottest to do the right thing with a different runner would be useful for other platforms as well.

For Sigstore it will be that easy, for SBOMs potentially less so? It depends what the builds are pulling in, but this shouldn’t be a big issue.

2 Likes

Yep, Sigstore signing is not as simple as “just copy what the source tarball does”, but it is as simple as “just copy what the Android/iOS binaries do”, they already have version gating.

SBOM is doable with more work, including on the CPython side. We have Sigstore but not SBOMs for the Android and iOS, so I’d suggest just Sigstore first, and SBOM can follow if necessary.

3 Likes

Whatever’s in the cpython repo; I’ve not started on external dependencies yet.

:+1:

2 Likes

I’ll have a look and see if I can make a Platforms/WASI buildbottest (and test for CI) work using the Makefile so I’m not forking the command.

2 Likes

I’ve opened GH-161367: Introduce `Platforms/WASI test` command by brettcannon · Pull Request #161435 · python/cpython · GitHub to add a Platforms/WASI test command as well as a general --release flag which should be enough to have the Buildbot builder create a release tarball and test it.

1 Like