Repository navigation
[Fix-18672][UI] Allow SeaTunnel workflow tasks to select stream execution - #18673
sunlishuo25 wants to merge 46 commits into
Conversation
|
Thanks for opening this pull request! Please check out our contributing guidelines. (https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md) |
Discard the previous task's stored execution mode only when its task type changes, so the new type uses the existing defaults. Preserve SeaTunnel's explicit mode when the type is unchanged and when a definition is reopened. Add focused source checks for task type transitions, mode preservation, custom/resource configuration round trips, and legacy defaults.
SbloodyS
left a comment
There was a problem hiding this comment.
The new E2E covers execution-type selection and save/reload, but leaves several changed paths untested.
Please add regression coverage for copying a STREAM SeaTunnel task, updating connected-edge styling when switching between BATCH and STREAM, and disabling SeaTunnel savepoint while keeping Flink savepoint enabled.
The test also never executes the workflow or checks the Stream Task instance list, so it does not verify the instance-classification outcome described in the PR.
Keep a task query pending while its table is visibly loading instead of repeatedly refreshing it. Read the task state before sampling the current table class, avoiding a loading-selector lookup that could wait for the next poll. Preserve prompt business assertions and the existing120-second/500ms wait.
Locate this case's exact task operation cell under the existing Batch and Stream row boundaries. Preserve the original native retry and ten-second completion wait, and check the visible Log completion after each successful click in the same iteration. Keep shared page helpers, Stop, workflow assertions and engine waits unchanged.
SbloodyS
left a comment
There was a problem hiding this comment.
WorkflowSeaTunnelE2ETest failed. Please fix it. @sunlishuo25
Give the SeaTunnel case a 90-minute budget while retaining 30 minutes for other cases. Bound both pinned fixture downloads and confirm project creation with native Enter, preserving the existing business assertions.
|
@SbloodyS I ran the full WorkflowSeaTunnelE2ETest locally, and it passed on Linux ARM64 with the default application and SeaTunnel heap settings: 1 test, 0 failures, 0 errors, 0 skipped. I've attached the test report, relevant logs, and recording. |
| needs: build | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| timeout-minutes: ${{ matrix.case.name == 'WorkflowSeaTunnelE2ETest' && 90 || 30 }} |
There was a problem hiding this comment.
All e2e tests need to be completed within 30 minutes. Please optimize the implementation.
|
@SbloodyS I've restored the 30-minute timeout and fixed the E2E UI interactions. Both WorkflowSwitchE2ETest and WorkflowSeaTunnelE2ETest passed locally on Linux ARM64 with the default application and SeaTunnel heap settings. The test reports, logs, and recordings are attached in one ZIP. |
| public final class SwitchTaskForm extends TaskNodeForm { | ||
|
|
||
| @FindBy(id = "btnAddIfBranch") | ||
| static final String NODE_MODAL = "//div[contains(concat(' ', normalize-space(@class), ' '), ' n-modal ')" |
There was a problem hiding this comment.
Please don't modify irrelevant code in all places.
There was a problem hiding this comment.
Removed the unrelated changes and pushed the update. The local SeaTunnel E2E test passed; CI is awaiting approval.
- Remove dolphinscheduler-ui/tests/*.cjs, which no workflow runs. - Replace the JavaScript scrollIntoView in SeaTunnelTaskForm with native WebDriver wheel actions. - Run the BATCH job before the STREAM job and drop the extra shell workflows that tracked engine PIDs. - Assert that the savepoint action is disabled for the SeaTunnel stream instance.
|
@SbloodyS I've cleaned up the PR in 850ce3e:
The same commit passed the official E2E workflow on my fork: WorkflowSeaTunnelE2ETest (1 test, 0 failures, ~7 min on AMD64), and all 24 E2E jobs were green. |
Run a real local-mode FLINK_STREAM SQL job in WorkflowSeaTunnelE2ETest and assert that its savepoint action stays enabled in the Stream task instance list, alongside the disabled SeaTunnel savepoint. The fixture now installs Flink 1.20.3.
# Conflicts: # dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/project/workflow/WorkflowForm.java
Wait for the shared data-modal-ready marker instead of Naive UI transition classes, click modal controls through UiInteraction, and enter the SeaTunnel script through CodeEditor. The Flink SQL form keeps keyboard input because its initialization script editor is visible alongside the script editor.
|
@SbloodyS I've resolved the conflicts by merging the latest This update also covers your earlier request to keep Flink savepoint enabled. On my fork, the E2E workflow for this commit passed: all 24 jobs after re-running one unrelated job whose Docker Compose environment failed to start. Backend, Frontend, Test, API-Test, E2E-K8S and CodeQL passed as well. |
SbloodyS
left a comment
There was a problem hiding this comment.
Please refactor this E2E test to follow the project's existing Page Object Model and test structure.
Reuse the existing Page Objects for project navigation, task configuration, submission, and workflow execution. If an existing interaction needs improvement, fix it in the corresponding Page Object instead of adding a separate implementation inside WorkflowSeaTunnelE2ETest.
Please also consolidate overlapping node lookup/opening logic, reduce unnecessary helper methods, and keep changes to shared helpers such as addTask and dragAndDrop.js limited to demonstrated needs. Split the long test into focused scenarios with explicit setup dependencies, while preserving the real SeaTunnel/Flink execution and regression assertions.
|
|
||
| @SneakyThrows | ||
| @SuppressWarnings("unchecked") | ||
| public <T> T addTask(TaskType type, Integer x, Integer y) { |
There was a problem hiding this comment.
Removed the overload and restored dragAndDrop.js to dev. The test now lays out the dropped nodes with the existing formatDAG() instead of passing drop coordinates; I fixed formatDAG() / WorkflowFormatDialog because they no longer matched the current UI (details in my review reply).
- Move the test to cases/tasks/SeaTunnelTaskE2ETest, extend BaseWorkflowE2ETest and split it into focused scenarios that keep the real SeaTunnel and Flink runs and all regression assertions. - Remove the addTask coordinate overload and restore dragAndDrop.js; lay out nodes with formatDAG instead. - Fix the existing page objects instead of adding test-local helpers: preTask, the DAG format dialog, exact task lookup in getTask, CodeEditor reading, workflow editing and task instance logs. - Add the graph-format class that WorkflowForm already uses to locate the DAG format button.
|
@SbloodyS Thanks for the review. I've refactored the test to use the existing page objects: it is now Where the existing page objects failed, and the fix:
The other page object additions are new methods the scenarios need. CI runs on my fork:
|
Was this PR generated or assisted by AI?
YES. I found this issue myself. I used AI as an assistant to help write the code changes, and I manually reviewed and verified all of them.
Purpose of the pull request
Fixes #18672.
A SeaTunnel task in a workflow is always saved as
taskExecuteType=BATCH, and the form gives no way to choose Stream, so a streaming SeaTunnel job can never appear under Task Instance -> Stream Task. This PR adds an explicit Batch/Stream choice to the SeaTunnel form. Batch stays the default, including for existing definitions.The backend already persists
taskExecuteTypeand copies it to task instances, so no backend change is needed.Brief change log
taskExecuteTypefield.useTask: keep the savedtaskExecuteTypewhen an existing task is reopened.detail-modal.tsx): clear the savedtaskExecuteTypewhen the task type changes, so the new task type starts from its own default.editTasknow edits a copy of the task definition, so changes made in the modal (e.g. task type) are discarded on Cancel instead of leaking into the definition.StreamTask. Flink savepoint is unchanged.SeaTunnelTaskE2ETest(undercases/tasks, following the existing page object structure) with real SeaTunnel and Flink fixtures, and register it in the E2E matrix. Shared page objects that no longer matched the current UI are fixed, and the DAG format button gets thegraph-formatclass thatWorkflowFormalready uses to locate it.Verify this pull request
SeaTunnelTaskE2ETestcovers, in six focused scenarios:The official workflows passed on my fork (ubuntu-latest, AMD64): E2E for 64e5cac (all 24 jobs;
SeaTunnelTaskE2ETestran 6 tests with 0 failures in about 10 minutes, well within the 30-minute limit), and Backend, Frontend, Test, API-Test, E2E-K8S and CodeQL for 7713eb1. The commits after 7713eb1 only change E2E test code.Pull Request Notice
Pull Request Notice