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

Crash on int env vars #9

Open
guillem21b opened this issue Mar 29, 2019 · 0 comments
Open

Crash on int env vars #9

guillem21b opened this issue Mar 29, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@guillem21b
Copy link
Contributor

In Vault we are allowed to put integers as env vars, but to registering the task definition we must use strings. Since there isn't a cast to str, the deployer crashes:

INFO:root:Registering task definitions
CRITICAL:root:Parameter validation failed:
Invalid type for parameter containerDefinitions[0].environment[5].value, value: 999999, type: <class 'int'>, valid types: <class 'str'>
Traceback (most recent call last):
  File "ecs_deployer/run.py", line 55, in <module>
    main(procfile_path=args.procfile, ecr_image=args.image)
  File "ecs_deployer/run.py", line 26, in main
    ecr_image)
  File "/app/ecs_deployer/services.py", line 57, in register_task_definitions
    family)
  File "/app/ecs_deployer/aws.py", line 15, in register_task_definition
    **task_definition)
  File "/usr/local/lib/python3.6/site-packages/botocore/client.py", line 357, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python3.6/site-packages/botocore/client.py", line 634, in _make_api_call
    api_params, operation_model, context=request_context)
  File "/usr/local/lib/python3.6/site-packages/botocore/client.py", line 682, in _convert_to_request_dict
    api_params, operation_model)
  File "/usr/local/lib/python3.6/site-packages/botocore/validate.py", line 297, in serialize_to_request
    raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter containerDefinitions[0].environment[5].value, value: 999999, type: <class 'int'>, valid types: <class 'str'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "ecs_deployer/run.py", line 58, in <module>
    raise Exception(e)
Exception: Parameter validation failed:
Invalid type for parameter containerDefinitions[0].environment[5].value, value: 999999, type: <class 'int'>, valid types: <class 'str'>
Exited with code 1
@guillem21b guillem21b added the bug Something isn't working label Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant