Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve deploying a function without a config #683

Closed
20k-ultra opened this issue Mar 24, 2023 · 1 comment · Fixed by #688
Closed

improve deploying a function without a config #683

20k-ultra opened this issue Mar 24, 2023 · 1 comment · Fixed by #688
Assignees
Milestone

Comments

@20k-ultra
Copy link
Contributor

20k-ultra commented Mar 24, 2023

When you deploy a function for the first time that does not have a config you get the following confusing prompt asking for a "path to your Function's entrypoint"

The following is my first experience doing this and you can see my confusion:

$ ~/Projects/lagon-hello-world$ lagon deploy hello.ts 
No configuration found in current directory...

? Path to your Function's entrypoint? (relative to "/home/mig/Projects/lagon-hello-world/hello.ts"): y
✖ "hello.ts/hello.ts/y" is not a file
$ ~/Projects/lagon-hello-world$ lagon deploy hello.ts
No configuration found in current directory...

? Path to your Function's entrypoint? (relative to "/home/mig/Projects/lagon-hello-world/hello.ts"): .
✖ "hello.ts/hello.ts/." is not a file
$ ~/Projects/lagon-hello-world$ lagon deploy .
No configuration found in current directory...

? Path to your Function's entrypoint? (relative to "/home/mig/Projects/lagon-hello-world"): hello.ts

I used lagon deploy hello.ts because this is what the getting started docs say to do here.

Secondly, I was not sure what was meant by entrypoint. It made me think of docker. The getting started docs do not mention such a word either so I couldn't read the docs for that.

I think the CLI can also do more inference. If there is only 1 file it can just ask to confirm if that file is your function's entrypoint". If there's an index.ts it can also be assumed to be the entrypoint.

Otherwise, clarifying what the CLI wants is helpful too. I wasn't sure if it wanted a file path or a yes or no answer.

@QuiiBz QuiiBz added this to the Alpha milestone Mar 24, 2023
@QuiiBz
Copy link
Member

QuiiBz commented Mar 24, 2023

This is definitely a bug: specifying a path to a file should work without asking the user for a full configuration, as shown in the docs.

Secondly, I was not sure what was meant by entrypoint. It made me think of docker. The getting started docs do not mention such a word either so I couldn't read the docs for that.

Agree, the getting started docs weren't updated after #604 was merged. This will be updated soon!

Otherwise, clarifying what the CLI wants is helpful too. I wasn't sure if it wanted a file path or a yes or no answer.

Does something like "Specify the path to your Function's entrypoint" works better?

@QuiiBz QuiiBz added this to Roadmap Mar 24, 2023
@QuiiBz QuiiBz moved this to Todo in Roadmap Mar 24, 2023
@QuiiBz QuiiBz moved this from Todo to In Progress in Roadmap Mar 24, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Roadmap Mar 25, 2023
@QuiiBz QuiiBz self-assigned this Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants