Skip to content

Bug: remove paste in CLI, when prompted for GCP service account #1426

Closed

Description

@sharkymark

OS Information

  • OS:
  • Browser (if applicable):
  • Architecture:
  • coder --version: 0.5.6

Steps to Reproduce

coder templates create ...

pasting GCP service account does not copy entire service account

fails, and makes noises

Expected

Kyle recommends removing the prompt for service account in the GCP script

The are other ways to do, like handle bars, or importing from file and not pasting.

Make an expectation that templates are not bullet-proof but should be modified.

Actual

It fails if I paste

Activity

  1. ericpaulsen commented on May 13, 2022

    @ericpaulsen
    Member

    I've reproduced this as well. Environment specs:

    • coder --version 0.5.6
    • MacOS
    • VSCode terminal
  2. tjcran commented on May 16, 2022

    @tjcran

    Could be solved by #1377 as the service account could be assigned to a variable?

  3. bpmct commented on May 16, 2022

    @bpmct
    Member

    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

  4. kylecarbs commented on May 16, 2022

    @kylecarbs
    Member

    cc: @spikecurtis

    This was the edge-case from #1379

  5. tjcran commented on May 16, 2022

    @tjcran

    cc: @spikecurtis

    This was the edge-case from #1379

    I think we'll have to do #1377 sooner rather than later...

  6. added this to the Community MVP milestone on May 16, 2022
  7. misskniss commented on May 24, 2022

    @misskniss

    Looks like this one is complete. Needs verification.

  8. spikecurtis commented on May 31, 2022

    @spikecurtis
    Collaborator

    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.

  9. tjcran commented on May 31, 2022

    @tjcran

    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 this is acceptable.

  10. misskniss commented on Jun 1, 2022

    @misskniss
  11. spikecurtis commented on Jun 2, 2022

    @spikecurtis
    Collaborator
    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-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?

  12. tjcran commented on Jun 2, 2022

    @tjcran

    I think that makes sense and agree we could probably close this. I'd like @kylecarbs to give consensus too on #1967

  13. tjcran commented on Jun 3, 2022

    @tjcran

    Closing since we have consensus that it should be closed.

  14. removed this from the Community MVP milestone on Jun 3, 2022
  15. added this to the Community MVP milestone on Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

apiArea: HTTP API

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions