Skip to content
Draft
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 .github/workflows/scripts/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pulp_scheme: "https"
image:
name: "pulp"
tag: "ci_build"
ci_base: "ghcr.io/pulp/pulp-ci-centos9:latest"
ci_base: "ghcr.io/pulp/pulp-ci-centos10:latest"
source: "${COMPONENT_SOURCE}"
ci_requirements: $(test -f ci_requirements.txt && echo -n true || echo -n false)
upperbounds: $(test "${TEST}" = "pulp" && echo -n true || echo -n false)
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ include test_requirements.txt
exclude releasing.md
exclude AGENTS.md
exclude CLAUDE.md
exclude Makefile
recursive-exclude pulpcore/tasking/task_trigger_demonstration *
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# WARNING: DO NOT EDIT!
#
# This file was generated by plugin_template, and is managed by it. Please use
# './plugin-template --ci pulpcore' to update this file.
#
# For more info visit https://github.com/pulp/plugin_template

.PHONY: format
format:
ruff format
ruff check --select I --fix

.PHONY: lint
lint:
yamllint -s -d '{extends: relaxed, rules: {line-length: disable}}' .github/workflows
bump-my-version bump --dry-run --allow-dirty release
ruff format --check --diff
ruff check
check-manifest
python .ci/scripts/check_requirements.py
26 changes: 22 additions & 4 deletions pulpcore/app/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,11 @@ def _clean_app_status(sender, apps, verbosity, **kwargs):
AppStatus.objects.filter(last_heartbeat__lt=TransactionNow() - F("ttl")).delete()


def _populate_access_policies(sender, apps, verbosity, **kwargs):
def _populate_access_policies(sender, apps=None, verbosity=0, **kwargs):
from django.apps import apps as django_apps

if apps is None:
apps = django_apps
from pulpcore.app.util import get_view_urlpattern
from pulpcore.app.viewsets import LoginViewSet

Expand Down Expand Up @@ -319,7 +323,11 @@ def _populate_access_policies(sender, apps, verbosity, **kwargs):
)


def _populate_system_id(sender, apps, verbosity, **kwargs):
def _populate_system_id(sender, apps=None, verbosity=0, **kwargs):
from django.apps import apps as django_apps

if apps is None:
apps = django_apps
SystemID = apps.get_model("core", "SystemID")
if not SystemID.objects.exists():
SystemID().save()
Expand All @@ -328,8 +336,10 @@ def _populate_system_id(sender, apps, verbosity, **kwargs):
def _ensure_default_domain(sender, **kwargs):
table_names = connection.introspection.table_names()
if "core_domain" in table_names:
import pulpcore.app.util
from pulpcore.app.util import get_default_domain

pulpcore.app.util.default_domain = None
default = get_default_domain() # Cache the default domain
# Match the Pulp settings
if (
Expand All @@ -343,7 +353,11 @@ def _ensure_default_domain(sender, **kwargs):
default.save(skip_hooks=True)


def _populate_roles(sender, apps, verbosity, **kwargs):
def _populate_roles(sender, apps=None, verbosity=0, **kwargs):
from django.apps import apps as django_apps

if apps is None:
apps = django_apps
role_prefix = f"{sender.label}."
# collect all plugin defined roles
desired_roles = {}
Expand Down Expand Up @@ -402,7 +416,11 @@ def _get_permission(perm):
role.permissions.set(permissions)


def _populate_artifact_serving_distribution(sender, apps, verbosity, **kwargs):
def _populate_artifact_serving_distribution(sender, apps=None, verbosity=0, **kwargs):
from django.apps import apps as django_apps

if apps is None:
apps = django_apps
if (
settings.STORAGES["default"]["BACKEND"] == "pulpcore.app.models.storage.FileSystem"
or not settings.REDIRECT_TO_OBJECT_STORAGE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def test_remote_content_changed_with_on_demand(
# THEN
assert not output_file.exists()
assert result.returncode == 18
assert b"* Closing connection 0" in result.stderr
assert b"closing connection" in result.stderr.lower()
assert b"curl: (18) transfer closed with outstanding read data remaining" in result.stderr

# WHEN (second request)
Expand Down
7 changes: 6 additions & 1 deletion pulpcore/tests/unit/content/test_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,15 +575,20 @@ async def test_app_status_fixture_is_reusable(app_status, repeat):


@pytest.mark.asyncio
@pytest.mark.django_db
@pytest.mark.django_db(transaction=True)
async def test_async_pull_through_add(ca1, monkeypatch, app_status):
set_guid(uuid.uuid4()) # required for creating a task, no easily mockable
monkeypatch.setattr(
"pulpcore.tasking.tasks.async_are_resources_available", AsyncMock(return_value=True)
)
monkeypatch.setattr("pulpcore.tasking.tasks.wakeup_worker", Mock())
monkeypatch.setattr(
"pulpcore.tasking.redis_tasks.async_are_resources_available",
AsyncMock(return_value=True),
)

repo = await Repository.objects.acreate(name=str(uuid.uuid4()))
monkeypatch.setattr(Repository, "CONTENT_TYPES", [Content])
try:
task = await repo.async_pull_through_add_content(ca1)
assert task.state == TASK_STATES.COMPLETED
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dependencies = [
"protobuf>=4.21.1,<7.0",
"pulp-glue>=0.30.0,<0.41",
"pygtrie>=2.5,<=2.5.0",
"psycopg[binary]>=3.1.8,<3.4", # SemVer, not explicitely stated, but mentioned on multiple changes.
"psycopg[binary]>=3.3.4,<3.4", # SemVer, not explicitely stated, but mentioned on multiple changes.

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.

Does cs10 require a bump in this requirement?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The lowerbounds PR runner was failing because psycopg[binary] didn't have pre-built wheels for Python 3.12

With that said the lowerbounds probably does not need to be bumped this much and we can relax it if we need to, I just wanted to move past that issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OTOH, pip installs are sticky so users will never get an upgrade unless we bump the minimum bound. Might be worth just doing it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we cannot test it we should most definitely bump it.

"pyparsing>=3.1.0,<3.4", # Looks like only bugfixes in z-Stream.
"pysequoia>=0.1.33,<0.2",
"PyYAML>=5.1.1,<6.1", # Looks like only bugfixes in z-Stream.
Expand Down
2 changes: 1 addition & 1 deletion template_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
check_commit_message: true
check_manifest: true
check_stray_pulpcore_imports: false
ci_base_image: "ghcr.io/pulp/pulp-ci-centos9"
ci_base_image: "ghcr.io/pulp/pulp-ci-centos10"
ci_env: {}
ci_trigger: "{pull_request: {branches: ['*']}}"
cli_package: "pulp-cli"
Expand Down
Loading