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
6 changes: 6 additions & 0 deletions .ci/scripts/pr_labels.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/bin/env python3
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "gitpython>=3.1.62",
# ]
# ///

# This script is running with elevated privileges from the main branch against pull requests.

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,15 @@ jobs:
fetch-depth: 0
- uses: "actions/setup-python@v6"
with:
python-version: "3.11"
python-version: "3.14"
- name: "Install uv"
uses: "astral-sh/setup-uv@v7"
with:
enable-cache: true
- name: "Determine PR labels"
run: |
uv pip install GitPython<3.2
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"
uv run --script .ci/scripts/pr_labels.py "origin/${{ github.base_ref }}" "${{ github.event.pull_request.head.sha }}" >> "$GITHUB_ENV"
- uses: "actions/github-script@v8"
name: "Apply PR Labels"
with:
Expand Down
8 changes: 8 additions & 0 deletions plugin-template
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import shutil
import subprocess
import sys
import typing as t
from contextlib import suppress
from pathlib import Path

import jamldump
Expand Down Expand Up @@ -334,6 +335,13 @@ def load_config(plugin_config_path: Path, verbose: bool) -> tuple[dict[str, t.An
if "flake8_ignore" in config:
config["lint_ignore"] = config.pop("flake8_ignore")
write_new_config = True
# Migrate minio to rustfs
with suppress(KeyError):
if "s3boto3" in config["pulp_settings_s3"]["STORAGES"]["default"]["BACKEND"]:
config["pulp_settings_s3"]["STORAGES"]["default"]["OPTIONS"]["endpoint_url"] = (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't this also check to see if the url is minio? This migration will always run even after the switch to rustfs?

@mdellweg mdellweg Sep 16, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

What even is the benefit for plugins to overwrite this config in the first place?
The parameters with which the container is started are in control of the plugin.

Otoh whatever we template here still goes through test and review on every single plugin branch. So i opt for not borrowing problems of another universe here.

(The whole scenario framework should be less centered around three select storage apis. But this is where we are today.)

"https://rustfs:9000"
)
write_new_config = True
# remove deprecated options
for key in set(config.keys()) - set(DEFAULT_SETTINGS.keys()):
config.pop(key)
Expand Down
8 changes: 7 additions & 1 deletion templates/github/.ci/scripts/pr_labels.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
#!/bin/env python3
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "gitpython>=3.1.62",
# ]
# ///

# This script is running with elevated privileges from the main branch against pull requests.

import re
import sys
import tomllib
from pathlib import Path

import tomllib
from git import Repo


Expand Down
4 changes: 2 additions & 2 deletions templates/github/.github/workflows/pr_checks.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ jobs:
pull-requests: "write"
steps:
{{ checkout(depth=0) | indent(6) }}
{{ setup_python() | indent(6) }}
{{ setup_python(pyversion="3.14") | indent(6) }}
- name: "Determine PR labels"
run: |
{%- raw %}
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"
uv run --script .ci/scripts/pr_labels.py "origin/${{ github.base_ref }}" "${{ github.event.pull_request.head.sha }}" >> "$GITHUB_ENV"
{%- endraw %}
- uses: "actions/github-script@v8"
name: "Apply PR Labels"
Expand Down
Loading