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

Do not store uv cache, uv to use venv interpreter #16396

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

ogajduse
Copy link
Member

Problem Statement

  1. uv cache bloats the image and also causes issues in the downstream image build
  2. during the image build, in the RUN step, the shell environment is not sourced, the python environment in $APP_ROOT is not activated and therefore VIRTUAL_ENV env variable is not defined. That causes uv not to discover the venv interpreter and it creates its env in .venv and installs robottelo in it.

Solution

  1. as the upstream fedora/python-312 image forces pip to not create the cache, we should mimic it for uv too
    • set UV_NO_CACHE=1
  2. Tell uv to use Python from the existing virtual env
    • set UV_PYTHON="${APP_ROOT}/bin/python3"

@ogajduse ogajduse added CherryPick PR needs CherryPick to previous branches 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 6.16.z labels Sep 18, 2024
@ogajduse ogajduse self-assigned this Sep 18, 2024
@ogajduse ogajduse requested a review from a team as a code owner September 18, 2024 09:43
@rplevka rplevka merged commit f0f4616 into SatelliteQE:master Sep 18, 2024
12 checks passed
github-actions bot pushed a commit that referenced this pull request Sep 18, 2024
Do not store uv cache in the container image

(cherry picked from commit f0f4616)
github-actions bot pushed a commit that referenced this pull request Sep 18, 2024
Do not store uv cache in the container image

(cherry picked from commit f0f4616)
github-actions bot pushed a commit that referenced this pull request Sep 18, 2024
Do not store uv cache in the container image

(cherry picked from commit f0f4616)
github-actions bot pushed a commit that referenced this pull request Sep 18, 2024
Do not store uv cache in the container image

(cherry picked from commit f0f4616)
@ogajduse ogajduse deleted the ci/do-not-package-uv-cache branch September 19, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 6.16.z CherryPick PR needs CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants