Skip to content

[Fix-18565][API] Validate datasource access for task definitions - #18566

Merged
SbloodyS merged 5 commits into
apache:devfrom
ruanwenjun:fix-datasource-task-permission
Aug 21, 2026
Merged

[Fix-18565][API] Validate datasource access for task definitions#18566
SbloodyS merged 5 commits into
apache:devfrom
ruanwenjun:fix-datasource-task-permission

Conversation

@ruanwenjun

Copy link
Copy Markdown
Member

Was this PR generated or assisted by AI?

YES. The implementation and tests were assisted by AI and reviewed locally.

Purpose of the pull request

Validate datasource access consistently before task definitions are saved or activated.

Closes #18565.

Brief change log

  • Add a shared checker for datasource resources declared by task plugins.
  • Apply the check to task and workflow save, version switch, online, and instance update paths.
  • Add regression tests for the checker and affected API paths.

Verify this pull request

This change added tests and can be verified as follows:

  • Run ./mvnw -pl dolphinscheduler-api -DskipE2E=true -DskipITs -Dspotless.check.skip=true -Dcheckstyle.skip=true -Dtest=TaskDatasourcePermissionCheckerTest,TaskDefinitionServiceImplTest,WorkflowDefinitionServiceTest,WorkflowInstanceServiceTest test.
  • 68 tests pass.
  • ./mvnw -pl dolphinscheduler-api -DskipTests spotless:check passes.

@ruanwenjun
ruanwenjun marked this pull request as ready for review August 19, 2026 01:34
@ruanwenjun
ruanwenjun force-pushed the fix-datasource-task-permission branch from 5ee6c22 to 166be76 Compare August 19, 2026 03:11
SbloodyS
SbloodyS previously approved these changes Aug 19, 2026

@SbloodyS SbloodyS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SbloodyS SbloodyS added this to the 3.5.0 milestone Aug 19, 2026
@SbloodyS SbloodyS added the bug Something isn't working label Aug 19, 2026
@SbloodyS
SbloodyS merged commit 51b2969 into apache:dev Aug 21, 2026
118 of 119 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bug Something isn't working test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][API] Validate datasource access in task definition lifecycle

3 participants