You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: remove paste in CLI, when prompted for GCP service account #1426
Worth noting this bug is pretty severe as a tfvars or environment variables also don't work in Coder at this point. MacOS users will not be able to enter long strings as variables
Ok, so current status is that we have a workaround that should allow people to include long parameter values in the fix to #1377
However, I don't think this is a complete solution because it's still easy to be confused when pasting fails.
This currently affects the example GCP template, but could nominally affect any template.
I think we should attempt to detect truncated inputs --- this is basically impossible to do in a fully general and robust way, but I think we can get away with simply looking at the length of the input and if it is exactly the maximum (and you are on MacOS), then fail with an error and tell them to use the --parameter-file option. This introduces a possible false positive where your input is exactly the maximum, essentially making the coder maximum one less than the Terminal maximum, but I think we can live with this.
I think we should attempt to detect truncated inputs --- this is basically impossible to do in a fully general and robust way, but I think we can get away with simply looking at the length of the input and if it is exactly the maximum (and you are on MacOS), then fail with an error and tell them to use the --parameter-file option. This introduces a possible false positive where your input is exactly the maximum, essentially making the coder maximum one less than the Terminal maximum, but I think we can live with this.
When I experiment on my terminal, I can't actually submit a truncated input without hitting backspace. (Presumably there isn't room in whatever buffer for the newline.) So, I no longer believe it is likely that end users will unwittingly submit truncated inputs. They'll know something is wrong---ideally we'd have a way to point them to the --parameter-file workaround, but I can't think of a way to do this on the CLI without adding a message to every prompt, which feels fatiguing and overkill.
Unless others are seeing a different behavior (@mtm20176 can you confirm?), I think the right move is to close this issue, and try to bring #1967 into Community MVP to reduce the likelihood end users experience the problem in the first place. @tjcran what do you think?
Activity
ericpaulsen commentedon May 13, 2022
I've reproduced this as well. Environment specs:
coder --version 0.5.6tjcran commentedon May 16, 2022
Could be solved by #1377 as the service account could be assigned to a variable?
bpmct commentedon May 16, 2022
Worth noting this bug is pretty severe as a tfvars or environment variables also don't work in Coder at this point. MacOS users will not be able to enter long strings as variables
kylecarbs commentedon May 16, 2022
cc: @spikecurtis
This was the edge-case from #1379
tjcran commentedon May 16, 2022
I think we'll have to do #1377 sooner rather than later...
misskniss commentedon May 24, 2022
Looks like this one is complete. Needs verification.
spikecurtis commentedon May 31, 2022
Ok, so current status is that we have a workaround that should allow people to include long parameter values in the fix to #1377
However, I don't think this is a complete solution because it's still easy to be confused when pasting fails.
This currently affects the example GCP template, but could nominally affect any template.
I think we should attempt to detect truncated inputs --- this is basically impossible to do in a fully general and robust way, but I think we can get away with simply looking at the length of the input and if it is exactly the maximum (and you are on MacOS), then fail with an error and tell them to use the
--parameter-fileoption. This introduces a possible false positive where your input is exactly the maximum, essentially making thecodermaximum one less than the Terminal maximum, but I think we can live with this.tjcran commentedon May 31, 2022
I think this is acceptable.
misskniss commentedon Jun 1, 2022
Please add your planning poker estimate with ZenHub @spikecurtis
spikecurtis commentedon Jun 2, 2022
Screen.Recording.2022-06-02.at.11.34.23.AM.mov
When I experiment on my terminal, I can't actually submit a truncated input without hitting backspace. (Presumably there isn't room in whatever buffer for the newline.) So, I no longer believe it is likely that end users will unwittingly submit truncated inputs. They'll know something is wrong---ideally we'd have a way to point them to the
--parameter-fileworkaround, but I can't think of a way to do this on the CLI without adding a message to every prompt, which feels fatiguing and overkill.Unless others are seeing a different behavior (@mtm20176 can you confirm?), I think the right move is to close this issue, and try to bring #1967 into Community MVP to reduce the likelihood end users experience the problem in the first place. @tjcran what do you think?
tjcran commentedon Jun 2, 2022
I think that makes sense and agree we could probably close this. I'd like @kylecarbs to give consensus too on #1967
tjcran commentedon Jun 3, 2022
Closing since we have consensus that it should be closed.