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

Update error message when docker is not available #2217

Merged

Conversation

tchaudhry91
Copy link
Member

@tchaudhry91 tchaudhry91 commented Jul 4, 2022

What does this change

Simple change to detect local docker availability and update error message.
The detection mechanism is currently just checking exit code of docker info. I suppose this is the most cross platform way of checking it? Open to suggestions on this.

What issue does it fix

Closes #2066

Notes for the reviewer

I'm not sure I can write a test for this? Ideally, the test could stop docker on the system and test the error message, however, that will prevent parallel runs etc. Let me know your thoughts on this.
I have ofcourse tested this manually on linux/windows :)

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our Contributors list. Thank you for making Porter better! 🙇‍♀️

Reviewer Checklist

  • Comment with /azp run test-porter-release if a magefile or build script was modified
  • Comment with /azp run porter-integration if it's a non-trivial PR

Signed-off-by: Tanmay Chaudhry <[email protected]>
@carolynvs
Copy link
Member

Some things are just difficult to test in CI, and this is one of those things. When we review this, we will manually validate the error message is working and that will be just fine. 👍

@carolynvs carolynvs self-assigned this Jul 5, 2022
Copy link
Member

@carolynvs carolynvs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this! The error message is much more clear when Docker Desktop isn't started.

$ ./bin/porter list
rpc error: code = Unknown desc = Docker is not available
could not list installations: could not read storage schema document: rpc error: code = Unknown desc = Docker is not available
could not list installations: could not read storage schema document: rpc error: code = Unknown desc = Docker is not available

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.

mongodb-docker: provide better error message when docker isn't available
2 participants