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

Pip no cache dir #216

Merged
merged 4 commits into from
Oct 7, 2021
Merged

Pip no cache dir #216

merged 4 commits into from
Oct 7, 2021

Conversation

guimou
Copy link
Contributor

@guimou guimou commented Sep 23, 2021

This introduces a breaking change

  • Yes
  • [X ] No

This Pull Request implements

  • Fix the version of the base image registry.fedoraproject.org/f34/python3. With latest the assemble patch was not valid anymore. Other solution would be to constantly maintain the assemble patch to reflect changes in base image.
  • Added the no-cache-dir option to the all the pip install to minimize the image size.

@sesheta sesheta added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 23, 2021
@sesheta
Copy link
Member

sesheta commented Sep 23, 2021

Hi @guimou. Thanks for your PR.

I'm waiting for a thoth-station member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sesheta sesheta added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 23, 2021
@goern
Copy link
Member

goern commented Sep 25, 2021

/lgtm
assign @fridex

@sesheta sesheta added the lgtm Indicates that a PR is ready to be merged. label Sep 25, 2021
@goern
Copy link
Member

goern commented Sep 25, 2021

/ok-to-test
/assign @fridex

ping thoth-station/thoth-application#1961

@sesheta sesheta added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 25, 2021
@goern
Copy link
Member

goern commented Oct 1, 2021

/assign @guimou please have a look at the pre-commit issues, thx!!

Copy link
Contributor

@fridex fridex left a comment

Choose a reason for hiding this comment

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

Just a few comments to open a discussion for improvements. The changes proposed look good to me and reasonable - we can have the proposed additional options in a different PR if you want. Thanks for the work on this 👍🏻

@@ -83,6 +86,11 @@
- pip install -r requirements.txt
-fi
+thamos install
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
+thamos install
+thamos install -- --disable-pip-version-check --no-cache-dir

thamos uses pip under the hood, it can pass any options to pip as necessary:

https://github.com/thoth-station/thamos/#installing-requirements

When using environment variables (see bellow), the options would be automatically propagated.

if [[ -f setup.py && -z "$DISABLE_SETUP_PY_PROCESSING" ]]; then
echo "---> Installing application ..."
- pip install .
+ pip install --no-cache-dir .
Copy link
Contributor

Choose a reason for hiding this comment

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

We could eventually also include --disable-pip-version-check. Here and in other install parts above:

Suggested change
+ pip install --no-cache-dir .
+ pip install --no-cache-dir --disable-pip-version-check .

By the way, pip also supports passing options as environment variables:

https://pip.pypa.io/en/stable/topics/configuration/#environment-variables

We could set all the options globally and all the pip calls would inherit this configuration in the container image.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hum, good question...
Personal opinion: it's faster and more elegant to use the env vars. However, people looking at the assemble file won't necessarily check the Dockerfile (or whatever other means to pass those variables), so it may become difficult to understand what's going on with half the config at one place and the other somewhere else.
@fridex , any counter-arguments? 😉

Copy link
Contributor

Choose a reason for hiding this comment

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

@fridex , any counter-arguments?

Out of bullets 🔫 👍🏻

@guimou
Copy link
Contributor Author

guimou commented Oct 6, 2021

/assign @guimou please have a look at the pre-commit issues, thx!!

I'd like to, but when I click on the Details link it opens the Prow page but it is empty. I only get the tile "pre-commit #1441629034663383040" then nothing...

@fridex
Copy link
Contributor

fridex commented Oct 6, 2021

/assign @guimou please have a look at the pre-commit issues, thx!!

I'd like to, but when I click on the Details link it opens the Prow page but it is empty. I only get the tile "pre-commit #1441629034663383040" then nothing...

You can run pre-commit locally until these issues get resolved.

@sesheta sesheta removed the lgtm Indicates that a PR is ready to be merged. label Oct 6, 2021
@sesheta
Copy link
Member

sesheta commented Oct 6, 2021

New changes are detected. LGTM label has been removed.

@sesheta sesheta added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 6, 2021
Copy link
Contributor

@fridex fridex left a comment

Choose a reason for hiding this comment

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

lgtm, thanks! 👍🏻

@sesheta
Copy link
Member

sesheta commented Oct 7, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fridex

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sesheta sesheta added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 7, 2021
@sesheta sesheta merged commit 1c2686f into thoth-station:master Oct 7, 2021
@guimou guimou deleted the pip_no-cache-dir branch October 7, 2021 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. ok-to-test size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants