Upload local Pants PEXs to release - #19450
Conversation
|
This PR currently depends on changed from #19444, so it's draft until that gets merged and I can update this branch. It stands on its own though, so please do review. |
| pex_binary( | ||
| name="pants-pex", | ||
| dependencies=[":pants-packaged"], | ||
| script="pants", | ||
| execution_mode="venv", | ||
| shebang="/usr/bin/env python", | ||
| strip_pex_env=False, | ||
| layout="zipapp", | ||
| ) |
There was a problem hiding this comment.
This was copied from release.py, but without the --platforms flag. As I understand it, this will resolve only for the local platform, so that's exactly what we want!
There was a problem hiding this comment.
I also am hardcoding zipapp PEX to guard against __defaults__ accidentally changing that.
There was a problem hiding this comment.
I believe that you understand correctly.
| "if": "needs.release_info.outputs.is-release == 'true'", | ||
| "run": dedent( | ||
| """\ | ||
| LOCAL_TAG=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import sys;major, minor = sys.version_info[:2];import os;uname = os.uname();print(f'cp{major}{minor}-{uname.sysname.lower()}_{uname.machine.lower()}')") |
There was a problem hiding this comment.
This is my assume-nothing way of generating the tag. Using the PEX itself means we'll land the right IC, and using Python means we'll be confident scie-pants's Python script can produce a similar tag.
The value looks like: cp39_linux_x86_64
| # TODO: We should be using `./pants package` and `pex_binary` for this...If Pants is lacking in | ||
| # capabilities, we should improve Pants. When porting, using `runtime_package_dependencies` to do | ||
| # the validation. |
There was a problem hiding this comment.
I wrote this todo, so I'm extra psyched that it's now done!
There was a problem hiding this comment.
To be extremely fair, I don't think we can technically build a "universal" PEX still, but also that's hand wavy anyways
|
This looks good to review 👍 |
|
(FYI @benjyw @huonw @Eric-Arellano) I'm going to work with @kaos to give this a deadline of before-he-starts-releasing so we can let this see some runtime, and gives us a chance to stabilize any issues. If anything goes awry we can always run with the code prior to the change, or revert. We're also not cherry-picking so that we do get this time to stabilize, and so that we can have one consistent "start version" for the change (even though aspects might be uploaded to older releases) Feel free to review post-mortem and I'll do a follow-up PR. |
|
|
||
| This will tag the release with your PGP key, and push the tag to origin, which will kick off a [`Release` job](https://github.com/pantsbuild/pants/actions/workflows/release.yaml) to build the wheels and publish them to PyPI. | ||
|
|
||
| Step 4: Release a Pants PEX |
There was a problem hiding this comment.
All this red makes me happy!
| pex_binary( | ||
| name="pants-pex", | ||
| dependencies=[":pants-packaged"], | ||
| script="pants", | ||
| execution_mode="venv", | ||
| shebang="/usr/bin/env python", | ||
| strip_pex_env=False, | ||
| layout="zipapp", | ||
| ) |
There was a problem hiding this comment.
I believe that you understand correctly.
| # TODO: We should be using `./pants package` and `pex_binary` for this...If Pants is lacking in | ||
| # capabilities, we should improve Pants. When porting, using `runtime_package_dependencies` to do | ||
| # the validation. |
There was a problem hiding this comment.
I wrote this todo, so I'm extra psyched that it's now done!
This updates our docs to refer to the new release process, using GitHub Releases, instead of PyPI. The `pantsbuild.pants` package becomes somewhat of an implementation detail too, so I've adjusted these too. Also, the docs previously referred to the universal PEX we published to GitHub Releases which we no longer do (#19450), and thus references to it are removed too. --------- Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Co-authored-by: Andreas Stenius <andreas.stenius@imanage.com>
This updates our docs to refer to the new release process, using GitHub Releases, instead of PyPI. The `pantsbuild.pants` package becomes somewhat of an implementation detail too, so I've adjusted these too. Also, the docs previously referred to the universal PEX we published to GitHub Releases which we no longer do (#19450), and thus references to it are removed too. --------- Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Co-authored-by: Andreas Stenius <andreas.stenius@imanage.com>
…ick of #19924) (#19930) This updates our docs to refer to the new release process, using GitHub Releases, instead of PyPI. The `pantsbuild.pants` package becomes somewhat of an implementation detail too, so I've adjusted these too. Also, the docs previously referred to the universal PEX we published to GitHub Releases which we no longer do (#19450), and thus references to it are removed too. Co-authored-by: Huon Wilson <huon@exoflare.io> Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Co-authored-by: Andreas Stenius <andreas.stenius@imanage.com>
This updates our docs to refer to the new release process, using GitHub Releases, instead of PyPI. The `pantsbuild.pants` package becomes somewhat of an implementation detail too, so I've adjusted these too. Also, the docs previously referred to the universal PEX we published to GitHub Releases which we no longer do (#19450), and thus references to it are removed too. --------- Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Co-authored-by: Andreas Stenius <andreas.stenius@imanage.com>
…ick of #19924) (#19936) This updates our docs to refer to the new release process, using GitHub Releases, instead of PyPI. The `pantsbuild.pants` package becomes somewhat of an implementation detail too, so I've adjusted these too. Also, the docs previously referred to the universal PEX we published to GitHub Releases which we no longer do (#19450), and thus references to it are removed too. Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Co-authored-by: Andreas Stenius <andreas.stenius@imanage.com>
From #19443 and fixes #18434 (lol)
This change does 2 things:
release.pyin favor of just./pants package src/python/pants:pants-pex. It isn't universal, but we're moving away from the universal PEX.