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 workaround for requires_ansible #811

Merged
merged 1 commit into from
Jan 28, 2022

Conversation

bmbouter
Copy link
Member

Collections on galaxy.ansible.com may not have the expected
requires_ansible data.

closes #806

@bmbouter bmbouter requested a review from a team as a code owner January 27, 2022 18:01
@bmbouter
Copy link
Member Author

Actually I want to add a test for this collection.... Let me add that test now.

@bmbouter bmbouter marked this pull request as draft January 27, 2022 18:05
Copy link
Member

@mdellweg mdellweg left a comment

Choose a reason for hiding this comment

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

Feel free to merge with the test in place.
(I expect a pytest heavy test... OTOH we want to backport this.)

@@ -1046,7 +1046,9 @@ def _post_save(self, batch):
)
if runtime_metadata:
runtime_yaml = yaml.safe_load(runtime_metadata)
collection_version.requires_ansible = runtime_yaml.get("requires_ansible")
if runtime_yaml:
collection_version.requires_ansible = runtime_yaml.get(
Copy link
Member

Choose a reason for hiding this comment

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

Assuming its save to leave this field empty.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it has to be based on what @awcrosby is saying #806 (comment)

@bmbouter bmbouter force-pushed the add-requires-ansible-workaround branch from 98117a8 to e2412ae Compare January 27, 2022 20:08
@@ -134,6 +134,22 @@ def test_sync_with_invalid_requirements(self):
)
self.assertRaises(ApiException, self.remote_collection_api.create, body)

def test_sync_collection_missing_requires_ansible(self):
Copy link
Member Author

Choose a reason for hiding this comment

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

I confirmed this test fails with the error I experienced without the fix. Then it passes with the fix.

@bmbouter bmbouter marked this pull request as ready for review January 27, 2022 20:10
Collections on galaxy.ansible.com may not have the expected
`requires_ansible` data.

closes pulp#806
@bmbouter bmbouter force-pushed the add-requires-ansible-workaround branch from e2412ae to 32a1238 Compare January 27, 2022 20:14
@mdellweg mdellweg merged commit 85fed51 into pulp:main Jan 28, 2022
@patchback
Copy link

patchback bot commented Jan 28, 2022

Backport to 0.11: 💚 backport PR created

✅ Backport PR branch: patchback/backports/0.11/85fed51b049cacefdcc29b642abee5ab4e36f00e/pr-811

Backported as #814

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback
Copy link

patchback bot commented Jan 28, 2022

Backport to 0.10: 💚 backport PR created

✅ Backport PR branch: patchback/backports/0.10/85fed51b049cacefdcc29b642abee5ab4e36f00e/pr-811

Backported as #815

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback
Copy link

patchback bot commented Jan 28, 2022

Backport to 0.7: 💚 backport PR created

✅ Backport PR branch: patchback/backports/0.7/85fed51b049cacefdcc29b642abee5ab4e36f00e/pr-811

Backported as #816

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@bmbouter bmbouter deleted the add-requires-ansible-workaround branch January 28, 2022 15:35
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.

Cannot mirror galaxy
3 participants