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

Lazily initialize docker registry client #328

Merged
merged 2 commits into from
Apr 13, 2023
Merged

Lazily initialize docker registry client #328

merged 2 commits into from
Apr 13, 2023

Conversation

rdnt
Copy link
Contributor

@rdnt rdnt commented Apr 12, 2023

This PR allows running bob without errors if:

  • bobfile has no tasks declared with docker images as targets (no need to interface with docker at all), or
  • bobfile has such tasks, but the command being run (e.g. bob build ls) does not require interaction with docker.

If the bobfile requires docker for some operation, and docker is not present, then it exits early with a user error, without showing a stacktrace.

It also addresses a potential mutex bug (Unlock was not deferred and there was no unlock call in an if-return branch later on).

It should address issues reported by users not having Docker installed, e.g. #327

* Exit early if connection to docker daemon fails
* Fix mutex bugs
* Fix image buildinfo getting "stuck" and requiring killing of the process
@rdnt rdnt marked this pull request as draft April 12, 2023 11:27
@rdnt rdnt marked this pull request as ready for review April 12, 2023 11:29
@rdnt rdnt requested a review from Equanox April 13, 2023 10:54
@Equanox Equanox merged commit 40dafaf into main Apr 13, 2023
@Equanox Equanox deleted the fix-docker-warnings branch April 13, 2023 19:54
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