Closed Bug 1490337 Opened 6 years ago Closed 6 years ago

Support landing any unblocked series in a full stack graph

Categories

(Conduit :: Lando, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: smacleod, Assigned: smacleod)

References

Details

(Keywords: conduit-story, conduit-triaged)

Attachments

(2 files)

Lando UI should present the full stack graph when loading a revision's page, allowing the user to select any landable (unblocked) series to land.
Depends on: 1489680
No longer depends on: 1489680
This change introduces an algorithm for sorting the stack graph topologically, implemented by `sort_stack_topological()`. It's important to sort the stack topologically in order to draw it vertically beside the revisions table. `sort_stack_topological()` takes a `key` kwarg which can be used to influence which topological sort is chosen. The intention here is to allow us to influence the sort with `key` to result in a deterministic order for a particular stack. I plan to break the tie between node ordering using the revision ID in the future. Additionally a `draw_stack_graph()` function implements an algorithm for converting the topologically sorted graph into metadata which makes drawing the graph trivial. A list of rows will be returned specifying where the commit should appear in the drawing as well as the lines needed to be drawn for the row. Each column specified in `above`, `below`, or `other` results in a single line drawn. The specifics of these lines is described in code.
This converts the current stack page to display the full stack graph rather than just the revisions to be landed (or a single revision when it can't land). The new stack graph drawn in the table indicates the relationships between the rows and mimics the stack display in Phabricator itself. What can/will land is now indicated by the "Land" column. If a revision is part of a landable path it will have a radio button in this column allowing the user to select it as the tip to land. The currently selected series that will land based on the tip has the "Land" column highlighted green. Due to time constraints dynamically changing the series to land based on these radio button selections was scrapped. Instead clicking a radio button will take the user to the stack page for that specific revision. This results in a bit of a slow, sub-optimal UX, but gives the same overall functionality. Because of this choice all the code for the LandingPreview could stay the same, treating the selected series as static. In the future it would be good to transition to a more dynamic page which would make the dryrun at selection time. This would require adding some new dynamic endpoints the JS could hit to grab the dryrun as well as restructuring the entire stack page's JS. Depends on D14267.
Attachment #9030765 - Attachment description: stacks: Add algorithm for drawing the stack graph (Bug 1490337). → stacks: add algorithm for drawing the stack graph (Bug 1490337).
Attachment #9030766 - Attachment description: stacks: Draw stack graph and allow selecting tip (Bug 1490337). → stacks: draw stack graph and allow selecting tip (Bug 1490337).
This has landed and should go out with the next deploy (early 2019).
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: