You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "Radeity (via GitHub)" <gi...@apache.org> on 2023/05/08 17:37:55 UTC
[GitHub] [dolphinscheduler] Radeity opened a new pull request, #14067: [Improvement-13868][K8S Task] Support the custom labels for k8s task
Radeity opened a new pull request, #14067:
URL: https://github.com/apache/dolphinscheduler/pull/14067
<!--Thanks very much for contributing to Apache DolphinScheduler. Please review https://dolphinscheduler.apache.org/en-us/community/development/pull-request.html before opening a pull request.-->
## Purpose of the pull request
- This PR is a partial job of https://github.com/apache/dolphinscheduler/issues/13868.
<!--(For example: This pull request adds checkstyle plugin).-->
## Brief change log
- Support define customized labels in web UI, and add these labels when building K8S job.
<img width="562" alt="image" src="https://user-images.githubusercontent.com/45198818/236892249-64ee1cec-85b8-4894-a389-be1d98b8f8ff.png">
## Verify this pull request
- Add some UT.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] Radeity commented on pull request #14067: [Improvement-13868][K8S Task] Support the custom labels for k8s task
Posted by "Radeity (via GitHub)" <gi...@apache.org>.
Radeity commented on PR #14067:
URL: https://github.com/apache/dolphinscheduler/pull/14067#issuecomment-1547367289
Hi, @rickchengx , would you like to help review backend-part of this PR?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] sonarcloud[bot] commented on pull request #14067: [Improvement-13868][K8S Task] Support the custom labels for k8s task
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #14067:
URL: https://github.com/apache/dolphinscheduler/pull/14067#issuecomment-1539335766
Please retry analysis of this Pull-Request directly on [SonarCloud](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=14067).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] sonarcloud[bot] commented on pull request #14067: [Improvement-13868][K8S Task] Support the custom labels for k8s task
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #14067:
URL: https://github.com/apache/dolphinscheduler/pull/14067#issuecomment-1539335708
Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=14067)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=14067&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=14067&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=14067&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=14067&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=14067&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=14067&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=14067&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=14067&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=14067&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=14067&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=14067&resolved=false&types=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=14067&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=14067&metric=new_coverage&view=list) [81.8% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=14067&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=14067&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=14067&metric=new_duplicated_lines_density&view=list)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] mergeable[bot] commented on pull request #14067: [Improvement-13868][K8S Task] Support the custom labels for k8s task
Posted by "mergeable[bot] (via GitHub)" <gi...@apache.org>.
mergeable[bot] commented on PR #14067:
URL: https://github.com/apache/dolphinscheduler/pull/14067#issuecomment-1538773858
#### :x: Error Occurred while executing an Action
If you believe this is an unexpected error, please report it on our issue tracker: https://github.com/mergeability/mergeable/issues/new
##### Error Details
--------------------
HttpError: Invalid request.
No subschema in "anyOf" matched.
For 'anyOf/0', {"labels"=>{"labels"=>[]}} is not an array.
For 'anyOf/1', {"labels"=>{"labels"=>[]}} is not an array.
For 'properties/labels', {"labels"=>[]} is not an array.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] mergeable[bot] commented on pull request #14067: [Improvement-13868][K8S Task] Support the custom labels for k8s task
Posted by "mergeable[bot] (via GitHub)" <gi...@apache.org>.
mergeable[bot] commented on PR #14067:
URL: https://github.com/apache/dolphinscheduler/pull/14067#issuecomment-1539315639
#### :x: Error Occurred while executing an Action
If you believe this is an unexpected error, please report it on our issue tracker: https://github.com/mergeability/mergeable/issues/new
##### Error Details
--------------------
HttpError: Invalid request.
No subschema in "anyOf" matched.
For 'anyOf/0', {"labels"=>{"labels"=>["UI", "backend", "document"]}} is not an array.
For 'anyOf/1', {"labels"=>{"labels"=>["UI", "backend", "document"]}} is not an array.
For 'properties/labels', {"labels"=>["UI", "backend", "document"]} is not an array.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] Radeity commented on pull request #14067: [Improvement-13868][K8S Task] Support the custom labels for k8s task
Posted by "Radeity (via GitHub)" <gi...@apache.org>.
Radeity commented on PR #14067:
URL: https://github.com/apache/dolphinscheduler/pull/14067#issuecomment-1539704285
> I am not familiar with front end, may I ask is this custom-label a mandatory field?
Hi, @rickchengx , do you mean whether user must define customized label or not? No, user can define a k8s task without any customized label, just like local parameter.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] rickchengx merged pull request #14067: [Improvement-13868][K8S Task] Support the custom labels for k8s task
Posted by "rickchengx (via GitHub)" <gi...@apache.org>.
rickchengx merged PR #14067:
URL: https://github.com/apache/dolphinscheduler/pull/14067
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] codecov-commenter commented on pull request #14067: [Improvement-13868][K8S Task] Support the custom labels for k8s task
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #14067:
URL: https://github.com/apache/dolphinscheduler/pull/14067#issuecomment-1539315356
## [Codecov](https://app.codecov.io/gh/apache/dolphinscheduler/pull/14067?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#14067](https://app.codecov.io/gh/apache/dolphinscheduler/pull/14067?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7141976) into [dev](https://app.codecov.io/gh/apache/dolphinscheduler/commit/3bad68a942b5c73a5e9028a11525fa2ff705949f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3bad68a) will **increase** coverage by `0.17%`.
> The diff coverage is `63.92%`.
> :exclamation: Current head 7141976 differs from pull request most recent head 7c79171. Consider uploading reports for the commit 7c79171 to get more accurate results
```diff
@@ Coverage Diff @@
## dev #14067 +/- ##
============================================
+ Coverage 38.21% 38.39% +0.17%
- Complexity 4435 4468 +33
============================================
Files 1220 1228 +8
Lines 42706 42654 -52
Branches 4735 4709 -26
============================================
+ Hits 16322 16376 +54
+ Misses 24577 24464 -113
- Partials 1807 1814 +7
```
| [Impacted Files](https://app.codecov.io/gh/apache/dolphinscheduler/pull/14067?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...nscheduler/api/configuration/AppConfiguration.java](https://app.codecov.io/gh/apache/dolphinscheduler/pull/14067?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbmZpZ3VyYXRpb24vQXBwQ29uZmlndXJhdGlvbi5qYXZh) | `93.93% <ø> (ø)` | |
| [...inscheduler/api/controller/ExecutorController.java](https://app.codecov.io/gh/apache/dolphinscheduler/pull/14067?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvRXhlY3V0b3JDb250cm9sbGVyLmphdmE=) | `17.94% <ø> (ø)` | |
| [...lphinscheduler/api/controller/LoginController.java](https://app.codecov.io/gh/apache/dolphinscheduler/pull/14067?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL2NvbnRyb2xsZXIvTG9naW5Db250cm9sbGVyLmphdmE=) | `51.72% <0.00%> (-16.46%)` | :arrow_down: |
| [...che/dolphinscheduler/api/python/PythonGateway.java](https://app.codecov.io/gh/apache/dolphinscheduler/pull/14067?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3B5dGhvbi9QeXRob25HYXRld2F5LmphdmE=) | `16.94% <0.00%> (ø)` | |
| [...inscheduler/api/service/impl/UsersServiceImpl.java](https://app.codecov.io/gh/apache/dolphinscheduler/pull/14067?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvaW1wbC9Vc2Vyc1NlcnZpY2VJbXBsLmphdmE=) | `70.74% <ø> (-0.05%)` | :arrow_down: |
| [...e/dolphinscheduler/common/constants/Constants.java](https://app.codecov.io/gh/apache/dolphinscheduler/pull/14067?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL2NvbnN0YW50cy9Db25zdGFudHMuamF2YQ==) | `75.00% <ø> (ø)` | |
| [...cheduler/common/constants/DataSourceConstants.java](https://app.codecov.io/gh/apache/dolphinscheduler/pull/14067?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvY29tbW9uL2NvbnN0YW50cy9EYXRhU291cmNlQ29uc3RhbnRzLmphdmE=) | `0.00% <ø> (ø)` | |
| [...atasource/snowflake/SnowflakeDataSourceClient.java](https://app.codecov.io/gh/apache/dolphinscheduler/pull/14067?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1kYXRhc291cmNlLXBsdWdpbi9kb2xwaGluc2NoZWR1bGVyLWRhdGFzb3VyY2Utc25vd2ZsYWtlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kb2xwaGluc2NoZWR1bGVyL3BsdWdpbi9kYXRhc291cmNlL3Nub3dmbGFrZS9Tbm93Zmxha2VEYXRhU291cmNlQ2xpZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [.../org/apache/dolphinscheduler/spi/enums/DbType.java](https://app.codecov.io/gh/apache/dolphinscheduler/pull/14067?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1zcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvc3BpL2VudW1zL0RiVHlwZS5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...duler/plugin/storage/hdfs/HdfsStorageOperator.java](https://app.codecov.io/gh/apache/dolphinscheduler/pull/14067?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG9scGhpbnNjaGVkdWxlci1zdG9yYWdlLXBsdWdpbi9kb2xwaGluc2NoZWR1bGVyLXN0b3JhZ2UtaGRmcy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZG9scGhpbnNjaGVkdWxlci9wbHVnaW4vc3RvcmFnZS9oZGZzL0hkZnNTdG9yYWdlT3BlcmF0b3IuamF2YQ==) | `18.90% <0.00%> (-0.76%)` | :arrow_down: |
| ... and [18 more](https://app.codecov.io/gh/apache/dolphinscheduler/pull/14067?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
... and [63 files with indirect coverage changes](https://app.codecov.io/gh/apache/dolphinscheduler/pull/14067/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] rickchengx commented on a diff in pull request #14067: [Improvement-13868][K8S Task] Support the custom labels for k8s task
Posted by "rickchengx (via GitHub)" <gi...@apache.org>.
rickchengx commented on code in PR #14067:
URL: https://github.com/apache/dolphinscheduler/pull/14067#discussion_r1188290097
##########
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-custom-labels.ts:
##########
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { Ref } from 'vue'
+import { useI18n } from 'vue-i18n'
+import type { IJsonItem } from '../types'
+
+export function useCustomLabels({
+ model,
+ field,
+ name = 'custom_labels',
+ span = 24
+ }: {
+ model: { [field: string]: any }
+ field: string
+ name?: string
+ span?: Ref | number
+}): IJsonItem[] {
+ const { t } = useI18n()
+
+ return [
+ {
+ type: 'custom-parameters',
+ field: field,
+ name: t(`project.node.${name}`),
+ class: 'btn-custom-parameters',
+ span,
+ children: [
+ {
+ type: 'input',
+ field: 'label',
+ span: 8,
+ class: 'customized-label-name',
+ props: {
+ placeholder: t('project.node.label_name_tips'),
+ maxLength: 256
+ },
+ validate: {
+ trigger: ['input', 'blur'],
+ required: true,
Review Comment:
I am not familiar with front end, may I ask is this `custom-label` a mandatory field?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org