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

Target accounts in deployment_map.yml could be mistakenly parsed as octal numbers #75

Closed
thomasmcgannon opened this issue Jun 22, 2019 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@thomasmcgannon
Copy link
Collaborator

When setting up a pipeline with a target account which is a valid octal number (e.g. 020222070707) it seems that somehow it is converted from octal to decimal (e.g. 2185785799) when processed by ADF. I was able to work around this problem by surrounding the account number in quotes.

pipelines:
  - name: vpc-baseline
    type: cc-cloudformation
    params:
        - SourceAccountId: 123456789098
        - NotificationEndpoint: notification@example.com 
    targets:
        - 020222070707

This is the error I received when ADF tried to generate the new pipeline.

[Container] 2019/06/22 11:21:42 Running command python ./adf-build/generate_pipelines.py 
2019-06-22 11:21:43,228 | INFO | __main__ | ADF Version 1.0.5 | (generate_pipelines.py:99) 
2019-06-22 11:21:43,228 | INFO | __main__ | ADF Log Level is INFO | (generate_pipelines.py:100) 
Traceback (most recent call last): 
  File "./adf-build/generate_pipelines.py", line 173, in <module> 
    main() 
  File "./adf-build/generate_pipelines.py", line 140, in main 
    pipeline_target.fetch_accounts_for_target() 
  File "/codebuild/output/srcxxxxxxxx/src/adf-build/target.py", line 112, in fetch_accounts_for_target 
    raise InvalidDeploymentMapError("Unknown defintion for target: {0}".format(self.path)) 
errors.InvalidDeploymentMapError: Unknown defintion for target: 2185785799 
 
[Container] 2019/06/22 11:21:44 Command did not exit successfully python ./adf-build/generate_pipelines.py exit status 1 
[Container] 2019/06/22 11:21:44 Phase complete: BUILD State: FAILED 
[Container] 2019/06/22 11:21:44 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: python ./adf-build/generate_pipelines.py. Reason: exit status 1 
[Container] 2019/06/22 11:21:45 Entering phase POST_BUILD 
[Container] 2019/06/22 11:21:45 Phase complete: POST_BUILD State: SUCCEEDED 
[Container] 2019/06/22 11:21:45 Phase context status code:  Message:  
@bundyfx bundyfx added enhancement New feature or request bug Something isn't working good first issue Good for newcomers and removed enhancement New feature or request labels Jun 25, 2019
@bundyfx bundyfx modified the milestone: 1.1.0 Jun 27, 2019
@sbkok
Copy link
Collaborator

sbkok commented Oct 17, 2019

This is fixed in v2.0.3, this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants