[Fix #1414] Use try rather than do as position name#1432
Open
fjtirado wants to merge 1 commit into
Open
Conversation
e7feb85 to
77c97d7
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #1414 by adjusting how jsonPointer positions are generated for TryTask internals, so the try block is represented with a "try" container name and adding catch.do no longer causes inconsistent/duplicated container segments in the TryTask position.
Changes:
- Update
TryExecutorto build the try task list under the"try"position prefix (instead of defaulting to"do"), and avoid mutating the TryTask’s position when buildingcatch.doexecutors. - Extend
TaskExecutorHelper.createExecutorList(...)with an overload that allows callers to specify the container name used in position generation. - Update retry/position assertions in tests and add a sample workflow + test that exercises
catch.do.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| impl/test/src/test/resources/workflows-samples/try-catch-with-retry-and-do.yaml | Adds a workflow sample that includes catch.do for reproduction/testing. |
| impl/test/src/test/java/io/serverlessworkflow/impl/test/RetryTimeoutTest.java | Updates expected jsonPointer keys (now using try) and adds a test that runs a workflow with catch.do. |
| impl/core/src/main/java/io/serverlessworkflow/impl/executors/TryExecutor.java | Generates try-block executors under "try" and uses a copied position for catch.do to keep TryTask position stable. |
| impl/core/src/main/java/io/serverlessworkflow/impl/executors/TaskExecutorHelper.java | Adds an overload to customize the position container prefix used when building executor lists. |
Comments suppressed due to low confidence (1)
impl/test/src/test/java/io/serverlessworkflow/impl/test/RetryTimeoutTest.java:61
- The removal of
new TraceExecutionListener()leavesTraceExecutionListeneras an unused import in this file, which will fail compilation. Please remove the unused import (or reintroduce the listener if it’s still intended).
}
@AfterEach
void tearDown() throws IOException {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: fjtirado <ftirados@ibm.com>
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.
Fix #1414