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

fixed _merge_dictionaries calls in GcpSession class #59375

Merged
merged 1 commit into from
Jul 28, 2019

Conversation

itaimalek
Copy link
Contributor

@itaimalek itaimalek commented Jul 22, 2019

SUMMARY

This is the same issue as in #57140 ,
in lib/ansible/module_utils/gcp_utils.py file there are two classes:

GcpSession and GcpModule both are using similar private methods with same name _merge_dictionaries

the problem is that GcpSession calls for that method with merge_dictionaries and not _merge_dictionaries , this causes any interaction with gcp to fail with:

fatal: [localhost]: FAILED! => {
    "changed": false,
    "module_stderr": "/home/ansible/.ansible/tmp/ansible-tmp-1559152385.660594-245273378382856/AnsiballZ_gcp_storage_object.py:68: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses\n  import imp\nTraceback (most recent call last):\n  File \"/home/ansible/.ansible/tmp/ansible-tmp-1559152385.660594-245273378382856/AnsiballZ_gcp_storage_object.py\", line 262, in <module>\n    _ansiballz_main()\n  File \"/home/ansible/.ansible/tmp/ansible-tmp-1559152385.660594-245273378382856/AnsiballZ_gcp_storage_object.py\", line 252, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/ansible/.ansible/tmp/ansible-tmp-1559152385.660594-245273378382856/AnsiballZ_gcp_storage_object.py\", line 120, in invoke_module\n    imp.load_module('__main__', mod, module, MOD_DESC)\n  File \"/usr/lib/python3.7/imp.py\", line 234, in load_module\n    return load_source(name, filename, file)\n  File \"/usr/lib/python3.7/imp.py\", line 169, in load_source\n    module = _exec(spec, sys.modules[name])\n  File \"<frozen importlib._bootstrap>\", line 630, in _exec\n  File \"<frozen importlib._bootstrap_external>\", line 728, in exec_module\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\n  File \"/tmp/ansible_gcp_storage_object_payload_pk1f5ss7/__main__.py\", line 284, in <module>\n  File \"/tmp/ansible_gcp_storage_object_payload_pk1f5ss7/__main__.py\", line 188, in main\n  File \"/tmp/ansible_gcp_storage_object_payload_pk1f5ss7/__main__.py\", line 204, in upload_file\n  File \"/tmp/ansible_gcp_storage_object_payload_pk1f5ss7/ansible_gcp_storage_object_payload.zip/ansible/module_utils/gcp_utils.py\", line 96, in post_contents\nAttributeError: 'GcpSession' object has no attribute 'merge_dictionaries'\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

gcp_storage_object

ADDITIONAL INFORMATION

see above

@ansibot
Copy link
Contributor

ansibot commented Jul 22, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. community_review In order to be merged, this PR must follow the community review workflow. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. python3 small_patch support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback. labels Jul 22, 2019
Copy link
Member

@Akasurde Akasurde left a comment

Choose a reason for hiding this comment

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

shipit

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Jul 22, 2019
@Akasurde
Copy link
Member

@rambleraptor Could you please take a look at this ? Thanks in advance.

@Akasurde Akasurde self-assigned this Jul 23, 2019
@Akasurde Akasurde merged commit c24b841 into ansible:devel Jul 28, 2019
@flaper87
Copy link
Contributor

Will this be backported to 2.8? Thanks!

@Akasurde
Copy link
Member

@flaper87 Backport 2.8 - #59782

@ansible ansible locked and limited conversation to collaborators Aug 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. community_review In order to be merged, this PR must follow the community review workflow. new_contributor This PR is the first contribution by a new community member. python3 small_patch support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants