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 debugging #62

Closed
ademariag opened this issue Apr 5, 2018 · 3 comments
Closed

Improve debugging #62

ademariag opened this issue Apr 5, 2018 · 3 comments
Labels
enhancement enhancement to an existing feature

Comments

@ademariag
Copy link
Contributor

ademariag commented Apr 5, 2018

When jsonnet fails to compile, the output does not easily allow to understand which target caused the jsonnet to fail.

Compiled working-target1 (1.86s)
Compiled working-target2 (1.86s)
Jsonnet error: failed to compile repository/components/cloudsql-proxy/main.jsonnet:
 RUNTIME ERROR: field does not exist: cloudsql
        repository/components/cloudsql-proxy/main.jsonnet:13:26-49       object <anonymous>

One possible solution is to write the target being compiled before attempting the compilation. Output could look like this

Compiling working-target1  (OK 1.86s)
Compiling working-target2  (OK 1.86s)
Compiling failing-target3
Jsonnet error: failed to compile repository/components/cloudsql-proxy/main.jsonnet:
 RUNTIME ERROR: field does not exist: cloudsql
        repository/components/cloudsql-proxy/main.jsonnet:13:26-49       object <anonymous>
@ademariag ademariag added the enhancement enhancement to an existing feature label Apr 5, 2018
@adrianchifor
Copy link
Member

Should we close #43 in favour of this?

@ademariag
Copy link
Contributor Author

Didn't realize it was there already. It's the same really. Feel free to close this and don't feel constraint by my sample output ;)

@gburiola
Copy link
Contributor

gburiola commented Apr 5, 2018

The problem with writing the target before starting the compilation is that the app is multithreaded, so you'll see 4 (default number of threads) in flight compilations

ramaro added a commit to ramaro/kapitan that referenced this issue Apr 6, 2018
@ramaro ramaro closed this as completed in #63 Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement enhancement to an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants