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

[improvement-#15268][subprocess] subprocess task cannot pass parameters which come from sub process instance #15277

Closed
wants to merge 1 commit into from

Conversation

fuchanghai
Copy link
Member

Purpose of the pull request

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.

@fuchanghai fuchanghai changed the title [fix-#15268][subprocess] subprocess task cannot pass parameters which come from sub process instance [improvement-#15268][subprocess] subprocess task cannot pass parameters which come from sub process instance Dec 5, 2023
@ruanwenjun ruanwenjun added the bug Something isn't working label Dec 7, 2023
ProcessInstanceMap processInstanceMap = processInstanceMapDao.queryWorkProcessMapByParent(
taskExecutionContext.getProcessInstanceId(), taskExecutionContext.getTaskInstanceId());
ProcessInstance childProcessInstance = processInstanceDao.queryById(processInstanceMap.getProcessInstanceId());
if (!StringUtils.isBlank(childProcessInstance.getVarPool())) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (!StringUtils.isBlank(childProcessInstance.getVarPool())) {
if (StringUtils.isBlank(childProcessInstance.getVarPool())) {
return taskInstanceProps
}

Please directly return if there is not varpool in sub workflow?

Copy link
Member Author

Choose a reason for hiding this comment

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

image

hi @ruanwenjun If it is empty, it will be returned in the last line of the method。
Maybe it would be more readable if you wrote it the way you did?

Copy link
Member Author

Choose a reason for hiding this comment

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

@codecov-commenter
Copy link

codecov-commenter commented Dec 7, 2023

Codecov Report

Attention: 30 lines in your changes are missing coverage. Please review.

Comparison is base (dcf69ca) 38.02% compared to head (3e062c2) 37.99%.
Report is 1 commits behind head on dev.

❗ Current head 3e062c2 differs from pull request most recent head 5a3f5fd. Consider uploading reports for the commit 5a3f5fd to get more accurate results

Files Patch % Lines
.../runner/task/subworkflow/SubWorkflowLogicTask.java 0.00% 27 Missing ⚠️
...rver/master/runner/execute/MasterTaskExecutor.java 0.00% 1 Missing ⚠️
...cheduler/server/master/runner/task/ILogicTask.java 0.00% 1 Missing ⚠️
...subworkflow/SubWorkflowLogicTaskPluginFactory.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev   #15277      +/-   ##
============================================
- Coverage     38.02%   37.99%   -0.03%     
  Complexity     4692     4692              
============================================
  Files          1304     1305       +1     
  Lines         44812    44840      +28     
  Branches       4803     4805       +2     
============================================
  Hits          17038    17038              
- Misses        25923    25951      +28     
  Partials       1851     1851              

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

Copy link

sonarcloud bot commented Dec 7, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 61 Code Smells

13.2% 13.2% Coverage
1.4% 1.4% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

Copy link

sonarcloud bot commented Jan 19, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

0.0% Coverage on New Code (required ≥ 60%)

See analysis details on SonarCloud

Comment on lines +37 to +39
default List<Property> getVarPool() {
return getTaskParameters().getVarPool();
}
Copy link
Member

Choose a reason for hiding this comment

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

I don't agree we need to add this method in ILogicTask, the Task SPI doesn't need to add this method, otherwise we need to add a lot of get method.

Copy link

This pull request has been automatically marked as stale because it has not had recent activity for 120 days. It will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the Stale label May 27, 2024
Copy link

github-actions bot commented Jun 3, 2024

This pull request has been closed because it has not had recent activity. You could reopen it if you try to continue your work, and anyone who are interested in it are encouraged to continue work on this pull request.

@github-actions github-actions bot closed this Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2.1 backend bug Something isn't working Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants