Properly save runner name in GCP metadata #21
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GARM expects providers to return the runner name and the provider ID of the runner once it's done creating the instance. The GCP provider was mutating the name and converting it to lowercase.
In GCP, the instance name is the ID of the VM and GCP has the requirement that only lowercase letters can be used for instance names.
In GARM, the runner name is the ID, and GARM uses both lower and upper case letters for the name.
The GCP provider was mutating the name and converting it to lowercase. When GARM listed all runners from the provider and cross checked the name to be the same, the check was failing due to the fact that GARM is case sensitive and expected the name to be identical.
This change saves the original name in the metadata of the VM. Labels seem to have the same requirements as the instance name for both keys and values.