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

ec2_vpc_vpn - fix exception when running in check mode without tags set #1242

Conversation

tremble
Copy link
Contributor

@tremble tremble commented Jun 19, 2022

SUMMARY
  • Rename ec2_vpc_vpn_info tests to ec2_vpc_vpn so we have baseline testing for VPNs (keep ec2_vpc_vpn_info as an alias)
  • fix exception when run in check mode without tags set.
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ec2_vpc_vpn

ADDITIONAL INFORMATION
TASK [ec2_vpc_vpn : (check) No change to tags without setting tags] ************
task path: /root/ansible_collections/community/aws/tests/output/.tmp/integration/ec2_vpc_vpn-oywt620e-ÅÑŚÌβŁÈ/tests/integration/targets/ec2_vpc_vpn/tasks/tags.yml:248
Using module file /root/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py
Pipelining is enabled.
<testhost> ESTABLISH LOCAL CONNECTION FOR USER: root
<testhost> EXEC /bin/sh -c 'ANSIBLE_DEBUG_BOTOCORE_LOGS=True /usr/bin/python3.10 && sleep 0'
The full traceback is:
Traceback (most recent call last):
  File "<stdin>", line 121, in <module>
  File "<stdin>", line 113, in _ansiballz_main
  File "<stdin>", line 61, in invoke_module
  File "/usr/lib/python3.10/runpy.py", line 209, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib/python3.10/runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py", line 808, in <module>
  File "/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py", line 795, in main
  File "/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py", line 714, in ensure_present
  File "/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py", line 661, in get_check_mode_results
AttributeError: 'NoneType' object has no attribute 'keys'
fatal: [testhost]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"<stdin>\", line 121, in <module>\n  File \"<stdin>\", line 113, in _ansiballz_main\n  File \"<stdin>\", line 61, in invoke_module\n  File \"/usr/lib/python3.10/runpy.py\", line 209, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib/python3.10/runpy.py\", line 96, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib/python3.10/runpy.py\", line 86, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py\", line 808, in <module>\n  File \"/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py\", line 795, in main\n  File \"/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py\", line 714, in ensure_present\n  File \"/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py\", line 661, in get_check_mode_results\nAttributeError: 'NoneType' object has no attribute 'keys'\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review integration tests/integration module module needs_triage plugins plugin (any type) python3 tests tests traceback labels Jun 19, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

ansible-galaxy-importer FAILURE in 4m 38s (non-voting)
✔️ build-ansible-collection SUCCESS in 4m 39s
✔️ ansible-test-sanity-docker-devel SUCCESS in 9m 24s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 9m 09s
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 11m 21s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 48s
✔️ ansible-test-units-community-aws-python38 SUCCESS in 5m 52s
✔️ ansible-test-units-community-aws-python39 SUCCESS in 6m 08s
✔️ ansible-test-splitter SUCCESS in 2m 28s
✔️ integration-community.aws-1 SUCCESS in 10m 53s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED

@tremble tremble added the mergeit Merge the PR (SoftwareFactory) label Jun 20, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

ansible-galaxy-importer FAILURE in 4m 38s (non-voting)
✔️ build-ansible-collection SUCCESS in 5m 11s
✔️ ansible-test-sanity-docker-devel SUCCESS in 12m 23s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 13m 05s
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 33s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 46s
✔️ ansible-test-units-community-aws-python38 SUCCESS in 7m 06s
✔️ ansible-test-units-community-aws-python39 SUCCESS in 6m 16s
✔️ ansible-test-splitter SUCCESS in 3m 09s
✔️ integration-community.aws-1 SUCCESS in 10m 45s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 3433640 into ansible-collections:main Jun 20, 2022
@tremble tremble deleted the tests/ec2_vpc_vpn branch July 7, 2022 19:26
abikouo pushed a commit to abikouo/community.aws that referenced this pull request Oct 24, 2023
tox: add description

Reviewed-by: Mark Chappell <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug community_review integration tests/integration mergeit Merge the PR (SoftwareFactory) module module needs_triage plugins plugin (any type) python3 tests tests traceback
Development

Successfully merging this pull request may close these issues.

3 participants