-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for repository-size
command
#3313
Conversation
@@ -261,6 +264,63 @@ def on_new_version(self, version): | |||
repo_config=self.repo_config, | |||
) | |||
|
|||
@property | |||
def all_content_pks(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason these all need to be properties as opposed to functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That one could be a function, but disk_size
and on_demand_size
need to be properties as that is how it is defined in pulpcore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make this one and on_demand_artifacts_for_version
into normal functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on_demand_artifacts_for_version
has to be a static method as that is how it is in pulpcore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I misread it as @property
. It's fine then
You could measure the size of one of the fixtures we use. |
What fixture has sub-repos in it? |
This one, I think https://fixtures.pulpproject.org/rpm-distribution-tree/ You'll also want to test one without distribution trees, the standard fixture will be fine for that https://fixtures.pulpproject.org/rpm-unsigned/ |
3c74ae8
to
12986b6
Compare
Ignore the test failure, it's unrelated. |
@@ -126,6 +126,9 @@ | |||
"content_summary" field on "../repositories/../versions/../". | |||
""" | |||
|
|||
RPM_UNSIGNED_FIXTURE_SIZE = 79260 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these numbers manually verified?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I manually added up the sizes on the fixture. I then double checked by performing a sync on an empty system and adding up all the artifact sizes.
The CI should also now be un-broken, if you rebase. |
12986b6
to
f926d78
Compare
Orphan cleanup is sort of broken for subrepos it seems. The artifacts are not being properly cleaned before the test runs. |
@gerrod3 IIRC this PR should pass now that the other one is merged, if it gets rebased? |
66b839a
to
03bfc08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s3 ci failure is unrelated but needs rebase
03bfc08
to
b29089e
Compare
fixes: #3312
Is there an easy way to add tests for this (know repository sizes)?