Skip to content
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

Adds alternate data format for 'date' in issued #1134

Closed
wants to merge 1 commit into from

Conversation

bmbouter
Copy link
Member

The Google updateinfo files use an alternate format for the 'date' data
for when an Erratum was issued. See the issue for more details.

This also adds a unit test of actual data from Google's repository.

https://pulp.plan.io/issues/3820
closes #3820

The Google updateinfo files use an alternate format for the 'date' data
for when an Erratum was issued. See the issue for more details.

This also adds a unit test of actual data from Google's repository.

https://pulp.plan.io/issues/3820
closes #3820
@dparalen
Copy link

@bmbouter thanks for the patch!
I'm wondering about publishing this data; does it have to be in the same "shape" i.e a sub-element in case a sub-element was used to sync? Won't a consumer break otherwise?

Cheers,
milan

@bmbouter
Copy link
Member Author

@dparalen Yeah that's a good question. This bug was focused only on the sync side, but I see what you're saying. Right now we don't have a feature set to publish data using multiple errata formats so that would be a different piece of work than what the user requested. If users need something like that I hope they file the feature request. How does that sound?

@bmbouter
Copy link
Member Author

ok test

3 similar comments
@bmbouter
Copy link
Member Author

ok test

@bmbouter
Copy link
Member Author

ok test

@daviddavis
Copy link
Contributor

ok test

@dparalen
Copy link

@bmbouter fair enough

package_info['issued'] = issued_element.attrib['date']
except KeyError:
# If there is a sub-element named 'date' instead of an attribute, use that
package_info['issued'] = issued_element.find('date').text
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens if date does not exist as a sub-element either? Which exception is it going to bubble up?

Copy link
Member Author

Choose a reason for hiding this comment

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

oh that's a good point. It probably needs to raise when there are 0 sub-elements also. A previous version I had did that. @dralley do you agree?

Copy link
Contributor

Choose a reason for hiding this comment

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

That sounds reasonable

@bmbouter
Copy link
Member Author

This is very strange, but I can't reproduce the issue now. I've commented here closing it as WORKSFORME. https://pulp.plan.io/issues/3820#note-6

@bmbouter bmbouter closed this Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants