You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/05/30 09:22:37 UTC

[GitHub] [incubator-kyuubi] cfmcgrady opened a new pull request, #2780: Refine stylecheck

cfmcgrady opened a new pull request, #2780:
URL: https://github.com/apache/incubator-kyuubi/pull/2780

   <!--
   Thanks for sending a pull request!
   
   Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
     2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
   -->
   
   ### _Why are the changes needed?_
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you add a feature, you can talk about the use case of it.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   1. reformat code should include all of the modules in the project.
   2. stylecheck should include all of the modules in the project.
   3. there is a bug in the stage `Upload style check report`.
   
   
   Since the `grep` returns code 1 when the pattern is not found, the upload report does not work before this pr.
   
   ```
   > echo "a" > /tmp/a; grep abc /tmp/a; echo $?
   1
   ```
   
   Before this PR
   ```
   Run for log in `find * -name "scalastyle-output.xml"`;  do echo "=========$log========="; grep "error" $log; done
   =========dev/kyuubi-tpcds/target/scalastyle-output.xml=========
   Error: Process completed with exit code 1.
   ```
   
   After this PR
   ```
   Run for log in `find * -name "scalastyle-output.xml"`;
   <?xml version="1.0" encoding="UTF-8"?>
   <checkstyle version="5.0">
    <file name="/home/runner/work/incubator-kyuubi/incubator-kyuubi/extensions/spark/kyuubi-extension-spark-3-3/src/main/scala/org/apache/kyuubi/sql/KyuubiSparkSQLExtension.scala">
     <error column="0" line="21" source="org.scalastyle.scalariform.ImportOrderChecker" severity="error" message="There should at least one a single empty line separating groups 3rdParty and kyuubi."/>
    </file>
   </checkstyle>
   ```
   
   
   ### _How was this patch tested?_
   - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
   
   - [ ] Add screenshots for manual tests if appropriate
   
   - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
   


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] ulysses-you closed pull request #2780: Refine stylecheck

Posted by GitBox <gi...@apache.org>.
ulysses-you closed pull request #2780: Refine stylecheck
URL: https://github.com/apache/incubator-kyuubi/pull/2780


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] pan3793 commented on pull request #2780: Refine stylecheck

Posted by GitBox <gi...@apache.org>.
pan3793 commented on PR #2780:
URL: https://github.com/apache/incubator-kyuubi/pull/2780#issuecomment-1141002355

   ```
   ➜  apache-kyuubi git:(master) mvn help:all-profiles -pl . | grep "Profile Id" | awk '{print $3}' | tr '\n' ',' | awk '{print "-P"$0}'
   -Pjava-11,apache-release,tpcds,java-8,hive-provided,spark-provided,spark-block-cleaner,flink-provided,mirror-cdn,spark-3.3,spark-3.2,spark-3.1,spark-3.0,flink-1.15,spark-master,flink-1.14,
   ```
   Looks like using all profiles is overkill


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] ulysses-you commented on pull request #2780: Refine stylecheck

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on PR #2780:
URL: https://github.com/apache/incubator-kyuubi/pull/2780#issuecomment-1143311799

   thanks, merging to master


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] cfmcgrady commented on pull request #2780: Refine stylecheck

Posted by GitBox <gi...@apache.org>.
cfmcgrady commented on PR #2780:
URL: https://github.com/apache/incubator-kyuubi/pull/2780#issuecomment-1143055342

   > I prefer to use explicit profiles,
   
   SGTM, updated.


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] codecov-commenter commented on pull request #2780: Refine stylecheck

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #2780:
URL: https://github.com/apache/incubator-kyuubi/pull/2780#issuecomment-1142059238

   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/2780?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 [#2780](https://codecov.io/gh/apache/incubator-kyuubi/pull/2780?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0665e7e) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/8578bcd46112a790fa7a977a40cd198dbfeb0eee?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8578bcd) will **increase** coverage by `0.01%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 0665e7e differs from pull request most recent head f5d4d4e. Consider uploading reports for the commit f5d4d4e to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #2780      +/-   ##
   ============================================
   + Coverage     62.15%   62.17%   +0.01%     
   + Complexity      424      198     -226     
   ============================================
     Files           464      464              
     Lines         20827    20829       +2     
     Branches       2814     2814              
   ============================================
   + Hits          12945    12950       +5     
   + Misses         6619     6618       -1     
   + Partials       1263     1261       -2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/2780?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...rg/apache/kyuubi/engine/trino/TrinoSqlEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2780/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3FsRW5naW5lLnNjYWxh) | `52.63% <0.00%> (-7.02%)` | :arrow_down: |
   | [.../org/apache/kyuubi/engine/jdbc/JdbcSQLEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2780/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1qZGJjLWVuZ2luZS9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvamRiYy9KZGJjU1FMRW5naW5lLnNjYWxh) | `51.51% <0.00%> (-3.04%)` | :arrow_down: |
   | [...n/scala/org/apache/kyuubi/engine/ProcBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2780/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvUHJvY0J1aWxkZXIuc2NhbGE=) | `84.27% <0.00%> (-0.63%)` | :arrow_down: |
   | [...main/java/org/apache/kyuubi/client/RestClient.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/2780/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXJlc3QtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvY2xpZW50L1Jlc3RDbGllbnQuamF2YQ==) | `81.03% <0.00%> (+1.72%)` | :arrow_up: |
   | [...ava/org/apache/kyuubi/client/KyuubiRestClient.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/2780/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXJlc3QtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvY2xpZW50L0t5dXViaVJlc3RDbGllbnQuamF2YQ==) | `82.50% <0.00%> (+4.29%)` | :arrow_up: |
   | [...in/java/org/apache/kyuubi/client/BatchRestApi.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/2780/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXJlc3QtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvY2xpZW50L0JhdGNoUmVzdEFwaS5qYXZh) | `100.00% <0.00%> (+20.00%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/2780?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/2780?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8578bcd...f5d4d4e](https://codecov.io/gh/apache/incubator-kyuubi/pull/2780?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] ulysses-you commented on a diff in pull request #2780: Refine stylecheck

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on code in PR #2780:
URL: https://github.com/apache/incubator-kyuubi/pull/2780#discussion_r884686851


##########
.github/workflows/style.yml:
##########
@@ -50,9 +46,15 @@ jobs:
           cache: 'maven'
           check-latest: false
       - name: Scalastyle with maven
-        run: build/mvn scalastyle:check ${{ matrix.profiles }} -pl '!:kyuubi-codecov_2.12,!:kyuubi-assembly_2.12'
+        run: build/mvn help:all-profiles -pl . | grep "Profile Id" | awk '{print $3}' | tr '\n' ',' | awk '{print "-P"$0}' | xargs build/mvn scalastyle:check
       - name: Upload scalastyle report

Review Comment:
   the name should be `print scalastyle error report` ?



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] cfmcgrady commented on pull request #2780: Refine stylecheck

Posted by GitBox <gi...@apache.org>.
cfmcgrady commented on PR #2780:
URL: https://github.com/apache/incubator-kyuubi/pull/2780#issuecomment-1141060199

   > Looks like using all profiles is overkill
   
   It's for finding out all of the modules in the project, do you have a better idea?
   


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] pan3793 commented on pull request #2780: Refine stylecheck

Posted by GitBox <gi...@apache.org>.
pan3793 commented on PR #2780:
URL: https://github.com/apache/incubator-kyuubi/pull/2780#issuecomment-1141586317

   I prefer to use explicit profiles, because I don't know what will happen if we use both `java-8` `java-11`


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org