Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/ansible/Containerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ADD ./{{ plugin_name }}/{{ plugin_name | replace("-", "_") }}/app/webserver_snip
ADD ./{{ item.origin }} {{ item.destination }}
{%- endfor %}

# This MUST be the ONLY call to pip install in inside the container.
# This MUST be the ONLY package install inside the container.
RUN --mount=type=cache,target=/root/.cache/uv uv pip install --upgrade setuptools wheel && \
uv pip install {{ image.source }}
{%- if image.upperbounds | default(false) -%}
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ name: "Build"
on:
workflow_call:

env:
UV_SYSTEM_PYTHON: "1"

defaults:
run:
working-directory: "pulpcore"
Expand All @@ -31,16 +34,20 @@ jobs:
- uses: "actions/setup-python@v6"
with:
python-version: "3.11"
- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
enable-cache: true
- name: "Install python dependencies"
run: |
pip install build packaging twine wheel mkdocs jq
uv pip install build packaging twine wheel mkdocs jq
- name: "Build package"
run: |
python3 -m build
twine check dist/*
- name: "Install built packages"
run: |
pip install dist/pulpcore-*-py3-none-any.whl -c .ci/assets/ci_constraints.txt
uv pip install dist/pulpcore-*-py3-none-any.whl -c .ci/assets/ci_constraints.txt
- name: "Generate api specs"
run: |
pulpcore-manager openapi --file "api.json"
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
name: "Core CI"
on: {pull_request: {branches: ['*']}}

env:
UV_SYSTEM_PYTHON: "1"

concurrency:
group: ${{ github.ref_name }}-${{ github.workflow }}
cancel-in-progress: true
Expand All @@ -28,9 +31,13 @@ jobs:
- uses: "actions/setup-python@v6"
with:
python-version: "3.11"
- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
enable-cache: true
- name: "Install python dependencies"
run: |
pip install requests pygithub pyyaml
uv pip install requests pygithub pyyaml
- name: "Check commit message"
if: github.event_name == 'pull_request'
env:
Expand All @@ -55,10 +62,14 @@ jobs:
- uses: "actions/setup-python@v6"
with:
python-version: "3.12"
- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
enable-cache: true

- name: "Install python dependencies"
run: |
pip install gitpython
uv pip install gitpython

- name: "Analyze changed files"
id: "check"
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/create-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

env:
RELEASE_WORKFLOW: true
UV_SYSTEM_PYTHON: "1"

jobs:
create-branch:
Expand All @@ -38,10 +39,14 @@ jobs:
- uses: "actions/setup-python@v6"
with:
python-version: "3.11"
- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
enable-cache: true

- name: "Install python dependencies"
run: |
pip install bump-my-version packaging -r plugin_template/requirements.txt
uv pip install bump-my-version packaging -r plugin_template/requirements.txt

- name: "Setting secrets"
working-directory: "pulpcore"
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
required: true
type: "string"

env:
UV_SYSTEM_PYTHON: "1"

jobs:
changelog:
runs-on: "ubuntu-latest"
Expand All @@ -29,9 +32,13 @@ jobs:
- uses: "actions/setup-python@v6"
with:
python-version: "3.12"
- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
enable-cache: true
- name: "Install python dependencies"
run: |
pip install towncrier
uv pip install towncrier
- name: "Build changelog"
run: |
towncrier build --yes --version 4.0.0.ci
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ name: "Lint"
on:
workflow_call:

env:
UV_SYSTEM_PYTHON: "1"

defaults:
run:
working-directory: "pulpcore"
Expand All @@ -27,10 +30,14 @@ jobs:
- uses: "actions/setup-python@v6"
with:
python-version: "3.11"
- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
enable-cache: true

- name: "Install python dependencies"
run: |
pip install -r lint_requirements.txt
uv pip install -r lint_requirements.txt

- name: "Lint workflow files"
run: |
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
- cron: "00 3 * * *"
workflow_dispatch:

env:
UV_SYSTEM_PYTHON: "1"

defaults:
run:
working-directory: "pulpcore"
Expand Down Expand Up @@ -44,10 +47,14 @@ jobs:
- uses: "actions/setup-python@v6"
with:
python-version: "3.13"
- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
enable-cache: true

- name: "Install python dependencies"
run: |
pip install gitpython packaging toml
uv pip install gitpython packaging toml

- name: "Configure Git with pulpbot name and email"
run: |
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ on:
- "main"
- "[0-9]+.[0-9]+"

env:
UV_SYSTEM_PYTHON: "1"

# This workflow runs with elevated permissions.
# Do not even think about running a single bit of code from the PR.
# Static analysis should be fine however.
Expand All @@ -38,9 +41,13 @@ jobs:
- uses: "actions/setup-python@v6"
with:
python-version: "3.11"
- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
enable-cache: true
- name: "Determine PR labels"
run: |
pip install GitPython==3.1.42
uv pip install GitPython==3.1.42
git fetch origin ${{ github.event.pull_request.head.sha }}
python .ci/scripts/pr_labels.py "origin/${{ github.base_ref }}" "${{ github.event.pull_request.head.sha }}" >> "$GITHUB_ENV"
- uses: "actions/github-script@v8"
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
tags:
- "[0-9]+.[0-9]+.[0-9]+"

env:
UV_SYSTEM_PYTHON: "1"

defaults:
run:
working-directory: "pulpcore"
Expand Down Expand Up @@ -131,10 +134,14 @@ jobs:
- uses: "actions/setup-python@v6"
with:
python-version: "3.11"
- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
enable-cache: true

- name: "Install towncrier"
run: |
pip install towncrier
uv pip install towncrier

- name: "Get release notes"
id: "get_release_notes"
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ name: Core Release Pipeline
on:
workflow_dispatch:

env:
UV_SYSTEM_PYTHON: "1"

defaults:
run:
working-directory: "pulpcore"
Expand All @@ -31,10 +34,14 @@ jobs:
- uses: "actions/setup-python@v6"
with:
python-version: "3.11"
- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
enable-cache: true

- name: "Install python dependencies"
run: |
pip install bump-my-version towncrier
uv pip install bump-my-version towncrier

- name: "Configure Git with pulpbot name and email"
run: |
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ name: "Sanity"
on:
workflow_call:

env:
UV_SYSTEM_PYTHON: "1"

defaults:
run:
working-directory: "pulpcore"
Expand All @@ -30,10 +33,14 @@ jobs:
- uses: "actions/setup-python@v6"
with:
python-version: "3.11"
- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
enable-cache: true

- name: "Install python dependencies"
run: |
pip install -r lint_requirements.txt
uv pip install -r lint_requirements.txt

- name: "Verify bump version config"
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ if [ "$TEST" = "s3" ]; then
s3_test: true
minio_access_key: "${MINIO_ACCESS_KEY}"
minio_secret_key: "${MINIO_SECRET_KEY}"
pulp_scenario_settings: {"DISABLED_authentication_backends": "@merge django.contrib.auth.backends.RemoteUserBackend", "DISABLED_authentication_json_header": "HTTP_X_RH_IDENTITY", "DISABLED_authentication_json_header_jq_filter": ".identity.user.username", "DISABLED_authentication_json_header_openapi_security_scheme": {"description": "External OAuth integration", "flows": {"clientCredentials": {"scopes": {"api.console": "grant_access_to_pulp"}, "tokenUrl": "https://your-identity-provider/token/issuer"}}, "type": "oauth2"}, "DISABLED_rest_framework__default_authentication_classes": "@merge pulpcore.app.authentication.JSONHeaderRemoteAuthentication", "MEDIA_ROOT": "", "STORAGES": {"default": {"BACKEND": "storages.backends.s3boto3.S3Boto3Storage", "OPTIONS": {"access_key": "AKIAIT2Z5TDYPX3ARJBA", "addressing_style": "path", "bucket_name": "pulp3", "default_acl": "@none", "endpoint_url": "http://minio:9000", "region_name": "eu-central-1", "secret_key": "fqRvjWaPU5o0fCqQuUWbj9Fainj2pVZtBCiDiieS", "signature_version": "s3v4"}}, "staticfiles": {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"}}, "api_root": "/rerouted/djnd/", "domain_enabled": true, "hide_guarded_distributions": true, "rest_framework__default_permission_classes": ["pulpcore.plugin.access_policy.AccessPolicyFromSettings"], "spectacular_settings__oas_version": "3.0.3"}
pulp_scenario_settings: {"DISABLED_authentication_backends": "@merge django.contrib.auth.backends.RemoteUserBackend", "DISABLED_authentication_json_header": "HTTP_X_RH_IDENTITY", "DISABLED_authentication_json_header_jq_filter": ".identity.user.username", "DISABLED_authentication_json_header_openapi_security_scheme": {"description": "External OAuth integration", "flows": {"clientCredentials": {"scopes": {"api.console": "grant_access_to_pulp"}, "tokenUrl": "https://your-identity-provider/token/issuer"}}, "type": "oauth2"}, "DISABLED_rest_framework__default_authentication_classes": "@merge pulpcore.app.authentication.JSONHeaderRemoteAuthentication", "ENABLE_V4_API": true, "MEDIA_ROOT": "", "STORAGES": {"default": {"BACKEND": "storages.backends.s3boto3.S3Boto3Storage", "OPTIONS": {"access_key": "AKIAIT2Z5TDYPX3ARJBA", "addressing_style": "path", "bucket_name": "pulp3", "default_acl": "@none", "endpoint_url": "http://minio:9000", "region_name": "eu-central-1", "secret_key": "fqRvjWaPU5o0fCqQuUWbj9Fainj2pVZtBCiDiieS", "signature_version": "s3v4"}}, "staticfiles": {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"}}, "api_root": "/rerouted/djnd/", "domain_enabled": true, "hide_guarded_distributions": true, "rest_framework__default_permission_classes": ["pulpcore.plugin.access_policy.AccessPolicyFromSettings"], "spectacular_settings__oas_version": "3.0.3"}
pulp_scenario_env: {}
VARSYAML
fi
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/scripts/before_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ echo "# Constraints Files:"
tail -v -n +1 ../*/*constraints.txt || true

echo
echo "# pip list outside the container"
pip list
echo "# package list outside the container"
uv pip list

echo
echo "# pip list inside the container"
cmd_prefix bash -c "pip3 list"
echo "# package list inside the container"
cmd_prefix bash -c "uv pip list"

echo
echo "# State of the containers"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ source .github/workflows/scripts/utils.sh

PIP_REQUIREMENTS=("pulp-cli" "yq")

# This must be the **only** call to "pip install" on the test runner.
pip install ${PIP_REQUIREMENTS[*]}
# This must be the **only** package install on the test runner.
uv pip install ${PIP_REQUIREMENTS[*]}

if [[ "$TEST" = "s3" ]]; then
for i in {1..3}
Expand All @@ -33,7 +33,7 @@ fi
fi

# Check out the pulp-cli branch matching the installed version.
PULP_CLI_VERSION="$(pip freeze | sed -n -e 's/pulp-cli==//p')"
PULP_CLI_VERSION="$(uv pip freeze | sed -n -e 's/pulp-cli==//p')"
git clone --depth 1 --branch "$PULP_CLI_VERSION" https://github.com/pulp/pulp-cli.git ../pulp-cli

PULP_API_ROOT="$(yq -r '.pulp_scenario_settings.api_root // .pulp_settings.api_root // "/pulp/"' < .ci/ansible/vars/main.yaml)"
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/scripts/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ cmd_stdin_prefix bash -c "cat > /tmp/unittest_requirements.txt" < unittest_requi
cmd_stdin_prefix bash -c "cat > /tmp/functest_requirements.txt" < functest_requirements.txt
cmd_stdin_prefix bash -c "cat > /tmp/bindings_requirements.txt" < bindings_requirements.txt
cmd_stdin_prefix bash -c "cat > /tmp/bindings_constraints.txt" < bindings_constraints.txt
cmd_prefix pip3 install -r /tmp/unittest_requirements.txt -r /tmp/functest_requirements.txt -r /tmp/bindings_requirements.txt -c /tmp/bindings_constraints.txt
cmd_prefix uv pip install -r /tmp/unittest_requirements.txt -r /tmp/functest_requirements.txt -r /tmp/bindings_requirements.txt -c /tmp/bindings_constraints.txt

