suppress messages --level=error TL;DR - `--level...
# general
f
suppress messages --level=error TL;DR •
--level=error
is not being honored • where / which / why does pant uninstall setuptools 58.1.0 - and where is that occuring šŸ˜„ ? Details I have just upgraded our pipeline to 2.18.0 from 2.16.0 - and in locations where we need the output from pants, I am seeing the following output
Copy code
Installing pantsbuild.pants==2.18.0 into a virtual environment at /cache/my-cache/nce/3d6643e46b53e4cc0b2a0d5c768866226ddce3de1f57f80c4a02d8d39800fa8e/bindings/venvs/2.18.0
Found existing installation: setuptools 58.1.0
Uninstalling setuptools-58.1.0:
  Successfully uninstalled setuptools-58.1.0
The command being run is
Copy code
pants --level=error --filter-target-type=docker_image --tag=cicd list ::
but it seems the
--level=error
is letting this message through (breaking the output we are expecting, of a list of targets) In the docker image - we have these installs (but I suspect that pants has it's own pex, and so it is that or something in the cache that we need to deal with (upgrading setuptools 58.1.0 - to ?? some version.
Copy code
RUN python3 -m pip install --upgrade pip && \
    pip install \
    coverage==6.4 \
    pytest-cov==3.0.0 \
    twine==4.0.2 \
    pre-commit==3.5.0 \
    setuptools==68.2.2 \
    setuptools_scm==8.0.4 \
    wheel==0.41.2 \
    docopt-ng==0.9.0 \
    yq==3.2.3 \
    python-gitlab==3.15.0
admittedly, these are perhaps hang-overs in the pipeline from when we were not using pants for the core builds.
c
the "Installing pantsbuild.pants==2.18.0" output makes it look like that's coming from the sci installer. If you just upgraded, that would need to install pants 2.18 (if you have a persistent cache, this will only need to happen once). The sci might just not be containing all of its logging.
you can try running
pants --version
and discarding that output before the commands that you actually need the output of.
f
true - thanks Daniel - i suspect - we have a set of build servers that don't share the cache - so it will need to "propogate". shared caching later šŸ˜„
šŸ‘ 1
c
ah, then the "version" trick might help you along (and future-proof for the next time you upgrade). I agree it's an inconsistency on our part that the bootstrapper doesn't follow "--level=error".
f
yes - agree - thanks šŸ˜„