-
Notifications
You must be signed in to change notification settings - Fork 44
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
Updates pulp-smash for repo layout changes #1174
Updates pulp-smash for repo layout changes #1174
Conversation
The performance issue causes us to introduce a new model named RepositoryVersionContentDetails. This is also a great opportunity to update the content_summary of the RepositoryVersion serializer to match the recent API changes. Most of this code was inspired from a patch from @dalley. Requires PR: pulp/pulp-smash#1174 https://pulp.plan.io/issues/4283 closes #4283
The performance issue causes us to introduce a new model named RepositoryVersionContentDetails. This is also a great opportunity to update the content_summary of the RepositoryVersion serializer to match the recent API changes. Most of this code was inspired from a patch from @dalley. Requires PR: pulp/pulp-smash#1174 https://pulp.plan.io/issues/4283 closes #4283
The performance issue causes us to introduce a new model named RepositoryVersionContentDetails. This is also a great opportunity to update the content_summary of the RepositoryVersion serializer to match the recent API changes. Most of this code was inspired from a patch from @dalley. Requires PR: pulp/pulp-smash#1174 https://pulp.plan.io/issues/4283 closes #4283
39ae8cb
to
f67d322
Compare
The performance issue causes us to introduce a new model named RepositoryVersionContentDetails. This is also a great opportunity to update the content_summary of the RepositoryVersion serializer to match the recent API changes. Most of this code was inspired from a patch from @dalley. This includes smash updates that are included in a separate PR. Requires PR: pulp/pulp-smash#1174 https://pulp.plan.io/issues/4283 closes pulp#4283
f67d322
to
84cca3a
Compare
The performance issue causes us to introduce a new model named RepositoryVersionContentDetails. This is also a great opportunity to update the content_summary of the RepositoryVersion serializer to match the recent API changes. Most of this code was inspired from a patch from @dalley. This includes smash updates that are included in a separate PR. Required PR: pulp/pulp-smash#1174 https://pulp.plan.io/issues/4283 closes pulp#4283
The performance issue causes us to introduce a new model named RepositoryVersionContentDetails. This is also a great opportunity to update the content_summary of the RepositoryVersion serializer to match the recent API changes. Most of this code was inspired from a patch from @dalley. This includes smash updates that are included in a separate PR. Required PR: pulp/pulp-smash#1174 https://pulp.plan.io/issues/4283 closes pulp#4283
The performance issue causes us to introduce a new model named RepositoryVersionContentDetails. This is also a great opportunity to update the content_summary of the RepositoryVersion serializer to match the recent API changes. Most of this code was inspired from a patch from @dalley. This includes smash updates that are included in a separate PR. Required PR: pulp/pulp-smash#1174 This also fixes travis script lines that weren't updated due to pulp/pulp being moved to pulp/pulpcore. This PR needs that small fix to pass also. https://pulp.plan.io/issues/4283 closes pulp#4283
pulp_smash/pulp3/utils.py
Outdated
return client.get(version_href)[summary_field] | ||
to_return = client.get(version_href)['content_summary'][summary_field] | ||
for key in to_return: | ||
to_return[key].pop('href') # Figure out how to assert on changing hrefs in response |
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.
@bmbouter I don't get why we need to remove the href from response here, can you elaborate a little more why this is being popped out?
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.
Well it really shouldn't be but it's the best I can offer before I go away for 2 weeks.
So the response formats look like this:
The href
field changes depending on how many test have run before it so it can't easily be added to the fixture data. What do you think is the right way to resolve this issue in pulp smash?
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.
Previously Pulp had a bunch of different fields on a repository named
- content_summary
- content_added_summary
- content_removed_summary
- content_hrefs
- content_added_hrefs
- content_removed_hrefs
These are all being merged together to look like this
"content_summary: {
'added': {
'file.file': {
'count': 5,
'href': '/pulp/api/v3/content/file/files/?repository_version_added=/pulp/api/v3/repositories/1/versions/1/'
}
},
'present': {
'file.file': {
'count': 5,
'href': '/pulp/api/v3/content/file/files/?repository_version=/pulp/api/v3/repositories/1/versions/1/'
}
},
'removed': {}
}
Since the pulp_smash API is going to stay the same (for now at least), it's a hack to make it look the same as it did before.
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.
Recapping our convo, I'm going to update this function to fully preserve the previous data layout and file a pulp-smash issue to handle creating a new util function with the new interface so users can port over.
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 issue is here: #1175
The performance issue causes us to introduce a new model named RepositoryVersionContentDetails. This is also a great opportunity to update the content_summary of the RepositoryVersion serializer to match the recent API changes. Most of this code was inspired from a patch from @dalley. This includes smash updates that are included in a separate PR. Required PR: pulp/pulp-smash#1174 This also fixes travis script lines that weren't updated due to pulp/pulp being moved to pulp/pulpcore. This PR needs that small fix to pass also. You also need the pulp_file PR below because it has tests which need updates to account for this backwards incompatible API change. Required PR: pulp/pulp_file#183 https://pulp.plan.io/issues/4283 closes pulp#4283
This is designed to go along with these changes in Pulp 3.0 pulp/pulp#3896 The response format changed you we have to adjust how the utils parse the response data for tests. https://pulp.plan.io/issues/4283 re #4283
The performance issue causes us to introduce a new model named RepositoryVersionContentDetails. This is also a great opportunity to update the content_summary of the RepositoryVersion serializer to match the recent API changes. Most of this code was inspired from a patch from @dalley. This includes smash updates that are included in a separate PR to preserve backwards compatability. Required PR: pulp/pulp-smash#1174 This also fixes travis script lines that weren't updated due to pulp/pulp being moved to pulp/pulpcore. This PR needs that small fix to pass also. https://pulp.plan.io/issues/4283 closes pulp#4283
84cca3a
to
a153a5c
Compare
Updates pulp-smash for repo layout changes
This is designed to go along with these changes in Pulp 3.0
pulp/pulp#3896pulp/pulpcore#2
The response format changed you we have to adjust how the utils parse
the response data for tests.
https://pulp.plan.io/issues/4283
re #4283