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 @@ -40,6 +40,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.13,<3.130",
"pulpcore>=3.111.0,<3.130",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is 3.111 supposed to become a supported pulpcore branch any time soon?

(Moving the LB on an unsupported branch is the only thing that makes me a bit cautious here.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could move to 3.115 if you want - I don't think in the past we've made a policy out of not doing that though.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💥! It looks like we really 🦆 up on this.
StableOrderingFilter (technically a feature) was backported to 3.105 but not 3.111 or anything between those.
Do you think it would be reasonable to add this feature based on whether the import succeeded and leave this constraint alone?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How valuable is it to keep the constraint wide open vs. just bump the lower bound?

"PyYAML>=6.0.2,<7.0",
"semantic_version>=2.9,<2.11",
]
Expand Down
Loading