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

langstream apps deploy should provide more beginner friendly help if it can't connect to annot connect to http://localhost:8090/api/applications/ #709

Open
Gagravarr opened this issue Nov 9, 2023 · 1 comment

Comments

@Gagravarr
Copy link
Contributor

If you look at the README.md files for all the examples in https://github.com/LangStream/langstream/tree/main/examples/ , you will see a 50/50 mixture of langstream apps deploy test and langstream docker run for running the examples.

As a beginner, if you're aiming to just use the docker local runner to get started: If you first try a langstream docker run example (which will work), and then without spotting try a langstream apps deploy example next, you'll get a rather unhelpful error on the 2nd one

langstream apps deploy test -app examples/applications/compute-hugging-face-embeddings -i examples/instances/kafka-kubernetes.yaml -s examples/secrets/secrets.yaml
packaging app: /data/langstream/langstream/ghrepos/LangStream/langstream/main/examples/applications/compute-hugging-face-embeddings
app packaged
deploying application: test (2 KB)
Cannot connect to http://localhost:8090/api/applications/default/test?dry-run=false

In general, it might make sense for langstream apps deploy to print some additional help if it can't connect to the langstream server

For the specific case of langstream apps deploy trying to contact the default http://localhost:8090/api/applications/ URL, to be beginner friendly, I think it should offer quite a bit of help. Perhaps something like

The langstream server on http://localhost:8090/api/applications/ could not be contacted

Please make sure that the langstream server is running, the hostname (localhost) and port (8090) are correct, and any required kubectl port forwarding is in place
(possible link to some docs?)

And then if the app is also named test (as per all the examples), maybe also add

You can run apps locally without needing a full langstream cluster with langstream docker run

To do that, replace change your command from
langstream apps deploy
Into
langstream docker run

@eolivelli
Copy link
Member

@Gagravarr I agree with you

Do you want to contribute some improvements ?
The code of the cli is in this repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants