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

Return better error messages #33

Merged
merged 1 commit into from
Apr 30, 2019

Conversation

jonjohnsonjr
Copy link
Collaborator

This hoists the publisher creation out of the loop for ko publish to
avoid needlessly resolving credentials multiple times.

This pulls the publisher creation outside of resolveFilesToWriter so we
can fail earlier if e.g. KO_DOCKER_REPO is unset, otherwise we start up
the kubectl goroutine and it would asynchronously fail with:

error: no objects passed to apply

This hoists the publisher creation out of the loop for `ko publish` to
avoid needlessly resolving credentials multiple times.

This pulls the publisher creation outside of resolveFilesToWriter so we
can fail earlier if e.g. KO_DOCKER_REPO is unset, otherwise we start up
the kubectl goroutine and it would asynchronously fail with:

  error: no objects passed to apply
@jonjohnsonjr jonjohnsonjr requested a review from imjasonh April 30, 2019 17:56
@jonjohnsonjr
Copy link
Collaborator Author

I'm thinking we could pull makePublisher and makeBuilder out into some initialization step at some point since they're dependency-injectiony and just parse options into these behaviors.

@jonjohnsonjr jonjohnsonjr merged commit cef9764 into ko-build:master Apr 30, 2019
@jonjohnsonjr jonjohnsonjr deleted the fix-error-messages branch April 30, 2019 18:08
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

Successfully merging this pull request may close these issues.

2 participants