From 111c69864c63758b7edb292fdc20bc5e54b8295c Mon Sep 17 00:00:00 2001 From: Chris Novakovic Date: Mon, 27 Oct 2025 16:23:42 +0000 Subject: [PATCH] CI: simplify steps for using in-repo please_pex tool The circular dependency between please_pex and its bootstrap archive was broken in #266, allowing for the plugin to be configured to use `//tools_please_pex` as its own pex tool. This is simpler than building the please_pex binary in one step, copying it elsewhere in the file system for persistence, then configuring future steps to use that binary as the pex tool. --- .github/workflows/plugin_test.yaml | 7 ++----- .gitignore | 2 -- .plzconfig.tool_dev | 13 ------------- tools/BUILD | 13 ------------- 4 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 .plzconfig.tool_dev diff --git a/.github/workflows/plugin_test.yaml b/.github/workflows/plugin_test.yaml index 07c4d694..13274b62 100644 --- a/.github/workflows/plugin_test.yaml +++ b/.github/workflows/plugin_test.yaml @@ -38,13 +38,10 @@ jobs: - name: Configure plugin's default Python interpreter run: | echo "PLZ_ARGS=-o plugin.python.defaultinterpreter:${{ steps.python.outputs.python-path }}" >> $GITHUB_ENV - - name: Build please_pex + - name: Configure plugin to use please_pex tool built from source if: inputs.please_pex_from_repo - # This copies the please_pex binary into the runner user's home directory so it persists across steps. run: | - ./pleasew build //tools/please_pex - cp $(./pleasew query outputs //tools/please_pex) $HOME/please_pex - echo "PLZ_ARGS="$(grep ^PLZ_ARGS= $GITHUB_ENV | cut -d= -f2-)" -o plugin.python.pextool:$HOME/please_pex" >> $GITHUB_ENV + echo "PLZ_ARGS="$(grep ^PLZ_ARGS= $GITHUB_ENV | cut -d= -f2-)" -o plugin.python.pextool://tools/please_pex" >> $GITHUB_ENV - name: Run tests run: ./pleasew test --keep_going --log_file plz-out/log/test.log ${{ inputs.test_targets }} - name: Archive logs diff --git a/.gitignore b/.gitignore index 540cc99a..612d9cea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -tools/please_pex_dev - # Entries below this point are managed by Please (DO NOT EDIT) plz-out .plzconfig.local diff --git a/.plzconfig.tool_dev b/.plzconfig.tool_dev deleted file mode 100644 index 07d5a6c3..00000000 --- a/.plzconfig.tool_dev +++ /dev/null @@ -1,13 +0,0 @@ -; This configuration uses the in-repo versions of the Python tools, rather than the released -; versions that are downloaded from GitHub Releases in //tools. -; -; To use this configuration: -; 1) Run `plz build //tools/please_pex` -; 2) Run `cp -f plz-out/bin/tools/please_pex/please_pex tools/please_pex_dev` -; 3) Run `plz --profile=tool_dev [...]` - -[Plugin "python"] -PexTool = //tools:please_pex_dev - -[BuildEnv] -tool-dev = true diff --git a/tools/BUILD b/tools/BUILD index f07fc90e..aa244066 100644 --- a/tools/BUILD +++ b/tools/BUILD @@ -13,16 +13,3 @@ remote_file( binary = True, visibility = ["PUBLIC"], ) - -# This target is only intended for use during plugin development. Its only purpose is to break the -# mutual dependency between please_pex and the python_wheels in the bootstrap pex, which prevents -# PexTool from being set to //tools/please_pex in order to test changes to please_pex. -# -# See .plzconfig.tool_test for more details. -filegroup( - name = "please_pex_dev", - srcs = ["please_pex_dev"], - binary = True, - labels = ["manual"], - visibility = ["PUBLIC"], -)