Skip to content
Open
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
1 change: 1 addition & 0 deletions CHANGES/+resource-budget.bugfix
Original file line number Diff line number Diff line change
@@ -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.
7 changes: 5 additions & 2 deletions pulp_container/app/tasks/synchronize.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from pulpcore.plugin.stages import (
ArtifactDownloader,
ArtifactResourceBudget,
ArtifactSaver,
DeclarativeVersion,
QueryExistingArtifacts,
Expand Down Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand Down
Loading