pixi
pixi copied to clipboard
More logging options for CI
Problem description
In my CI I'm running pixi install -e <env> which by default produces no output for several minutes where I'm left wondering if it's actually hung or if it is indeed working.
To resolve this I added a -v - i.e. pixi run -v -e <env>. This printed out lots of info about *exactly what was happening - 3.5k lines in total 99.99% of which were irrelevant.
What I would like is an intermediate option for use in CI to show that something is happening - just high-level info about what packages are being downloaded, what are found in the cache, etc
I could probably live with 3.5K lines of irrelevant debug info just to know that something was happening, but adding the -v flag seemed to add 10% to my install time :(
Without -v
With -v
Sounds reasonable to me. Will add it to our todo list
I think it's worthwhile, but I wouldn't say it's a high priority - plenty of bigger fish to fry!
I think it's worthwhile, but I wouldn't say it's a high priority - plenty of bigger fish to fry!
...well, I would really like to know why it took 9mins! What parts in particular were slow?
If there were some logging about different stages of the install process you could show timestamps to see how long each stage took.
I'd also be very interested in cache hits / downloads.
We're actually currently refactoring the installation process to allow for the source builds. This comes with an overhaul to the processing. We've also noticed it's currently either not enough information or too much. This is good input!
To give a summary of my interpretation of your points:
- Give timings on certain parts of the installation
- Strip down the avalanche of debug output on
-v - On
-vget information about cache hits and downloads.
I'd say the current output which is ~nothing would be appropriate for a -q switch.
For a normal install some output at different stages would be useful so you could see it was progressing and calcualte timings for the different stages of the install process.
A -v switch could show more info about the packages being installed and the cache hits/misses which is important performance info.
I'd say the current -v output would be more appropriate for a -vv switch! 😅
NB: In CI I'm now passing -v when you rerun the workflow with debug logging enabled:
pixi auth login conda.cloudsmith.io --token ${{ secrets.CLOUDSMITH_API_KEY }}
echo "::group::Installing dependencies..."
args=("-e" "docs")
if [[ "${RUNNER_DEBUG:-0}" == "1" ]]; then
args+=("-v")
fi
pixi install "${args[@]}"
echo "::endgroup::"
...so it at least makes it easy to get the debug info if you need, but doesn't show it all by default.
Edit:
I'd like to also pass --locked in my workflows but am running into:
- https://github.com/prefix-dev/pixi/issues/1274