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
Revert "Make cloudfront_info work with Python3 …" #67085
Revert "Make cloudfront_info work with Python3 …" #67085
Conversation
This reverts commit aad286b.
@tremble maybe you can confirm this... |
@@ -504,7 +504,7 @@ def get_distribution_id_from_domain_name(self, domain_name): | |||
try: | |||
distribution_id = "" | |||
distributions = self.list_distributions(False) | |||
distributions.update(self.list_streaming_distributions(False)) | |||
distributions += self.list_streaming_distributions(False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
distributions.extend(self.list_streaming_distributions(False))
+=
may be fast , extend
bring clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but both work for lists only, right?
The question remains how I managed to run into the initial error described here #66695 (comment) as I can't reproduce it anymore. The problem was that somehow both elements were dicts in that case. But now the update
won't work anymore as in fact both elements are lists now, but I am still on python 3.7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
list_streaming_distributions(self, keyed=True)
function seems to be returning dict. Shouldn't returning list
be the erorr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure at this point. I can do more testing if you want. All I figured out yesterday was that the cloudfron_info was broken for me so I reverted my initial "fix" which resolved the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you can share how are you testing it, I can also give it a try.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use
- cloudfront_info:
domain_name_alias: 'mydomain.alias.com'
distribution_config: yes
region: us-east-1
which doesn't work with distributions.update()
fix being present.
After debugging a bit more and looking through all playbook I have in my repo that use the |
LGTM |
…sible#67085) This reverts commit aad286b.
Reverts #66695
After testing again today I realized my change caused issues. Changing it back solved the issue. Also I couldn't reproduce the initial issue anymore I was trying to fix with this change. As it appears
distributions
is always alist
and never adict
. So don't know how I could provoke the error described in #66695 (where merging dicts was the issue).So I think it should be reverted.