-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add bootstrap cli flag for create/inspect #600
Add bootstrap cli flag for create/inspect #600
Conversation
# Returns | ||
A `python_on_whales.Builder` object. | ||
""" | ||
if bootstrap: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that running the docker buildx inspect --boostrap [NAME]
command is necessary, when the bootstrap flag is set to True, as the command modifies the targeted builder state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems reasonable
Fix spaces Fix missing builder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the pull request, it's a cool feature! Also sorry for the delay in reviewing. Could you just add a small unit test? After that it should be good to merge. Thank you!
def inspect( | ||
self, | ||
x: Optional[str] = None, | ||
bootstrap: Optional[bool] = False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bootstrap: Optional[bool] = False, | |
bootstrap: bool = False, |
None
is not an acceptable value, as such, it's not an optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed !
Hello, and many thanks for the review and advices. Don't worry for the delay, I wasn't quick either. Two unit tests were added : test_buildx_inspect_bootstrap and test_buildx_create_bootstrap, for checking the builder bootstrap effectiveness, as you requested :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Many thanks for this feature!
682ff91
into
gabrieldemarmiesse:master
Hello,
The purpose of this PR is to add the hability to use the --bootstrap optional flag for the following commands :
$ docker buildx create [OPTIONS] [CONTEXT|ENDPOINT]
$ docker buildx inspect [NAME]