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
scaleway: Fix case mismatch causing key lookup failure #68295
Conversation
Since commit f70dc26, the common http api client class used by the scaleway modules only enables automatic jsonification of the request body if the "Content-Type" header is application/json. The client only included "Content-type" in its default set of headers (notice the case variation). This caused a KeyError on send() if the caller relied on the default content-type value.
/shipit |
I notice that now that my pull request comes in the midst of a split of the ansible repo. Are you planning on creating an ansible-collections repo for the scaleway modules? If so, will you rebase this pull request or should I reopen once you've migrated? Same goes for the other pull request I opened. I have some other possible changes on the way, but I'll hold off on those a bit. Thanks! :) |
Hi Olof, thanks a lot for your contribution :) At the moment, we are focusing much of our effort on the CLI and the terraform provider for Scaleway. Once those projects are feature-complete we will come back to add support for all new products (Kapsule, LoadBalancer, Baremetal, Database, ...) inside ansible. As for the collections, we are interested because it will allow us to have our own schedule for releasing new versions without waiting for ansible maintainers approval. At the moment we haven’t investigated how to migrate our existing modules to ansible collections but we will do so soon. |
So, just to confirm: I'll just wait until you've set that up :). (The scaleway modules have been removed from this repo, so I will not be able to resolve the |
@remyleone Hi, the scaleway modules have been migrated to @olof Hi, could you please create a new PR against https://github.com/ansible-collections/community.general/blob/master/plugins/module_utils/scaleway.py then we can get it merged. If a new collection does get created, it will be done by migrating from |
@gundalow thanks, I've opened a new pull request at ansible-collections/community.general#445. |
SUMMARY
Since commit f70dc26, automatic jsonification only happens if the Content-Type header is application/json, but the class only included Content-type in its default set of headers (notice the case variation).
This caused a KeyError on send() if the caller relied on the default content-type value.
ISSUE TYPE
COMPONENT NAME
ansible.module_utils.scaleway
ADDITIONAL INFORMATION