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" ]