dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

Add tenantCode propagation to DynamicCommandUtils.createCommand

Open stoplyy opened this issue 1 year ago • 2 comments

Fix DynamicCommandUtils.createCommand method by adding command.setTenantCode(processInstance.getTenantCode()) line. This ensures that the tenantCode is correctly propagated to all subtasks in DolphinScheduler's Dynamic tasks, addressing an issue where the tenantCode wasn't being passed to subtasks, resulting in null tenantCodes for subtask commands. Closes: #15937

Purpose of the pull request

This pull request addresses the issue described in #15937 by ensuring proper propagation of the tenantCode to all subtasks in DolphinScheduler's Dynamic tasks.

Brief change log

  • Add command.setTenantCode(processInstance.getTenantCode()) line to DynamicCommandUtils.createCommand method.

Verify this pull request

This pull request is already covered by existing tests.

stoplyy avatar May 08 '24 10:05 stoplyy

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 39.86%. Comparing base (8d336de) to head (7278b7b).

:exclamation: Current head 7278b7b differs from pull request most recent head a701e58. Consider uploading reports for the commit a701e58 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##                dev   #15956   +/-   ##
=========================================
  Coverage     39.86%   39.86%           
- Complexity     5060     5064    +4     
=========================================
  Files          1369     1369           
  Lines         45634    45635    +1     
  Branches       4869     4868    -1     
=========================================
+ Hits          18192    18193    +1     
  Misses        25544    25544           
  Partials       1898     1898           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 08 '24 10:05 codecov-commenter