You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/08/30 06:45:25 UTC

[GitHub] [dolphinscheduler] jieguangzhou opened a new pull request, #11700: [Feature][Style] Configure Spotless to format YAML file in DS

jieguangzhou opened a new pull request, #11700:
URL: https://github.com/apache/dolphinscheduler/pull/11700

   <!--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
   
   close: #11699
   
   ## Brief change log
   
   <!--*(for example:)*
     - *Add maven-checkstyle-plugin to root pom.xml*
   -->
   ## Verify this pull request
   
   <!--*(Please pick either of the following options)*-->
   
   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:
   
   <!--*(example:)*
     - *Added dolphinscheduler-dao tests for end-to-end.*
     - *Added CronUtilsTest to verify the change.*
     - *Manually verified the change by testing locally.* -->
   
   (or)
   
   If your pull request contain incompatible change, you should also add it to `docs/docs/en/guide/upgrede/incompatible.md`
   


-- 
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] jieguangzhou closed pull request #11700: [Feature][Style] Configure Spotless to format YAML file in DS

Posted by GitBox <gi...@apache.org>.
jieguangzhou closed pull request #11700: [Feature][Style] Configure Spotless to format YAML file in DS
URL: https://github.com/apache/dolphinscheduler/pull/11700


-- 
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] jieguangzhou commented on a diff in pull request #11700: [Feature][Style] Configure Spotless to format YAML file in DS

Posted by GitBox <gi...@apache.org>.
jieguangzhou commented on code in PR #11700:
URL: https://github.com/apache/dolphinscheduler/pull/11700#discussion_r960426853


##########
pom.xml:
##########
@@ -684,6 +684,16 @@
                         </includes>
                         <flexmark />
                     </markdown>
+                    <formats>
+                        <format>
+                            <includes>
+                                <include>**/*.yaml</include>
+                            </includes>
+                            <prettier>
+                                <prettierVersion>2.0.5</prettierVersion>

Review Comment:
   Document is not valid YAML (bad indentation?)
   
   ```
   [ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.23.0:apply (default-cli) on project dolphinscheduler: Execution default-cli of goal com.diffplug.spotless:spotless-maven-plugin:2.23.0:apply failed: Unexpected response status code at /prettier/format [HTTP 501] -- (Error while formatting: SyntaxError: Document is not valid YAML (bad indentation?) (18:1)
   [ERROR]   16 | #
   [ERROR]   17 | {{- if .Values.common.fsFileResourcePersistence.enabled }}
   [ERROR] > 18 | apiVersion: v1
   [ERROR]      | ^^^^^^^^^^^^^^
   [ERROR] > 19 | kind: PersistentVolumeClaim
   [ERROR]      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   [ERROR] > 20 | metadata:
   [ERROR]      | ^
   [ERROR]   21 |   name: {{ include "dolphinscheduler.fullname" . }}-fs-file
   [ERROR]   22 |   labels:
   [ERROR]   23 |     app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-fs-file)
   [ERROR] -> [Help 1]
   [ERROR]
   [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
   [ERROR] Re-run Maven using the -X switch to enable full debug logging.
   [ERROR]
   [ERROR] For more information about the errors and possible solutions, please read the following articles:
   [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
   ```
   



-- 
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] jieguangzhou commented on a diff in pull request #11700: [Feature][Style] Configure Spotless to format YAML file in DS

Posted by GitBox <gi...@apache.org>.
jieguangzhou commented on code in PR #11700:
URL: https://github.com/apache/dolphinscheduler/pull/11700#discussion_r958114436


##########
pom.xml:
##########
@@ -684,6 +684,16 @@
                         </includes>
                         <flexmark />
                     </markdown>
+                    <formats>
+                        <format>
+                            <includes>
+                                <include>**/*.yaml</include>
+                            </includes>
+                            <prettier>
+                                <prettierVersion>2.0.5</prettierVersion>

Review Comment:
   Or we can skip some folders and format only the ones we need
   
   <img width="395" alt="image" src="https://user-images.githubusercontent.com/31528124/187382183-f03ec53a-2b71-4ad8-873e-ec06aff09114.png">
   



-- 
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] jieguangzhou commented on a diff in pull request #11700: [Feature][Style] Configure Spotless to format YAML file in DS

Posted by GitBox <gi...@apache.org>.
jieguangzhou commented on code in PR #11700:
URL: https://github.com/apache/dolphinscheduler/pull/11700#discussion_r958111360


##########
pom.xml:
##########
@@ -684,6 +684,16 @@
                         </includes>
                         <flexmark />
                     </markdown>
+                    <formats>
+                        <format>
+                            <includes>
+                                <include>**/*.yaml</include>
+                            </includes>
+                            <prettier>
+                                <prettierVersion>2.0.5</prettierVersion>

Review Comment:
   > Can you provide several different types of yaml files to see the effect after formatting?
   > 
   > As far as I know, we have many different types of yaml files. Such as `docker-compose yaml` and `spring application yaml`.
   
   I have just tested some of the other YAML files in DS and some of them (may be not a normal YAML file) are getting errors when formatting.
   
   For example: deploy/kubernetes/dolphinscheduler/templates/configmap.yaml
   
   I think we can't cannot add a formatted operation directly. 
   
   WDYT @EricGao888 @SbloodyS 



-- 
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] EricGao888 commented on a diff in pull request #11700: [Feature][Style] Configure Spotless to format YAML file in DS

Posted by GitBox <gi...@apache.org>.
EricGao888 commented on code in PR #11700:
URL: https://github.com/apache/dolphinscheduler/pull/11700#discussion_r958256955


##########
pom.xml:
##########
@@ -684,6 +684,16 @@
                         </includes>
                         <flexmark />
                     </markdown>
+                    <formats>
+                        <format>
+                            <includes>
+                                <include>**/*.yaml</include>
+                            </includes>
+                            <prettier>
+                                <prettierVersion>2.0.5</prettierVersion>

Review Comment:
   What errors did you get exactly? 



-- 
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] jieguangzhou commented on a diff in pull request #11700: [Feature][Style] Configure Spotless to format YAML file in DS

Posted by GitBox <gi...@apache.org>.
jieguangzhou commented on code in PR #11700:
URL: https://github.com/apache/dolphinscheduler/pull/11700#discussion_r960428638


##########
pom.xml:
##########
@@ -684,6 +684,16 @@
                         </includes>
                         <flexmark />
                     </markdown>
+                    <formats>
+                        <format>
+                            <includes>
+                                <include>**/*.yaml</include>
+                            </includes>
+                            <prettier>
+                                <prettierVersion>2.0.5</prettierVersion>

Review Comment:
   I have closed this PR, because I think we need to discuss how to format the YAML file first. 



-- 
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] EricGao888 commented on a diff in pull request #11700: [Feature][Style] Configure Spotless to format YAML file in DS

Posted by GitBox <gi...@apache.org>.
EricGao888 commented on code in PR #11700:
URL: https://github.com/apache/dolphinscheduler/pull/11700#discussion_r960583563


##########
pom.xml:
##########
@@ -684,6 +684,16 @@
                         </includes>
                         <flexmark />
                     </markdown>
+                    <formats>
+                        <format>
+                            <includes>
+                                <include>**/*.yaml</include>
+                            </includes>
+                            <prettier>
+                                <prettierVersion>2.0.5</prettierVersion>

Review Comment:
   Okay, in that case, I added an `discussion` label to #11699 . 



-- 
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] jieguangzhou commented on a diff in pull request #11700: [Feature][Style] Configure Spotless to format YAML file in DS

Posted by GitBox <gi...@apache.org>.
jieguangzhou commented on code in PR #11700:
URL: https://github.com/apache/dolphinscheduler/pull/11700#discussion_r958114436


##########
pom.xml:
##########
@@ -684,6 +684,16 @@
                         </includes>
                         <flexmark />
                     </markdown>
+                    <formats>
+                        <format>
+                            <includes>
+                                <include>**/*.yaml</include>
+                            </includes>
+                            <prettier>
+                                <prettierVersion>2.0.5</prettierVersion>

Review Comment:
   Or we can skip some folders and format only the ones we need



-- 
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] SbloodyS commented on a diff in pull request #11700: [Feature][Style] Configure Spotless to format YAML file in DS

Posted by GitBox <gi...@apache.org>.
SbloodyS commented on code in PR #11700:
URL: https://github.com/apache/dolphinscheduler/pull/11700#discussion_r958087256


##########
pom.xml:
##########
@@ -684,6 +684,16 @@
                         </includes>
                         <flexmark />
                     </markdown>
+                    <formats>
+                        <format>
+                            <includes>
+                                <include>**/*.yaml</include>
+                            </includes>
+                            <prettier>
+                                <prettierVersion>2.0.5</prettierVersion>

Review Comment:
   Can you provide several different types of yaml files to see the effect after formatting?
   
   As far as I know, we have many different types of yaml files. Such as `docker-compose yaml` and `spring application yaml`.



-- 
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