waterWang opened a new pull request, #18577:
URL: https://github.com/apache/dolphinscheduler/pull/18577
### What changes were proposed in this pull request?
Fix `DependentItem.fromKey()` to handle negative `depTaskCode` values (i.e.,
`-1` for `DEPENDENT_ALL_TASK_CODE`).
### Why are the changes needed?
When a Dependent task is configured with **Task Name** set to `ALL`, the UI
assigns `depTaskCode: -1`. The `getKey()` method produces a key like
`"2001--1-day-today"` (two consecutive hyphens). `fromKey()` splits on `-`,
yielding 5 parts instead of the expected 4, causing:
```
java.lang.IllegalArgumentException: Invalid key format
at DependentItem.fromKey(DependentItem.java:48)
at
DependentTaskTracker.isAllDependentTaskFinished(DependentTaskTracker.java:245)
```
### How were the changes tested?
Unit test covers:
- Normal key with positive depTaskCode: `"2001-123-day-today"` → 4 parts
- Negative depTaskCode: `"2001--1-day-today"` → 5 parts, correctly parsed as
`depTaskCode = -1`
- Invalid key format still throws `IllegalArgumentException`
### Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): NO
- Anything that affects deployment: NO
- The core framework: NO
### Documentation
- Does this pull request introduce a new feature? NO
Closes #18576
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]