CERTIFI=$(cmd_prefix python3 -c 'import certifi; print(certifi.where())')
cmd_prefix bash -c "cat /etc/pulp/certs/pulp_webserver.crt >> '$CERTIFI'"
Expand Down Expand Up @@ -170,13 +170,7 @@ export PULP_FIXTURES_URL="http://pulp-fixtures:8080"
# some pulp-cli tests use the api root envvar
export PULP_API_ROOT="$(EDITOR=cat pulp config edit 2>/dev/null | awk -F'"' '/api_root/{print $2; exit}')"
pushd ../pulp-cli
if [[ -f "test_requirements.txt" ]]
then
pip install -r test_requirements.txt
pytest -v tests -m "pulpcore or pulp_file or pulp_certguard"
else
PULP_CA_BUNDLE="/usr/local/share/ca-certificates/pulp_webserver.crt" make livetest PYTEST_MARK="live and (pulpcore or pulp_file or pulp_certguard)"
fi
PULP_CA_BUNDLE="/usr/local/share/ca-certificates/pulp_webserver.crt" make paralleltest PYTEST_MARK="live and (pulpcore or pulp_file or pulp_certguard)"
popd

if [ -f "$POST_SCRIPT" ]; then
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
required: true
type: "string"

env:
UV_SYSTEM_PYTHON: "1"

defaults:
run:
working-directory: "pulpcore"
Expand Down Expand Up @@ -41,7 +44,6 @@ jobs:
- uses: "actions/setup-python@v6"
with:
python-version: "3.11"

- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
Expand Down Expand Up @@ -83,7 +85,7 @@ jobs:

- name: "Install python dependencies"
run: |
pip install build towncrier twine wheel httpie docker netaddr boto3 'ansible~=10.3.0' mkdocs jq jsonpatch bump-my-version
uv pip install build towncrier twine wheel httpie docker netaddr boto3 'ansible~=10.3.0' mkdocs jq jsonpatch bump-my-version
echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/pulpcore/.ci/assets/httpie/" >> $GITHUB_ENV

- name: "Set environment variables"
Expand Down Expand Up @@ -153,5 +155,5 @@ jobs:
docker logs pulp || true
docker exec pulp ls -latr /etc/yum.repos.d/ || true
docker exec pulp cat /etc/yum.repos.d/* || true
docker exec pulp bash -c "pip3 list" || true
docker exec pulp bash -c "uv pip list" || true
...
Loading
Loading