aws-cloudformation / aws-cloudformation/cloudformation-cli
Feature request: implement `--timeout` option for `cfn submit` command
- Dominant language
- Python
- Stars
- 336
- Forks
- 172
- Avg merge
- 3d 5m
- Merged PRs (30d)
- 3
Description
When a new resource type is being registered, the backend automation runs the contract test suite. The `cfn submit` waiter has no handle to adjust the operation timeout. Hence, if the contract test suite takes longer than the default timeout, the submission fails (even though the registration process eventually succeeds). As a consequence, the automation invoking the registration would fail on long-runners.
My resource registration takes ~2 hours. An example of a failure:
```
Resource schema is valid.
Validating your resource schema...
Creating aws-rds-dbinstance-role-stack
aws-rds-dbinstance-role-stack already exists. Attempting to update
aws-rds-dbinstance-role-stack stack is up to date
Creating CloudFormationManagedUploadInfrastructure
CloudFormationManagedUploadInfrastructure already exists. Attempting to update
CloudFormationManagedUploadInfrastructure stack is up to date
Successfully submitted type. Waiting for registration with token '63e94f30-6c44-4071-80b4-86fa31122767' to complete.
Failed to register the type with registration token '63e94f30-6c44-4071-80b4-86fa31122767'.
Please see response for additional information: '{'ProgressStatus': 'IN_PROGRESS', 'Description': 'Deployment is currently in VALIDATION_STAGE of status IN_PROGRESS; Next is DEPLOY_STAGE with status PENDING', 'TypeArn': 'arn:aws:cloudformation:us-east-1:1234567890:type/resource/My-Org-Resource', 'TypeVersionArn': 'arn:aws:cloudformation:us-east-1:1234567890:type/resource/My-Org-Resource/00000001', 'ResponseMetadata': {'RequestId': '7bc1600e-d563-471e-b9bc-1733a3948985', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '7bc1600e-d563-471e-b9bc-1733a3948985', 'content-type': 'text/xml', 'content-length': '724', 'date': 'Thu, 30 Sep 2021 16:55:19 GMT'}, 'RetryAttempts': 0}}'
=== Caught downstream error ===
Waiter TypeRegistrationComplete failed: Max attempts exceeded
---
If debugging indicates this is a possible error with this program,
please report the issue to the team and include the log file 'rpdk.log'.
Issue tracker: https://github.com/aws-cloudformation/aws-cloudformation-rpdk/issues
```
Contributor guide
Assessment
This issue has not been assessed yet.