Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix installation of Python packages in generate docs CI job #279

Merged
merged 3 commits into from
Oct 15, 2024

Conversation

bbannier
Copy link
Member

This job uses ubuntu-latest, i.e., it will automatically use the
newest version of Ubuntu available. On current versions pip install
refuses to install packages into the system since this might break
system packages. Users are expected to explicitly opt into this
potential breakage by passing the --break-system-packages flag. This
is an acceptable workaround here since we do not distribute this setup,
and currently things appear to not break.

This job uses `ubuntu-latest`, i.e., it will automatically use the
newest version of Ubuntu available. On current versions `pip install`
refuses to install packages into the system since this might break
system packages. Users are expected to explicitly opt into this
potential breakage by passing the `--break-system-packages` flag. This
is an acceptable workaround here since we do not distribute this setup,
and currently things appear to not break.
@bbannier bbannier self-assigned this Oct 15, 2024
@bbannier
Copy link
Member Author

bbannier commented Oct 15, 2024

This PR fixes pip-related failures. We still run into a Sphinx build error which is addressed by zeek/zeek#3976 and should pass here once the docs have been automatically bumped.

@bbannier bbannier marked this pull request as ready for review October 15, 2024 10:49
Copy link
Contributor

@evantypanski evantypanski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems better than just failing the CI job so cool

Only nit: The requirements.txt file locks into specific versions except for pygments, should we lock that in for the rare possibility that they break a system package?

Pygments>=2.12.0

Don't think it'd entirely eliminate the possibility, but may slightly reduce it

@bbannier bbannier force-pushed the topic/bbannier/ci-pip-install branch from bb081b6 to 0872b20 Compare October 15, 2024 15:06
This fixes the version of Pygments to the one bundled with the Ubuntu
image used in CI.
@bbannier bbannier force-pushed the topic/bbannier/ci-pip-install branch from 0872b20 to a49d227 Compare October 15, 2024 15:07
@bbannier
Copy link
Member Author

bbannier commented Oct 15, 2024

Good catch with Pygments which is indeed already present in the ubuntu base image. I pushed a patch which fixes it to the exact version of the image. Should we upgrade the image I'd expect this to fail since pip install cannot remove the system package (just happened to me when I used a different version).

@bbannier bbannier merged commit 24b88cf into master Oct 15, 2024
0 of 10 checks passed
@bbannier bbannier deleted the topic/bbannier/ci-pip-install branch October 15, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants