Closed BoscoDomingo closed 10 months ago
I've opened a PR on the actions-utils repo that would allow this change to work.
If approved, I could then create a PR in this repo for the small change that would be required for this usecase
Does this work via the gcloud CLI? The documentation indicates both KEY and VALUE are required (there are no brackets around VALUE indicating optionality.
This is a similar/duplicate issue as #379 that I created ~6 months ago.
Thanks for creating the PR against the utils repo. Hopefully we can get some traction on this.
Does this work via the gcloud CLI? The documentation indicates both KEY and VALUE are required (there are no brackets around VALUE indicating optionality.
@sethvargo Great question, I haven't actually tried. It 100% does on the Console as I showed, however, so I would be surprised if the CLI didn't allow for it unless code was specifically written to avoid that case for whatever reason, or something like this situation where it was simply not taken into account. If I have time tomorrow I'll try to give it a go and report back 👍🏼
This will be solved by @sethvargo's https://github.com/google-github-actions/actions-utils/pull/91 (haven't checked if it has been integrated to this Action yet, but wanted to link the 2 things together)
Not yet, was gonna try to get to it tonight, but my flight got delayed.
TL;DR
You can't use labels without a value. Even a
label=
failsExpected behavior
I would expect to be able to deploy a function with a label that contains a simple key with no value as I can via Console or CLI:
Observed behavior
I got the errors
failed to parse KEY=VALUE pair "REDACTED_KEY=": no value
andfailed to parse KEY=VALUE pair "REDACTED_KEY": missing "="
. This comes from https://github.com/google-github-actions/actions-utils/blob/main/src/kv.ts#L50Action YAML
Log output
Additional information
It is pertinent to your library used for parsing Key-Value pairs, but in this case, it should allow value-less pairs as is permitted in GCP via Console or CLI as mentioned.