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.feature
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.
8 changes: 5 additions & 3 deletions pulp_ansible/app/tasks/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
)
from pulpcore.plugin.stages import (
ArtifactDownloader,
ArtifactResourceBudget,
ArtifactSaver,
ContentAssociation,
ContentSaver,
Expand Down Expand Up @@ -213,7 +214,7 @@ async def declarative_content_from_git_repo(remote, url, git_ref=None, metadata_
return d_content


def sync(remote_pk, repository_pk, mirror, optimize):
def sync(remote_pk, repository_pk, mirror, optimize, **kwargs):
"""
Sync Collections with ``remote_pk``, and save a new RepositoryVersion for ``repository_pk``.

Expand Down Expand Up @@ -479,11 +480,12 @@ 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(),
DocsBlobDownloader(),
AnsibleContentSaver(new_version),
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies = [
"GitPython>=3.1.24,<3.2",
"jsonschema>=4.9,<4.27",
"Pillow>=10.3,<13", # Semantic Versioning https://pillow.readthedocs.io/en/stable/releasenotes/versioning.html
"pulpcore>=3.105.0,<3.115",
"pulpcore>=3.111.0,<3.115",
"PyYAML>=6.0.2,<7.0",
"semantic_version>=2.9,<2.11",
]
Expand Down
Loading