-
Notifications
You must be signed in to change notification settings - Fork 56
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
New graph visitor #233
New graph visitor #233
Conversation
@timbrown5 thanks! This seems to fix #216 as well. |
@stuartrowe thanks for that 👍. I guess I should add a test for that to make sure it doesn't get broken in the future. In the graph there is a specific node for this, but the PipelineNideGraphVisitor ignored this and either:
This seems needless as you can just return the parallel branches wrapped in the parallel block. |
String remappedParentId = remappedStages.get(originalParentId); | ||
|
||
private void remapStepParentage() { | ||
// We only want to do this once, so return early if we jhave an existing value. |
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.
// We only want to do this once, so return early if we jhave an existing value. | |
// We only want to do this once, so return early if we have an existing value. |
I'm leaving this as a draft as I don't know what additional checks would be required to land. I'm, also a little torn with changing (breaking?) the Node Graph - I could revert it to still use |
no real opinion at this point, whatever you think is best, test coverage gives confidence in these areas. |
I think the tests check that the nodes are structured correctly but not that they are the expected type. |
src/main/java/io/jenkins/plugins/pipelinegraphview/utils/PipelineNodeUtil.java
Outdated
Show resolved
Hide resolved
I think fixing the Graph front-end for nested parallel stages can be tracked in #51. |
Update PipelineStepVisitor to (almost) replace PipelineNodeGraphVisitor.
I think the implementation is easier to understand - nodes are parsed when we hit a start block, not when we child the child start block - I found getting parent often returned null (which might be the cause of some of the issues).
@mikedld is this sort of what you were thinking of in: #231 (comment) ?
Known Issues:
Seems to fix #216 (added test for this):
But not #51 (could be some updates require on the frontend?):
Pipeline: