Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix-15937] Add tenantCode propagation to DynamicCommandUtils.createCommand #15956

Merged
merged 1 commit into from
May 9, 2024

Conversation

stoplyy
Copy link
Contributor

@stoplyy stoplyy commented May 8, 2024

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.

@SbloodyS SbloodyS added bug Something isn't working first time contributor First-time contributor 3.2.2 labels May 8, 2024
@SbloodyS SbloodyS added this to the 3.2.2 milestone May 8, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

❗ 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           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@ruanwenjun ruanwenjun left a comment

Choose a reason for hiding this comment

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

LGTM

@SbloodyS SbloodyS changed the title Add tenantCode propagation to DynamicCommandUtils.createCommand [Fix-15937] Add tenantCode propagation to DynamicCommandUtils.createCommand May 9, 2024
Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

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

+1

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: apache#15937
Copy link

sonarqubecloud bot commented May 9, 2024

@ruanwenjun ruanwenjun merged commit ba5de75 into apache:dev May 9, 2024
61 of 62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2.2 backend bug Something isn't working first time contributor First-time contributor ready-to-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature][Dynamic] Dynamic-created Subtasks Fail to Run Using Tenant Code Specified at Task Start
4 participants