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

major API and UI revision #3

Merged
merged 42 commits into from
May 2, 2023
Merged

major API and UI revision #3

merged 42 commits into from
May 2, 2023

Conversation

vito
Copy link
Owner

@vito vito commented May 2, 2023

  • Replace the Buildkit-based UI with a fully rewritten git log --graph style UI:

    image

  • Switch to Protobuf for the protocol types, so progress messages can be sent over e.g. gRPC.

  • Introduce canceled vertex state.

  • Introduce internal vertex flag, hidden in the UI by default.

  • Introduce infinite buffered pipe, to eliminate deadlocks.

  • Introduce groups which vertexes can be members of.

    • Groups have a name and a list of arbitrary name/value labels. They exist as their own object with an ID that vertexes point to.
    • Vertexes may appear in multiple groups. This can happen if the same vertex had to run in multiple groups.

vito added 30 commits April 25, 2023 21:35
* reimplement UI from scratch
* use protobuf for protocol messages
* introduce Casette for recording and displaying progress
This reverts commit 3655ec0.
first stab at a git log -like UI for viewing groups.

topological order is just...too confusing. it was needed because we
don't always have a 'start time', due to pending vertices, but the UX is
pretty bad. it's easier to just skip pending vertexes and sort
chronologically.
otherwise you'd see the round corner and a blank group name at the
start, which is weird
this handles the situation where a group was created and a child group
was also created before a vertex was added to the parent group
Previously it was a solid horizontal line passing through dotted
vertical lines, which didn't really sell an illusion. Now we combine
vlBar (|-) and hdBar (- ) to form a dotted-line illusion.
much easier to see, and kind of looks like guitar hero
red is too spooky, and the upper echelons of the 16 color palette look
janky
Gotta give them a chance for subgroups to show up.
Using color for both the groups and the vertex names was too confusing
because they would sometimes match but it was purely incidental. Now
we'll place ERROR/CACHED/CANCELED at the start, so they all line up, and
give them their own color. Running timestamps are now yellow too.
...i think

the goal is to use the colorful shades (1-7) but not start with red,
because it's spooky.
Dagger doesn't have a concept of 'completing' a pipeline. Instead we
just complete the recorder when the session ends, which completes all
the groups. So without this, everything just piles up.

This shouldn't be needed anymore now that groups will re-introduce their
parents when needed.
helps deal with big Dockerfile RUNs
...this is actually broken on its own, refactored a bit too much at
once, whoopsie
Recorder will now keep track of groups associated to vertex digests,
globally to the recorder. Whenever an update is recorded, all vertex
groups will be expanded to the union of all groups ever seen by the
recorder.

This goes for both the Go API and direct calls to Record (as when
converting SolveStatuses from Buildkit).
* dashes on the right instead of on the left
* bolder |- for tasks
vito added 12 commits April 29, 2023 00:14
makes it flush with the thick terminal bar. overall cue now is bold
lines = active vertex.
ideally we would make the whole line bold, but there's no "bold curved
corner" character. but this is a decent compromise; you can argue it's
correct because it represents the spawning time before the other group
is active.
this is a flaky deadlock waiting to happen; the infinite buffered
version is better. for other use cases you can implement your own
Writer.
+ fix up some boolean logic precedence
* get rid of dashed lines from active vertex across

  the goal of this was to draw your eye to the active item, but it also
  just caused a ton of noise and made the actual horizontal lines hard
  to see
* use fancy unicode for arrowheads

attempted to show dependencies for non-adjacent siblings, but skipped
for now, makes things too ugly. maybe for a super verbose mode?
* partition vertexes into completed/running and render in one loop
  * prevents all the groups from being rendered offscreen for running
    vertexes
* fix rendering arrowhead/line when vertex has inputs on both sides
adaptive colors appear to cause the terminal to hang with lipgloss
v0.7.1
@vito vito merged commit e55fbc3 into main May 2, 2023
@vito vito deleted the redo branch May 2, 2023 19:30
@vito vito mentioned this pull request Jun 13, 2023
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.

1 participant