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

external-repos management is not idempotent due to trailing slash #125

Open
ignatenkobrain opened this issue Mar 27, 2020 · 4 comments
Open

Comments

@ignatenkobrain
Copy link
Contributor

That is added by Koji, so if you try to pass URL in ansible without trailing slash it is always shown as changed. Probably the module should automatically add trailing slash regardless of what user wants...

@ktdreyer
Copy link
Owner

Thanks for this bug report.

I'm hesitant to make the Ansible module too "smart" in this case. I'm thinking that we should just require the user to always set a value with a "slash" at the end if they want their play to be idempotent.

The documentation has this section:

       - For idempotency, please ensure your url always ends with a "/"
         character. If you leave it out, Koji Hub will automatically add a "/"
         slash when storing this value in the database, and every subsequent
         Ansible run will appear to be "changing" the external repo's URL.

What do you think?

@ktdreyer
Copy link
Owner

...I will think about this some more. Maybe this is too bad of a papercut to force users to read the docs.

@ignatenkobrain
Copy link
Contributor Author

I think as long as we mirror what koji would do, it would be safe.

@ktdreyer
Copy link
Owner

TODO: integration tests

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

No branches or pull requests

2 participants