aws / aws/chalice

ConflictException UpdateDomainName operation: There is already an update in progress

Open
#1,986 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11.1k
Forks
1k
Avg merge
1d 22h
Merged PRs (30d)
2

Description

Hello,
I'm currently rising the Transport Layer Security of an old endpoint which was previously deployed this configuration:

```
"api_gateway_custom_domain": {
"domain_name": "mydomain.name.org",
"tls_version": "TLS_1_0",
"certificate_arn": "arn:aws:acm:xxx"
},
```

I then changed the configuration to `"tls_version": "TLS_1_2"` and started to deploy but the command line generated the followig exception during the `Updating custom domain name:` phase:

```
Traceback (most recent call last):
File "C:\myproject\env\lib\site-packages\chalice\deploy\deployer.py", line 376, in deploy
return self._deploy(config, chalice_stage_name)
File "C:\myproject\env\lib\site-packages\chalice\deploy\deployer.py", line 392, in _deploy
self._executor.execute(plan)
File "C:\myproject\env\lib\site-packages\chalice\deploy\executor.py", line 42, in execute
getattr(self, '_do_%s' % instruction.__class__.__name__.lower(),
File "C:\myproject\env\lib\site-packages\chalice\deploy\executor.py", line 55, in _do_apicall
result = method(**final_kwargs)
File "C:\myproject\env\lib\site-packages\chalice\awsclient.py", line 719, in update_domain_name
updated_domain_name = self._update_domain_name(
File "C:\myproject\env\lib\site-packages\chalice\awsclient.py", line 783, in _update_domain_name
response = self._call_client_method_with_retries(
File "C:\myproject\env\lib\site-packages\chalice\awsclient.py", line 1895, in _call_client_method_with_retries
response = method(**kwargs)
File "C:\myproject\env\lib\site-packages\botocore\client.py", line 391, in _api_call
return self._make_api_call(operation_name, kwargs)
File "C:\myproject\env\lib\site-packages\botocore\client.py", line 719, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.ConflictException: An error occurred (ConflictException) when calling the UpdateDomainName operation: There is already an update in progress for the domain tsg-documentale-subappaltatori-api.gisdataweb.com. Please wait until the current update finishes before making another request.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\myproject\env\lib\site-packages\chalice\cli\__init__.py", line 636, in main
return cli(obj={})
File "C:\myproject\env\lib\site-packages\click\core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "C:\myproject\env\lib\site-packages\click\core.py", line 1053, in main
rv = self.invoke(ctx)
File "C:\myproject\env\lib\site-packages\click\core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\myproject\env\lib\site-packages\click\core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\myproject\env\lib\site-packages\click\core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "C:\myproject\env\lib\site-packages\click\decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "C:\myproject\env\lib\site-packages\chalice\cli\__init__.py", line 189, in deploy
deployed_values = d.deploy(config, chalice_stage_name=stage)
File "C:\myproject\env\lib\site-packages\chalice\deploy\deployer.py", line 378, in deploy
raise ChaliceDeploymentError(e)
chalice.deploy.deployer.ChaliceDeploymentError: ERROR - While deploying your chalice application, received the following error:

An error occurred (ConflictException) when calling the UpdateDomainName
operation: There is already an update in progress for the domain tsg-
documentale-subappaltatori-api.gisdataweb.com. Please wait until the current
update finishes before making another request.
```

However after the deploy failure, the custom domain status on AWS console was "Updating" anyway.
When the custom domain status reached again the status "Available" I tried the chalice deploy once more and the exception gone, so not a real blockinig problem but maybe little annoying issue.

Contributor guide

Open the contributing guide

Research direction

Start in chalice/awsclient.py at update_domain_name and _call_client_method_with_retries, then follow the deploy path in chalice/deploy/executor.py. Reproduce a TLS update on an API Gateway custom domain and observe the AWS Updating state. Done means the deployment handles this transient ConflictException appropriately and completes cleanly once the domain is Available.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
api, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.