Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

ship init workflow broken without any indication of error #925

Open
gregwebs opened this issue Apr 28, 2019 · 3 comments
Open

ship init workflow broken without any indication of error #925

gregwebs opened this issue Apr 28, 2019 · 3 comments
Labels
type::bug Something isn't working

Comments

@gregwebs
Copy link

Expected behavior

Screen 3 should show that an error occurred.

Actual behavior

Screen 3 is the same as screen 2. The following error shows in the console:

SyntaxError: "JSON.parse: unexpected end of data at line 1 column 1 of the JSON data"

Information

 ship version                                                                                                                                      1 ┃
{
    "version": "0.41.0",
    "git": "14db0e3",
    "buildTime": "2019-04-19T19:03:14Z",
    "dependencies": {
        "helm": "v2.13.0",
        "kustomize": "v2.0.2",
        "terraform": "v0.11.13"
    }
}

Steps to reproduce the behavior

I tried these: ship init https://grafana.github.io/loki/charts and ship init https://github.com/grafana/loki/tree/master/production/helm

However, screen 3 will also not show any errors if you just Ctrl-C the server (and the console will show "NetworkError").

Appendix

SyntaxError: Unexpected end of JSON input
    at index.js:74
    at w (index.js:57)
    at Generator._invoke (index.js:57)
    at Generator.e.(anonymous function) [as next] (http://localhost:8800/static/js/main.efe0cb91.js:1:1992164)
    at mr (index.js:74)
at s (index.js:74)
@dexhorthy
Copy link
Member

dexhorthy commented Apr 29, 2019

Hi Greg -- thanks for submitting an issue! I'm sorry you've run into this. I think we could definitely use a little bit of better messaging around this.

It looks like the two links you've sent might need a tiny bit of tweaking -- the ship init target needs to be a directory containing either:

  1. Plain Kubernetes YAML files
  2. A Helm Chart Chart.yaml
  3. A ship.yaml file

In this case, you might have a bit better luck with something like

ship init https://github.com/grafana/loki/tree/master/production/helm/loki-stack

@dexhorthy
Copy link
Member

dexhorthy commented Apr 29, 2019

@laverya do you want to check out those ship init targets and we can brainstorm some ways to detect this error? Maybe something like "if upstream contains chart or helm, and detected application type is k8s, then error or warn"? Other options might include searching for a Chart.yaml in subdirectories?

@dexhorthy dexhorthy added the type::bug Something isn't working label Apr 29, 2019
@gregwebs
Copy link
Author

That's great, but I would really like for the frontend to check for errors. The simple example is killing the ship process to have a bad connection.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type::bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants