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

controller: only capture the result when invoked through a controller #1747

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

jedevc
Copy link
Collaborator

@jedevc jedevc commented Apr 18, 2023

This ensures that the code used to capture and evaluated a result is only executed when built through the controller. Otherwise, no build result should be recorded.

This ensures that new code added to capture and store the build result for debugging isn't used when BUILDX_EXPERIMENTAL is not set.

See #1640 (comment) for more information.

This should be removed at some point in the future - however, for now, we should have something like this to prevent breaking the state of master while we work on the debugging functionality.

This ensures that the code used to capture and evaluated a result is
only executed when built through the controller. Otherwise, no build
result should be recorded.

This ensures that new code added to capture and store the build result
for debugging isn't used when BUILDX_EXPERIMENTAL is not set.

Signed-off-by: Justin Chadwell <[email protected]>
resp, err = build.BuildWithResultHandler(ctx, nodes, opts, dockerutil.NewClient(dockerCli), confutil.ConfigDir(dockerCli), progress.Tee(printer, statusChan), func(driverIndex int, gotRes *build.ResultContext) {
mu.Lock()
defer mu.Unlock()
if res == nil || driverIndex < idx {
Copy link
Member

Choose a reason for hiding this comment

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

This logic here does not make sense to me. But it is in old code.

@jedevc jedevc merged commit de4cdab into docker:master Apr 18, 2023
@jedevc jedevc deleted the only-capture-result-for-controller branch April 18, 2023 17:56
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