Copilot-cli: CodeBuild fails in pipeline when the GitHub repository path has a long name

Created on 18 Feb 2021  路  5Comments  路  Source: aws/copilot-cli

Issue: Having a long organisation and github repository name makes the docker build fail in CodeBuild

Description:

I have a relatively long GitHub organisation name, and an average sized repository name, but when combined they make up 59 characters. When combined with the uuid and the pipeline-app-name the total character count exceeds the 128 character limit docker imposes for a tag.

When I looked in the logs for CodeBuild I noticed it was failing on the error invalid reference format

Workaround:

I shortened the name of my GitHub repository and verified the build succeeded

It would be great to truncate the tag to a certain length to avoid this problem happening in the future

typbug

Most helpful comment

@huanjani @efekarakus thanks for the fix! Legends

All 5 comments

Hi, @lwcooper!

Thanks for bringing this issue (and error and workaround) to our attention!
We are working on a fix. Stay tuned...!

Update: the plan is to limit pipeline names to 100 characters, truncating from the front if necessary. Pipeline names can only be 100 characters.
In the buildspec, we'll truncate the CODEBUILD_BUILD_ID to the allotted 128 characters because the added verbiage and UUID add another 50 characters.

Hi @lwcooper , the fix was released in v1.3.0! https://github.com/aws/copilot-cli/releases/tag/v1.3.0

@huanjani @efekarakus thanks for the fix! Legends

It's all @huanjani :D

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shrasool picture shrasool  路  4Comments

noahjahn picture noahjahn  路  3Comments

srrengar picture srrengar  路  3Comments

BenediktMiller picture BenediktMiller  路  3Comments

kohidave picture kohidave  路  4Comments