Skip to content

Conversation

@zhongjiajie
Copy link
Member

@codecov-commenter
Copy link

codecov-commenter commented Feb 1, 2024

Codecov Report

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

Comparison is base (4d15932) 38.41% compared to head (944502f) 38.37%.

❗ Current head 944502f differs from pull request most recent head 0d67d01. Consider uploading reports for the commit 0d67d01 to get more accurate results

Files Patch % Lines
...duler/plugin/datasource/api/utils/CommonUtils.java 6.45% 29 Missing ⚠️
...tasource/mysql/param/MySQLDataSourceProcessor.java 0.00% 7 Missing and 1 partial ⚠️
...ver/master/runner/TaskExecutionContextFactory.java 0.00% 8 Missing ⚠️
...scheduler/plugin/task/api/utils/JdbcUrlParser.java 75.00% 1 Missing and 2 partials ⚠️
...heduler/spi/datasource/DefaultConnectionParam.java 0.00% 2 Missing ⚠️
...lphinscheduler/plugin/task/dq/DataQualityTask.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev   #15551      +/-   ##
============================================
- Coverage     38.41%   38.37%   -0.04%     
+ Complexity     4751     4745       -6     
============================================
  Files          1305     1305              
  Lines         44815    44841      +26     
  Branches       4800     4808       +8     
============================================
- Hits          17214    17209       -5     
- Misses        25731    25759      +28     
- Partials       1870     1873       +3     

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

Comment on lines +151 to +156
// not standalone mode
String currentAbsolutePath = new ClassPathResource("./").getFile().getAbsolutePath();
String currentLibPath = currentAbsolutePath + "/../libs";
getDataQualityJarPathFromPath(currentLibPath).ifPresent(jarName -> DEFAULT_DATA_QUALITY_JAR_PATH = jarName);

// standalone mode
Copy link
Member Author

Choose a reason for hiding this comment

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

auto discovery data quality jar path for both standalone mode and not

Comment on lines +398 to +404
BaseConnectionParam baseConnectionParam = new DefaultConnectionParam();
baseConnectionParam.setUser(hikariDataSource.getUsername());
baseConnectionParam.setPassword(hikariDataSource.getPassword());
baseConnectionParam.setDatabase(jdbcInfo.getDatabase());
baseConnectionParam.setAddress(jdbcInfo.getAddress());
baseConnectionParam.setJdbcUrl(jdbcInfo.getJdbcUrl());
baseConnectionParam.setOther(jdbcInfo.getParams());
Copy link
Member Author

Choose a reason for hiding this comment

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

key change for data quality task can not be use

Comment on lines +113 to +125
if (StringUtils.isNotEmpty(params)) {
Map<String, String> others = new HashMap<>();
String[] paramList = params.split("&");
for (String param : paramList) {
// handle bad params
if (StringUtils.isEmpty(param) || !param.contains(EQUAL_SIGN)) {
continue;
}
String[] kv = param.split(EQUAL_SIGN);
others.put(kv[0], kv[1]);
}
jdbcInfo.setParams(others);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

parse metadata other param to avoid connect error

Copy link
Contributor

@caishunfeng caishunfeng left a comment

Choose a reason for hiding this comment

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

LGTM, some NIP

log.info(
"Can not get data quality jar from path {}, maybe service running in standalone mode, will try to find another path",
currentLibPath);
currentLibPath = currentAbsolutePath + "/../../worker-server/libs";
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems can not auto find in docker image?

Is it better to add env when use standalone mode?

Copy link
Contributor

@rickchengx rickchengx left a comment

Choose a reason for hiding this comment

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

LGTM

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 4, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

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

See analysis details on SonarCloud

@EricGao888 EricGao888 merged commit 8efaa9f into apache:dev Feb 5, 2024
@zhongjiajie zhongjiajie added this to the 3.2.1 milestone Feb 5, 2024
zhongjiajie added a commit that referenced this pull request Feb 6, 2024
* fix: data quality can not use

fix: #15468, #15249, #14858

---------

Co-authored-by: Rick Cheng <[email protected]>
Co-authored-by: Eric Gao <[email protected]>
(cherry picked from commit 8efaa9f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3.2.0 Data Quality cannot be used

5 participants