-
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 package filename filter #3216
Conversation
df608d2
to
ef061ae
Compare
pulp_rpm/app/viewsets/package.py
Outdated
@@ -31,6 +31,7 @@ class Meta: | |||
"arch": ["exact", "in", "ne", "contains", "startswith"], | |||
"pkgId": ["exact", "in"], | |||
"checksum_type": ["exact", "in", "ne"], | |||
"location_href": ["exact", "contains", "endswith"], |
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.
LGTM functionality-wise, but I'm currently looking into whether we should ditch (or deprecate anyway) the location_href
field in favor of something like "filename".
The reason being that location_href
should never have existed in the current form to begin with, it stores the full path (think syncing), which doesn't really make much sense.
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.
Ah, I knew that location_href stored the full path. I think that storing just the filename makes sense.
I'm pushing a change now that adds a "filename" filter. It looks like relative_path on the content artifact has just the filename (no path) so I think it should work and it won't depend on location_href.
45e93b7
to
5bae3e9
Compare
5bae3e9
to
af571e3
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.
At least at the moment I don't think this will work as-is because the relative path value isn't == filename, currently. But we should make it that way, IMO.
Or maybe I'm thinking of location_href and the relative path is just the filename. I need to check again...
Did you see the link I posted? It looks like in the sync code at least, relative_path is set to pulp_rpm/pulp_rpm/app/tasks/synchronizing.py Lines 1312 to 1319 in d8cb08d
|
fixes #3215