Repository navigation
Conversation
…xecutorService for triggers - UtilityHelper.addLevels: switch from List.contains/containsAll scans to a HashSet for O(1) membership checks; convert recursion to an iterative loop to remove StackOverflowError risk on long dependency chains; throw IllegalStateException with the stuck app names when a circular depends_on prevents some apps from ever becoming schedulable. - UtilityHelper.getGraphOfApps: throw a clear IllegalArgumentException instead of a bare NullPointerException when depends_on references an app name that doesn't exist in the yaml config. - RunMultiplePipelinesTask: replace the raw Thread list + join() with a fixed ExecutorService sized to the level, using Future#get() per app. This preserves the same per-level parallelism, but now surfaces exceptions from triggerThread (e.g. an unresolved child_pipeline name) via stage.appendErrorMessage instead of the thread dying silently to stderr, and correctly restores the interrupt flag instead of swallowing it. - Updated call sites and unit tests for the new addLevels signature; added regression tests for the new cycle-detection and unresolved-dependency error paths.
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.
This PR improves the DAG-leveling logic in
UtilityHelperand howRunMultiplePipelinesTasktriggers child pipelines within a level.Changes:
UtilityHelper.addLevels: switched from repeatedList.contains/containsAllscans to aHashSetfor O(1) membership checks, and converted the recursion to an iterative loop to removeStackOverflowErrorrisk on long dependency chains.IllegalStateExceptionnaming the specific apps that never became schedulable ifdepends_onforms a circular dependency (previously this failed silently).UtilityHelper.getGraphOfApps: throws a clearIllegalArgumentExceptioninstead of a bareNullPointerExceptionwhendepends_onreferences an app name that does not exist in the yaml config.RunMultiplePipelinesTask: replaced the rawThreadlist +join()with a fixedExecutorServicesized to the level. Same per-level parallelism as before, but exceptions fromtriggerThreadnow surface viastage.appendErrorMessageinstead of dying silently on a background thread, and the interrupt flag is restored correctly instead of swallowed.addLevelssignature; added two regression tests covering the new cycle-detection and unresolved-dependency error paths.Testing: Verified by hand against the existing
UtilityHelperTestcases. Please run in CI before merging.