Only process 1 graph request at a time for a given run#887
Merged
lewisbirks merged 6 commits intojenkinsci:mainfrom Jul 10, 2025
Merged
Only process 1 graph request at a time for a given run#887lewisbirks merged 6 commits intojenkinsci:mainfrom
lewisbirks merged 6 commits intojenkinsci:mainfrom
Conversation
Signed-off-by: Lewis Birks <22620804+lewisbirks@users.noreply.github.com>
Contributor
Author
|
Thinking about it, a better approach might be to wrap the XXXApi objects instead as that would remove the need to worry about mutation. However this does still present some issues. The current way of working expects all of these to be single use objects, as seen with the need to deal the |
…NodeGraphAdaptor Signed-off-by: Lewis Birks <22620804+lewisbirks@users.noreply.github.com>
Signed-off-by: Lewis Birks <22620804+lewisbirks@users.noreply.github.com>
lewisbirks
commented
Jul 9, 2025
src/main/java/io/jenkins/plugins/pipelinegraphview/treescanner/PipelineNodeTreeScanner.java
Outdated
Show resolved
Hide resolved
lewisbirks
commented
Jul 9, 2025
src/main/java/io/jenkins/plugins/pipelinegraphview/treescanner/PipelineNodeTreeScanner.java
Show resolved
Hide resolved
timja
reviewed
Jul 10, 2025
src/main/java/io/jenkins/plugins/pipelinegraphview/utils/CachedPipelineNodeGraphAdaptor.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Lewis Birks <22620804+lewisbirks@users.noreply.github.com>
Signed-off-by: Lewis Birks <22620804+lewisbirks@users.noreply.github.com>
timja
approved these changes
Jul 10, 2025
Member
timja
left a comment
There was a problem hiding this comment.
LGTM, tested locally with curl running multiple requests at the same time and can see only one gets 'built'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An initial look into addressing #886, for #862 the initial computationally expensive part is creating the
PipelineNodeTreeScannerand as such I have created a way of ensuring that all incoming requests use the same parentPipelineNodeGraphAdapter.This required some additional synchronisation code to ensure that concurrent modifications aren't made to the underlying data.
Testing done
where
urls.txtcontains about 90 entries that look likeThese files can then be checked to all be the same using a diff
Submitter checklist