local agent run failing on unknown runtime
Describe the bug
Our buildspecs uses runtime-version python 3.x, but the local codebuild is erroring out expecting a specific version.
To Reproduce Steps to reproduce the behavior:
- checkout https://github.com/aws/s2n-tls/
- setup local codebuild per the docs
- run
./codebuild_build.sh -i "$IMAGE" -l amazon/aws-codebuild-local:aarch64 -a ./output -m -b codebuild/spec/buildspec_ubuntu_integ_openssl111.yml
Expected behavior
- Runs with a python 3.x environment
Logs
Attaching to agent-resources_agent_1, agent-resources_build_1
agent_1 | [Container] 2021/10/25 21:22:20 Waiting for agent ping
agent_1 | [Container] 2021/10/25 21:22:22 Waiting for DOWNLOAD_SOURCE
agent_1 | [Container] 2021/10/25 21:22:23 Phase is DOWNLOAD_SOURCE
agent_1 | [Container] 2021/10/25 21:22:23 CODEBUILD_SRC_DIR=/codebuild/output/src917472404/src
agent_1 | [Container] 2021/10/25 21:22:23 YAML location is /codebuild/output/srcDownload/src/codebuild/spec/buildspec_ubuntu_integ_openssl111.yml
agent_1 | [Container] 2021/10/25 21:22:23 Processing environment variables
agent_1 | [Container] 2021/10/25 21:22:23 Phase complete: DOWNLOAD_SOURCE State: FAILED
agent_1 | [Container] 2021/10/25 21:22:23 Phase context status code: YAML_FILE_ERROR Message: Unknown runtime version named '3.x' of python. This build image has the following versions: 3.7, 3.8, 3.9
agent_1 | [Container] 2021/10/25 21:22:23 Runtime error (*clienterr.PhaseContextError: Unknown runtime version named '3.x' of python. This build image has the following versions: 3.7, 3.8, 3.9)
Platform (please complete the following information):
- Host: AL2, guest: ubuntu18 (standard/4.0)
Additional context Add any other context about the problem here.
@dougch - Thanks for reporting the issue. Aliasing is not supported in CodeBuild local yet. Please use the specific version of the runtime when using CodeBuild local. Once we have this fixed, we'll provide an update here.
Why does this show 3.x as supported? https://docs.aws.amazon.com/codebuild/latest/userguide/runtime-versions.html
I am having this same issue with 3.8:
YAML_FILE_ERROR: Unknown runtime version named '3.8' of python. This build image has the following versions: 3.9
Not sure why it's saying the build version only has 3.9 when I have been using the same build for a while now and it worked before. (LinuxBuildImage.AMAZON_LINUX_2_3 which is shown python 3.8 to be available)
I updated to 3.9 to get this to work but this was a random issue I did not expect. Again, not sure why 3.8 worked for over a year but today it doesn't. I haven't check on deployed systems already but on a new deployment from the same package, I ran into this.