aws / aws/chalice

Generating cloudformation template fails with: CodeBuild does not yet support python version 'python3.10'.

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

Description

`chalice deploy` works fine but when I try to generate a cloudformation template, I get:
```
$ chalice generate-pipeline file
Traceback (most recent call last):
File "/home/q/.virtualenvs/chalice/lib/python3.10/site-packages/chalice/pipeline.py", line 223, in _get_codebuild_image
image_suffix = self._CODEBUILD_IMAGE[params.lambda_python_version]
KeyError: 'python3.10'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/q/.virtualenvs/chalice/lib/python3.10/site-packages/chalice/cli/__init__.py", line 637, in main
return cli(obj={})
File "/home/q/.virtualenvs/chalice/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/home/q/.virtualenvs/chalice/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/q/.virtualenvs/chalice/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/q/.virtualenvs/chalice/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/q/.virtualenvs/chalice/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/q/.virtualenvs/chalice/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/q/.virtualenvs/chalice/lib/python3.10/site-packages/chalice/cli/__init__.py", line 620, in generate_pipeline
output = p.create_template(params)
File "/home/q/.virtualenvs/chalice/lib/python3.10/site-packages/chalice/pipeline.py", line 205, in create_template
params['CodeBuildImage']['Default'] = self._get_codebuild_image(
File "/home/q/.virtualenvs/chalice/lib/python3.10/site-packages/chalice/pipeline.py", line 226, in _get_codebuild_image
raise InvalidCodeBuildPythonVersion(str(e))
chalice.pipeline.InvalidCodeBuildPythonVersion: CodeBuild does not yet support python version 'python3.10'.
```
```
$ chalice --version
chalice 1.29.0, python 3.10.6, linux 5.19.0-46-generic
```

Contributor guide

Open the contributing guide

Research direction

Start in chalice/pipeline.py at _get_codebuild_image and trace the generate_pipeline entry point shown in the traceback. Reproduce the failure with Python 3.10 and verify that chalice generate-pipeline produces a CloudFormation template instead of raising InvalidCodeBuildPythonVersion.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
build-system, cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.