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

Fix data_pipeline unit test - error code not properly caught #406

Merged
merged 1 commit into from
Feb 11, 2021

Conversation

tremble
Copy link
Contributor

@tremble tremble commented Feb 11, 2021

SUMMARY

We were only testing for a single error code rather than both PipelineNotFoundException and PipelineDeletedException

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

data_pipeline

ADDITIONAL INFORMATION

changelog only needed if this is released after 1.4.0

@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review module module needs_triage owner_pr PR created by owner/maintainer plugins plugin (any type) small_patch Hopefully easy to review labels Feb 11, 2021
@jillr jillr merged commit 5195a6c into ansible-collections:main Feb 11, 2021
ethemcemozkan pushed a commit to ethemcemozkan/community.aws that referenced this pull request Feb 18, 2021
@tremble tremble deleted the tests/unit/data_pipeline branch June 29, 2021 12:56
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request Jul 19, 2021
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request Jul 19, 2021
danielcotton pushed a commit to danielcotton/community.aws that referenced this pull request Nov 23, 2021
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request May 25, 2022
…name (ansible-collections#406)

Use tiny_prefix to limit the length of the 'unique' component of ELB name

Depends-On: ansible/ansible-zuul-jobs#1005
SUMMARY
Post Zuul migration names can now be much longer which causes problems
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
ec2_elb_lb
ADDITIONAL INFORMATION
https://14d6523de9e1f2ced925-16d8b6320f45d127d2ef23bdfb3eef13.ssl.cf1.rackcdn.com/404/03f3d6b089206f7c30f4ab80681a015eb4bfe078/check/ansible-test-cloud-integration-aws-py36_0/5487ad2/job-output.txt
2021-07-16 19:10:46.097502 | fedora-34 | TASK [ec2_elb_lb : Create ELB] *************************************************
2021-07-16 19:10:46.097756 | fedora-34 | task path: /home/zuul/.ansible/collections/ansible_collections/amazon/aws/tests/integration/targets/ec2_elb_lb/tasks/main.yml:38
2021-07-16 19:10:46.157175 | fedora-34 | <testhost> ESTABLISH LOCAL CONNECTION FOR USER: zuul
2021-07-16 19:10:46.158017 | fedora-34 | <testhost> EXEC /bin/sh -c 'echo ~zuul && sleep 0'
2021-07-16 19:10:46.170693 | fedora-34 | <testhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/zuul/.ansible/tmp `"&& mkdir "` echo /home/zuul/.ansible/tmp/ansible-tmp-1626462646.1694572-6660-127468165970653 `" && echo ansible-tmp-1626462646.1694572-6660-127468165970653="` echo /home/zuul/.ansible/tmp/ansible-tmp-1626462646.1694572-6660-127468165970653 `" ) && sleep 0'
2021-07-16 19:10:46.481408 | fedora-34 | Using module file /home/zuul/.ansible/collections/ansible_collections/amazon/aws/plugins/modules/ec2_elb_lb.py
2021-07-16 19:10:46.483101 | fedora-34 | <testhost> PUT /home/zuul/.ansible/tmp/ansible-local-6563_jbynpg5/tmp49ryp_c_ TO /home/zuul/.ansible/tmp/ansible-tmp-1626462646.1694572-6660-127468165970653/AnsiballZ_ec2_elb_lb.py
2021-07-16 19:10:46.484497 | fedora-34 | <testhost> EXEC /bin/sh -c 'chmod u+x /home/zuul/.ansible/tmp/ansible-tmp-1626462646.1694572-6660-127468165970653/ /home/zuul/.ansible/tmp/ansible-tmp-1626462646.1694572-6660-127468165970653/AnsiballZ_ec2_elb_lb.py && sleep 0'
2021-07-16 19:10:46.497710 | fedora-34 | <testhost> EXEC /bin/sh -c 'ANSIBLE_DEBUG_BOTOCORE_LOGS=True /home/zuul/venv/bin/python /home/zuul/.ansible/tmp/ansible-tmp-1626462646.1694572-6660-127468165970653/AnsiballZ_ec2_elb_lb.py && sleep 0'
2021-07-16 19:10:47.937426 | fedora-34 | <testhost> EXEC /bin/sh -c 'rm -f -r /home/zuul/.ansible/tmp/ansible-tmp-1626462646.1694572-6660-127468165970653/ > /dev/null 2>&1 && sleep 0'
2021-07-16 19:10:47.957657 | fedora-34 | The full traceback is:
2021-07-16 19:10:47.957707 | fedora-34 | Traceback (most recent call last):
2021-07-16 19:10:47.957727 | fedora-34 |   File "/home/zuul/.ansible/tmp/ansible-tmp-1626462646.1694572-6660-127468165970653/AnsiballZ_ec2_elb_lb.py", line 114, in <module>
2021-07-16 19:10:47.957741 | fedora-34 |     _ansiballz_main()
2021-07-16 19:10:47.957754 | fedora-34 |   File "/home/zuul/.ansible/tmp/ansible-tmp-1626462646.1694572-6660-127468165970653/AnsiballZ_ec2_elb_lb.py", line 106, in _ansiballz_main
2021-07-16 19:10:47.957766 | fedora-34 |     invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
2021-07-16 19:10:47.957779 | fedora-34 |   File "/home/zuul/.ansible/tmp/ansible-tmp-1626462646.1694572-6660-127468165970653/AnsiballZ_ec2_elb_lb.py", line 55, in invoke_module
2021-07-16 19:10:47.957791 | fedora-34 |     run_name='__main__', alter_sys=True)
2021-07-16 19:10:47.957804 | fedora-34 |   File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
2021-07-16 19:10:47.957816 | fedora-34 |     return _run_module_code(code, init_globals, run_name, mod_spec)
2021-07-16 19:10:47.957829 | fedora-34 |   File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
2021-07-16 19:10:47.957841 | fedora-34 |     mod_name, mod_spec, pkg_name, script_name)
2021-07-16 19:10:47.957853 | fedora-34 |   File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
2021-07-16 19:10:47.957865 | fedora-34 |     exec(code, run_globals)
2021-07-16 19:10:47.957878 | fedora-34 |   File "/tmp/ansible_ec2_elb_lb_payload_wa_368qa/ansible_ec2_elb_lb_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_elb_lb.py", line 1337, in <module>
2021-07-16 19:10:47.957896 | fedora-34 |   File "/tmp/ansible_ec2_elb_lb_payload_wa_368qa/ansible_ec2_elb_lb_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_elb_lb.py", line 1324, in main
2021-07-16 19:10:47.957910 | fedora-34 |   File "/tmp/ansible_ec2_elb_lb_payload_wa_368qa/ansible_ec2_elb_lb_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_elb_lb.py", line 378, in _do_op
2021-07-16 19:10:47.957922 | fedora-34 |   File "/tmp/ansible_ec2_elb_lb_payload_wa_368qa/ansible_ec2_elb_lb_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_elb_lb.py", line 455, in ensure_ok
2021-07-16 19:10:47.957943 | fedora-34 |   File "/tmp/ansible_ec2_elb_lb_payload_wa_368qa/ansible_ec2_elb_lb_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_elb_lb.py", line 687, in _create_elb
2021-07-16 19:10:47.957957 | fedora-34 |   File "/home/zuul/venv/lib/python3.6/site-packages/boto/ec2/elb/__init__.py", line 242, in create_load_balancer
2021-07-16 19:10:47.957970 | fedora-34 |     params, LoadBalancer)
2021-07-16 19:10:47.957982 | fedora-34 |   File "/home/zuul/venv/lib/python3.6/site-packages/boto/connection.py", line 1208, in get_object
2021-07-16 19:10:47.957995 | fedora-34 |     raise self.ResponseError(response.status, response.reason, body)
2021-07-16 19:10:47.958007 | fedora-34 | boto.exception.BotoServerError: BotoServerError: 400 Bad Request
2021-07-16 19:10:47.958019 | fedora-34 | <ErrorResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/">
2021-07-16 19:10:47.958031 | fedora-34 |   <Error>
2021-07-16 19:10:47.958056 | fedora-34 |     <Type>Sender</Type>
2021-07-16 19:10:47.958069 | fedora-34 |     <Code>ValidationError</Code>
2021-07-16 19:10:47.958082 | fedora-34 |     <Message>LoadBalancer name cannot be longer than 32 characters</Message>
2021-07-16 19:10:47.958094 | fedora-34 |   </Error>
2021-07-16 19:10:47.958120 | fedora-34 |   <RequestId>ac18ee90-5355-4abb-93df-99053ff37c41</RequestId>
2021-07-16 19:10:47.958134 | fedora-34 | </ErrorResponse>
2021-07-16 19:10:47.958149 | fedora-34 |
2021-07-16 19:10:47.958162 | fedora-34 | fatal: [testhost]: FAILED! => {
2021-07-16 19:10:47.958175 | fedora-34 |     "changed": false,
2021-07-16 19:10:47.958223 | fedora-34 |     "module_stderr": "Traceback (most recent call last):\n  File \"/home/zuul/.ansible/tmp/ansible-tmp-1626462646.1694572-6660-127468165970653/AnsiballZ_ec2_elb_lb.py\", line 114, in <module>\n    _ansiballz_main()\n  File \"/home/zuul/.ansible/tmp/ansible-tmp-1626462646.1694572-6660-127468165970653/AnsiballZ_ec2_elb_lb.py\", line 106, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/zuul/.ansible/tmp/ansible-tmp-1626462646.1694572-6660-127468165970653/AnsiballZ_ec2_elb_lb.py\", line 55, in invoke_module\n    run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_ec2_elb_lb_payload_wa_368qa/ansible_ec2_elb_lb_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_elb_lb.py\", line 1337, in <module>\n  File \"/tmp/ansible_ec2_elb_lb_payload_wa_368qa/ansible_ec2_elb_lb_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_elb_lb.py\", line 1324, in main\n  File \"/tmp/ansible_ec2_elb_lb_payload_wa_368qa/ansible_ec2_elb_lb_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_elb_lb.py\", line 378, in _do_op\n  File \"/tmp/ansible_ec2_elb_lb_payload_wa_368qa/ansible_ec2_elb_lb_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_elb_lb.py\", line 455, in ensure_ok\n  File \"/tmp/ansible_ec2_elb_lb_payload_wa_368qa/ansible_ec2_elb_lb_payload.zip/ansible_collections/amazon/aws/plugins/modules/ec2_elb_lb.py\", line 687, in _create_elb\n  File \"/home/zuul/venv/lib/python3.6/site-packages/boto/ec2/elb/__init__.py\", line 242, in create_load_balancer\n    params, LoadBalancer)\n  File \"/home/zuul/venv/lib/python3.6/site-packages/boto/connection.py\", line 1208, in get_object\n    raise self.ResponseError(response.status, response.reason, body)\nboto.exception.BotoServerError: BotoServerError: 400 Bad Request\n<ErrorResponse xmlns=\"http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/\">\n  <Error>\n    <Type>Sender</Type>\n    <Code>ValidationError</Code>\n    <Message>LoadBalancer name cannot be longer than 32 characters</Message>\n  </Error>\n  <RequestId>ac18ee90-5355-4abb-93df-99053ff37c41</RequestId>\n</ErrorResponse>\n\n",
2021-07-16 19:10:47.958245 | fedora-34 |     "module_stdout": "",
2021-07-16 19:10:47.958259 | fedora-34 |     "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
2021-07-16 19:10:47.958281 | fedora-34 |     "rc": 1
2021-07-16 19:10:47.958295 | fedora-34 | }

Reviewed-by: Gonéri Le Bouder <[email protected]>
Reviewed-by: Mark Chappell <None>
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request May 25, 2022
tests: disable ec2_instance for now

Depends-On: ansible/ansible-zuul-jobs#1005
SUMMARY
Disable ec2_instance until we land:

ansible-collections#411
ansible-collections#406
and figure out how to improve the reliabilty of the test.

e.g of failure: https://890aa13aa78f6724352d-5fecf071b6e8bbf9bfb6df76861c0c6d.ssl.cf1.rackcdn.com/406/8f3c9c688f226433b44c0f21c738cf79190f49f4/check/ansible-test-cloud-integration-aws-py36_1/131d33e/job-output.txt


ISSUE TYPE


Bugfix Pull Reques

COMPONENT NAME
tests

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 module module needs_triage owner_pr PR created by owner/maintainer plugins plugin (any type) small_patch Hopefully easy to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants