From a4aae46a0bb26c479fd472b6ce6b768b0b8b551b Mon Sep 17 00:00:00 2001 From: Daniel Alley Date: Wed, 8 Apr 2026 09:31:06 -0400 Subject: [PATCH] Adopt the "ArtifactResourceBudget" limiter from Pulpcore Puts a limiter on the amount of data that can be held locally between artifact download and saving (to content storage). --- CHANGES/+resource-budget.bugfix | 1 + pulp_container/app/tasks/synchronize.py | 7 +++++-- pyproject.toml | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 CHANGES/+resource-budget.bugfix diff --git a/CHANGES/+resource-budget.bugfix b/CHANGES/+resource-budget.bugfix new file mode 100644 index 000000000..b957a59e8 --- /dev/null +++ b/CHANGES/+resource-budget.bugfix @@ -0,0 +1 @@ +Take advantage of pulpcore's `ResourceBudget` feature which enables the sync pipeline to keep disk usage down without an excessive performance hit. diff --git a/pulp_container/app/tasks/synchronize.py b/pulp_container/app/tasks/synchronize.py index 72cfc2022..aa2ffa051 100644 --- a/pulp_container/app/tasks/synchronize.py +++ b/pulp_container/app/tasks/synchronize.py @@ -2,6 +2,7 @@ from pulpcore.plugin.stages import ( ArtifactDownloader, + ArtifactResourceBudget, ArtifactSaver, DeclarativeVersion, QueryExistingArtifacts, @@ -68,11 +69,13 @@ def pipeline_stages(self, new_version): list: List of :class:`~pulpcore.plugin.stages.Stage` instances """ + resource_budget = ArtifactResourceBudget.from_settings() + pipeline = [ self.first_stage, QueryExistingArtifacts(), - ArtifactDownloader(), - ArtifactSaver(), + ArtifactDownloader(resource_budget=resource_budget), + ArtifactSaver(resource_budget=resource_budget), QueryExistingContents(), ContainerContentSaver(), RemoteArtifactSaver(), diff --git a/pyproject.toml b/pyproject.toml index f3e5826f5..592522ce2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers=[ requires-python = ">=3.11" dependencies = [ "jsonschema>=4.4,<4.27", - "pulpcore>=3.73.2,<3.115", + "pulpcore>=3.111.0,<3.115", "pyjwt[crypto]>=2.4,<2.13", "pysequoia>=0.1.33,<0.2.0" ]