Skip to content

Conversation

@mrodm
Copy link
Contributor

@mrodm mrodm commented Feb 19, 2024

This PR adds the dot character as a new one to be replaced by a dash in the labels used by terraform.

Error when trying to use dots:

Error: Error creating instance: googleapi: Error 400: Invalid value for field 'resource.labels': ''. Label value 'elastic-dependabot-go-modules-helm.sh-helm-v3-3.14.1' violates format constraints. The value can only contain lowercase letters, numeric characters, underscores and dashes. The value can be at most 63 characters long. International characters are allowed., invalid

Example including dot in the tr command:

 $ BUILDKITE_BRANCH="elastic:dependabot/go_modules/helm.sh/helm/v3-3.14.1"
 $ echo "$BUILDKITE_BRANCH" | tr '[:upper:]' '[:lower:]' | tr '_/\:. ' '-'
elastic-dependabot-go-modules-helm-sh-helm-v3-3-14-1

Relates #1683

@mrodm mrodm self-assigned this Feb 19, 2024
@mrodm mrodm requested a review from a team February 19, 2024 14:21
@mrodm mrodm changed the title Replace dots in branch names by dash Replace dots in branch names by dash in Terraform labels Feb 19, 2024
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @mrodm

@mrodm mrodm merged commit 7245bb4 into elastic:main Feb 20, 2024
@mrodm mrodm deleted the remove_dots_from_labels branch February 20, 2024 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants