Skip to content

Commit ff2d813

Browse files
committed
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).
1 parent 79d79f9 commit ff2d813

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

CHANGES/+resource-budget.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Take advantage of pulpcore's `ResourceBudget` feature which enables the sync pipeline to keep disk usage down without an excessive performance hit.

pulp_container/app/tasks/synchronize.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from pulpcore.plugin.stages import (
44
ArtifactDownloader,
5+
ArtifactResourceBudget,
56
ArtifactSaver,
67
DeclarativeVersion,
78
QueryExistingArtifacts,
@@ -68,11 +69,13 @@ def pipeline_stages(self, new_version):
6869
list: List of :class:`~pulpcore.plugin.stages.Stage` instances
6970
7071
"""
72+
resource_budget = ArtifactResourceBudget.from_settings()
73+
7174
pipeline = [
7275
self.first_stage,
7376
QueryExistingArtifacts(),
74-
ArtifactDownloader(),
75-
ArtifactSaver(),
77+
ArtifactDownloader(resource_budget=resource_budget),
78+
ArtifactSaver(resource_budget=resource_budget),
7679
QueryExistingContents(),
7780
ContainerContentSaver(),
7881
RemoteArtifactSaver(),

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ classifiers=[
2424
requires-python = ">=3.11"
2525
dependencies = [
2626
"jsonschema>=4.4,<4.27",
27-
"pulpcore>=3.73.2,<3.115",
27+
"pulpcore>=3.111.0,<3.115",
2828
"pyjwt[crypto]>=2.4,<2.13",
2929
"pysequoia>=0.1.33,<0.2.0"
3030
]

0 commit comments

Comments
 (0)