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

feat: build graph endpoint for pipeline visualization #995

Merged
merged 47 commits into from
Nov 3, 2023
Merged

Conversation

plyr4
Copy link
Contributor

@plyr4 plyr4 commented Oct 26, 2023

meant to work with ui changes in go-vela/ui#731

the new endpoint aggregates resources for a build and generates a directed graph consisting of nodes and edges.

  • nodes and edges are constructed using stages and their needs
    • if a pipeline has no stages then each step is treated as a single-step stage
  • service edges are connected sequentially to produce a line subgraph at the top of the main graph

there are 3 node groups organized as subgraph clusters for visual effect.

  • services
  • built-in (init and clone)
  • pipeline (everything else)

closes go-vela/community#71

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #995 (b9bf5da) into main (a22bbad) will decrease coverage by 1.96%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #995      +/-   ##
==========================================
- Coverage   70.37%   68.42%   -1.96%     
==========================================
  Files         316      317       +1     
  Lines       13209    13586     +377     
==========================================
  Hits         9296     9296              
- Misses       3446     3823     +377     
  Partials      467      467              
Files Coverage Δ
api/build/graph.go 0.00% <0.00%> (ø)

Copy link
Contributor

@ecrupper ecrupper left a comment

Choose a reason for hiding this comment

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

Just a real quick thing I noticed

api/build/graph.go Outdated Show resolved Hide resolved
@plyr4 plyr4 marked this pull request as ready for review October 27, 2023 20:23
@plyr4 plyr4 requested a review from a team as a code owner October 27, 2023 20:23
api/build/graph.go Outdated Show resolved Hide resolved
wass3r
wass3r previously approved these changes Nov 1, 2023
Copy link
Collaborator

@wass3r wass3r left a comment

Choose a reason for hiding this comment

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

let's go to the moon! 🌑

@wass3r
Copy link
Collaborator

wass3r commented Nov 1, 2023

one parting thought, should we try and fetch pipeline first and make calls to get steps/services dependent on whether pipeline has steps/services? might save some db calls, esp for services?

ref:

services BOOLEAN,
stages BOOLEAN,
steps BOOLEAN,

ecrupper
ecrupper previously approved these changes Nov 1, 2023
Copy link
Contributor

@ecrupper ecrupper left a comment

Choose a reason for hiding this comment

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

Very cool. Opened an issue related to the discussion @cognifloyd and @plyr4 had in this PR: go-vela/community#874

timhuynh94
timhuynh94 previously approved these changes Nov 1, 2023
@plyr4 plyr4 dismissed stale reviews from timhuynh94, ecrupper, and wass3r via f589dce November 1, 2023 20:38
timhuynh94
timhuynh94 previously approved these changes Nov 1, 2023
wass3r
wass3r previously approved these changes Nov 1, 2023
Copy link
Collaborator

@wass3r wass3r left a comment

Choose a reason for hiding this comment

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

nice :D

cognifloyd
cognifloyd previously approved these changes Nov 2, 2023
@plyr4 plyr4 dismissed stale reviews from cognifloyd, wass3r, and timhuynh94 via aee68c2 November 2, 2023 20:25
Copy link
Contributor

@ecrupper ecrupper left a comment

Choose a reason for hiding this comment

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

Nice

Copy link
Contributor

@claire1618 claire1618 left a comment

Choose a reason for hiding this comment

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

I think it looks good!

@plyr4 plyr4 merged commit 32bd680 into main Nov 3, 2023
11 of 12 checks passed
@plyr4 plyr4 deleted the feat/build-dag branch November 3, 2023 12:43
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.

Add pipeline visualizations
7 participants