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

[FEATURE][Task Plugin]Add remote-shell task plugin #13801

Merged
merged 7 commits into from
Mar 30, 2023

Conversation

jieguangzhou
Copy link
Member

@jieguangzhou jieguangzhou commented Mar 28, 2023

Purpose of the pull request

close #13794

image

image

Brief change log

  • Add SSH datasource
  • Add RemoteShell Task Plugin

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

@jieguangzhou jieguangzhou marked this pull request as draft March 28, 2023 07:14
@github-actions github-actions bot added backend UI ui and front end related labels Mar 28, 2023
@jieguangzhou jieguangzhou self-assigned this Mar 28, 2023
@jieguangzhou jieguangzhou added this to the 3.2.0 milestone Mar 28, 2023
@jieguangzhou jieguangzhou linked an issue Mar 28, 2023 that may be closed by this pull request
3 tasks
@jieguangzhou jieguangzhou added feature new feature 3.2.0 for 3.2.0 version labels Mar 28, 2023
* @param connectionParam connectionParam
* @return true if connection is valid
*/
default boolean testConnection(ConnectionParam connectionParam) {

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'connectionParam' is never used.
return "";
}

default void setPassword(String s) {

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 's' is never used.
public class RemoteExecutor {

protected final Logger logger =
LoggerFactory.getLogger(String.format(TaskConstants.TASK_LOGGER_THREAD_NAME, getClass()));

Check warning

Code scanning / CodeQL

Unused format argument

This format call refers to 0 argument(s) but supplies 1 argument(s).
@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2023

Codecov Report

Merging #13801 (950ebd1) into dev (fba5998) will increase coverage by 0.03%.
The diff coverage is 34.97%.

❗ Current head 950ebd1 differs from pull request most recent head 40c95c5. Consider uploading reports for the commit 40c95c5 to get more accurate results

@@             Coverage Diff              @@
##                dev   #13801      +/-   ##
============================================
+ Coverage     39.10%   39.13%   +0.03%     
- Complexity     4440     4464      +24     
============================================
  Files          1140     1155      +15     
  Lines         42054    42281     +227     
  Branches       4750     4761      +11     
============================================
+ Hits          16444    16546     +102     
- Misses        23804    23923     +119     
- Partials       1806     1812       +6     
Impacted Files Coverage Δ
...cheduler/api/service/impl/ExecutorServiceImpl.java 50.49% <ø> (+0.87%) ⬆️
...hinscheduler/common/constants/TenantConstants.java 0.00% <0.00%> (ø)
...apache/dolphinscheduler/common/utils/LogUtils.java 0.00% <0.00%> (ø)
...datasource/api/datasource/DataSourceProcessor.java 0.00% <0.00%> (ø)
...er/plugin/datasource/ssh/SSHDataSourceChannel.java 0.00% <0.00%> (ø)
...in/datasource/ssh/SSHDataSourceChannelFactory.java 0.00% <0.00%> (ø)
...ler/plugin/datasource/ssh/SSHDataSourceClient.java 0.00% <0.00%> (ø)
...lphinscheduler/plugin/datasource/ssh/SSHUtils.java 0.00% <0.00%> (ø)
...in/datasource/ssh/param/SSHDataSourceParamDTO.java 0.00% <0.00%> (ø)
.../server/master/runner/WorkflowExecuteRunnable.java 9.77% <0.00%> (ø)
... and 23 more

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

exitCode = 0;
} else {
logger.error("Remote shell task failed");
exitCode = Integer.parseInt(status);

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException

Potential uncaught 'java.lang.NumberFormatException'.
@jieguangzhou jieguangzhou force-pushed the feature/remote-shell branch 2 times, most recently from 1e7e275 to 4554fa2 Compare March 30, 2023 03:24
@jieguangzhou jieguangzhou marked this pull request as ready for review March 30, 2023 09:07
Copy link
Contributor

@devosend devosend left a comment

Choose a reason for hiding this comment

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

LGTM

@sonarcloud
Copy link

sonarcloud bot commented Mar 30, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 12 Code Smells

44.9% 44.9% Coverage
1.4% 1.4% Duplication

@sonarcloud
Copy link

sonarcloud bot commented Mar 30, 2023

Please retry analysis of this Pull-Request directly on SonarCloud.

@zhongjiajie zhongjiajie merged commit 273a5e7 into apache:dev Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2.0 for 3.2.0 version backend document feature new feature UI ui and front end related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature][Task Plugin] RemoteShell Task Plugin
5 participants