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

koji_tag: use editTagExternalRepo #154

Open
ktdreyer opened this issue Apr 24, 2020 · 1 comment
Open

koji_tag: use editTagExternalRepo #154

ktdreyer opened this issue Apr 24, 2020 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ktdreyer
Copy link
Owner

If an external repository is a wrong priority or merge_mode for a tag, the koji_tag Ansible module removes the repo and then re-adds it with the correct settings. We did this to work around a bug in the editTagExternalRepo RPC, https://pagure.io/koji/issue/1857

The editTagExternalRepo RPC is working now in Koji v1.21. We should be able to use editTagExternalRepo now if the hub is running that version.

To avoid hitting the bug on old Koji hubs, we should always pass the merge_mode kwarg to editTagExternalRepo. This will cause old/broken Koji hubs to raise an error, rather than silently wiping out a non-"koji" merge_mode.

The purpose of this change is to shrink race conditions where the repos are incorrect, and apply large changes faster.

@ktdreyer
Copy link
Owner Author

This is pretty low-priority for me relative to the other tickets.

We would be shrinking (not eliminating) the race condition here, because the hub's edit_tag_external_repo() method simply calls remove_external_repo_from_tag() and then add_external_repo_to_tag() internally. There is still a small window where the repo(s) are missing from the tag.

It is going to add more complexity to provide backwards-compatibility for hubs prior to v1.21.

Not going to discourage anyone else from working on this... :)

@ktdreyer ktdreyer added the help wanted Extra attention is needed label Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant