-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
feat: Add workflow dependencies visualization (#26062) #36248
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
base: main
Are you sure you want to change the base?
Changes from all commits
438ac5a
f685d5f
07094e1
fbc6abf
24c38e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rest api only change as well.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, they are affected. |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rest api only change as well.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, they are affected. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
I would revert changes to the rest api, since the UI does not use this struct. Might be a leftover from previous tries?
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.
The
needsandjob_idfields are required for the workflow dependency graph functionality implemented in the WorkflowGraph.vue component. The component uses job_id to correctly map dependencies between jobs, especially when custom job names are used in the workflow definition. Without these fields, it is impossible to reliably determine the connections between nodes (edges will not be drawn).Uh oh!
There was an error while loading. Please reload this page.
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.
Yes I agree that you need those information to build the graph, but you do not use the gitea rest api structs in your vue component as far as I understood.
Your template uses the data from the view model
Changes of this file
https://github.com/go-gitea/gitea/blob/f685d5f8d586f3970820e5471706fe9b08d3b315/routers/web/repo/actions/view.go
This then directly use ActionRunJob to create this data for your vue component.
Additional Context As far I know Gitea does not allow for security related reasons to use the api/v1 from the ui code, because they are not protected against webbrowser cross site attacks and so on
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.
When I was developing the graph component, I considered keeping the data structures consistent between the API and the view layer. These fields might be needed for direct API usage by third-party applications, not just my component. If you think they won't be necessary, I can remove them.