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

[Error Handling] Better messaging around cross-partition tests that are certain to fail #620

Open
andrew-glenn opened this issue Nov 3, 2020 · 1 comment
Labels

Comments

@andrew-glenn
Copy link
Collaborator

Need to handle cross-partition launches better when creds for the additional partitions aren't present; It'll fail, so don't bother launching.

@gattasrikanth
Copy link

Sample config to repro:

project:
  name: my-demo
  shorten_stack_name: true
  template: demo.template
  regions:
    - us-east-1
    - us-gov-east-1
    - us-gov-west-1
    - cn-north-1
    - cn-northwest-1
  tests:
   t1:
    parameters:
      EmailAddress: '[email protected]'

Below is the error message when running taskcat:


·[0;30;41m[ERROR  ] : ClientError An error occurred (InvalidToken) when calling the GetBucketLocation operation: The provided token is malformed or otherwise invalid.
--
786 | Traceback (most recent call last):
787 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/site-packages/taskcat/_cli.py", line 46, in main
788 | cli.run()
789 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/site-packages/taskcat/_cli_core.py", line 308, in run
790 | return getattr(command(), subcommand)(**args)
791 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/site-packages/taskcat/_cli_modules/test.py", line 178, in run
792 | test_definition.create_stacks()
793 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/site-packages/taskcat/_cfn/threaded.py", line 63, in create_stacks
794 | fan_out(self._create_stacks_for_test, {"tags": tags}, tests, threads)
795 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/site-packages/taskcat/_cfn/threaded.py", line 22, in fan_out
796 | results = pool.map(func, payload)
797 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/pool.py", line 364, in map
798 | return self._map_async(func, iterable, mapstar, chunksize).get()
799 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/pool.py", line 768, in get
800 | raise self._value
801 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/pool.py", line 125, in worker
802 | result = (True, func(*args, **kwds))
803 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
804 | return list(map(*args))
805 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/site-packages/taskcat/_cfn/threaded.py", line 76, in _create_stacks_for_test
806 | stacks = fan_out(Stack.create, partial_kwargs, test.regions, threads)
807 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/site-packages/taskcat/_cfn/threaded.py", line 22, in fan_out
808 | results = pool.map(func, payload)
809 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/pool.py", line 364, in map
810 | return self._map_async(func, iterable, mapstar, chunksize).get()
811 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/pool.py", line 768, in get
812 | raise self._value
813 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/pool.py", line 125, in worker
814 | result = (True, func(*args, **kwds))
815 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
816 | return list(map(*args))
817 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/site-packages/taskcat/_cfn/stack.py", line 272, in create
818 | url=s3_url_maker(
819 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/site-packages/taskcat/_common_utils.py", line 44, in s3_url_maker
820 | response = s3_client.get_bucket_location(Bucket=bucket)
821 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/site-packages/botocore/client.py", line 357, in _api_call
822 | return self._make_api_call(operation_name, kwargs)
823 | File "/root/.pyenv/versions/3.8.1/lib/python3.8/site-packages/botocore/client.py", line 676, in _make_api_call
824 | raise error_class(parsed_response, operation_name)
825 | botocore.exceptions.ClientError: An error occurred (InvalidToken) when calling the GetBucketLocation operation: The provided token is malformed or otherwise invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants