-
Notifications
You must be signed in to change notification settings - Fork 109
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
Multi-Node-Builder support #668
base: master
Are you sure you want to change the base?
Conversation
buildx/cli_wrapper: update platforms() and status() properties, add nodes() property models.py: add class BuilderNode models.py: rewrite from_str method so it also parses BuilderNodes
I fixed the formatting with |
if platforms: | ||
node.platforms = platforms.split(", ") | ||
result_dict["nodes"].append(node) | ||
node = BuilderNode() |
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.
Rather than doing all this parsing, I believe we should leverage docker buildx ls --format "{{json . }}"
, I will look into it.
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.
Yes, but you mentioned that docker buildx ls --format "{{json . }}"
loses the information of what builder is being used, so I parsed it from docker buildx inspect
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.
Maybe we can grab the builder name from docker buildx inspect
, and then run docker buildx ls --format "{{json . }}"
, we loop over the results and take the entry corresponding to our builder. Then parsing the json is easy peasy and can be loaded into a pydantic model
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.
Do you want to do this in the _fetch_and_parse_inspect_result function? Or do you want to create another function to do this?
buildx/cli_wrapper: add the --append flag to the create command
buildx/cli_wrapper: update platforms() and status() properties, add nodes() property
models.py: add class BuilderNode
models.py: rewrite from_str method so it also parses BuilderNodes