-
Notifications
You must be signed in to change notification settings - Fork 573
build: display build details link #1841
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
Conversation
build/build.go
Outdated
Node: node.Name, | ||
Ref: so.Ref, | ||
} | ||
} | ||
if resultHandleFunc != nil { | ||
resultCtx, err := NewResultContext(ctx, cc, so, res) |
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.
@jedevc If we want to print in commands pkg I was wondering if we could use the result context handler to set the build details opts?
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.
ResultContext
doesn't leave outside the controller boundary, so that would likely only work for the runBasicBuild
case I think 😢 Although, we do record the build options, so controller.Inspect
could work for this?
Though that's only the controller options, not the full solve request.
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.
Ah right thanks for the feedback, I will take a closer look.
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.
Builder name, node name when driver pairs are computed during build are not inputs so doesn't look good to have it in build options. Same for the refID
computed for each solve opt.
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.
73486dd
to
f6c0278
Compare
@crazy-max Looks like multiple CI issues. |
These comments have not been resolved:
The link is not shown at all on error anymore iiuc. I'm not sure if we should show the link with |
7a39d38
to
a59d72f
Compare
Moved to commands package
Added detection using
It now prints on error as well. I was looking at using |
375b537
to
91677bf
Compare
f896fed
to
e41911f
Compare
We are using the quiet flag option and we are not taking progress quiet mode into account Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
record-2023-05-31.141327.mp4
Display build details links if Docker Desktop build backend is enabled.
I'm using an OSC 8 escape sequence with the target links to be displayed in the terminal. Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu). A hyperlink is opened upon encountering an OSC 8 escape sequence with the link. The list of supporting terminal emulators and terminal-based apps can be seen here: https://github.com/Alhadis/OSC8-Adoption/.
Atm it only displays links when build is completed and not for active builds. For active builds we need to put links right before build starts so user can just follow build status in desktop instead of his terminal. Would also need a callback to retrieve the ref when attributes are converted to solve opts.