You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/04/13 14:53:47 UTC

[GitHub] [incubator-seatunnel] wuchunfu opened a new pull request, #1697: [Feature][CI] Support build on windows

wuchunfu opened a new pull request, #1697:
URL: https://github.com/apache/incubator-seatunnel/pull/1697

   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   close #1696
   
   <!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
   
   ## Check list
   
   * [ ] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] ruanwenjun merged pull request #1697: [Feature][CI] Support build on windows

Posted by GitBox <gi...@apache.org>.
ruanwenjun merged PR #1697:
URL: https://github.com/apache/incubator-seatunnel/pull/1697


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] wuchunfu commented on pull request #1697: [Feature][CI] Support build on windows

Posted by GitBox <gi...@apache.org>.
wuchunfu commented on PR #1697:
URL: https://github.com/apache/incubator-seatunnel/pull/1697#issuecomment-1107451452

   > @wuchunfu You need to solve the IT path error on Windows :).
   
   @ruanwenjun hi, wenjun, `testcontainers` doesn't seem to be supported in `windows` , so I'll remove this `integration test` first in `ci`


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] ruanwenjun commented on a diff in pull request #1697: [Feature][CI] Support build on windows

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on code in PR #1697:
URL: https://github.com/apache/incubator-seatunnel/pull/1697#discussion_r856082425


##########
seatunnel-config/seatunnel-config-shade/src/test/java/org/apache/seatunnel/config/CompleteTest.java:
##########
@@ -40,14 +40,14 @@ public void testVariables() {
         systemProperties.put("city2", "shanghai");
 
         Config config = ConfigFactory
-            .parseFile(FileUtils.getFileFromResources("seatunnel/variables.conf"))
-            .resolveWith(ConfigFactory.parseMap(systemProperties), ConfigResolveOptions.defaults().setAllowUnresolved(true));
+                .parseFile(FileUtils.getFileFromResources("seatunnel/variables.conf"))
+                .resolveWith(ConfigFactory.parseMap(systemProperties), ConfigResolveOptions.defaults().setAllowUnresolved(true));
+

Review Comment:
   Please remove these format, if there is no change of this file. Same with other test file.



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] ruanwenjun commented on pull request #1697: [Feature][CI] Support build on windows

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on PR #1697:
URL: https://github.com/apache/incubator-seatunnel/pull/1697#issuecomment-1107455856

   Well done.


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] ruanwenjun commented on a diff in pull request #1697: [Feature][CI] Support build on windows

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on code in PR #1697:
URL: https://github.com/apache/incubator-seatunnel/pull/1697#discussion_r856246522


##########
seatunnel-config/seatunnel-config-shade/src/test/java/org/apache/seatunnel/config/utils/FileUtils.java:
##########
@@ -27,16 +27,13 @@ private FileUtils() {
 
     // get file from classpath, resources folder
     public static File getFileFromResources(String fileName) {
-
-        ClassLoader classLoader = FileUtils.class.getClassLoader();
-
+        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

Review Comment:
   I debug at my laptop, the classloader is the same with `FileUtils.class.getClassLoader`.
   And I find there is a better way to solve these path issue in window. https://stackoverflow.com/questions/6164448/convert-url-to-normal-windows-filename-java
   ```
   URL resource = classLoader.getResource(fileName);
   if (resource == null) {
       throw new IllegalArgumentException("file is not found!");
   } else {
       return Paths.get(resource.toURI()).toFile();
   }
   ```



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] ruanwenjun commented on pull request #1697: [Feature][CI] Support build on windows

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on PR #1697:
URL: https://github.com/apache/incubator-seatunnel/pull/1697#issuecomment-1098658093

   The UT failed on Windows, I suggest combine this PR with #1685. @tmljob What do you think?


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] ruanwenjun commented on pull request #1697: [Feature][CI] Support build on windows

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on PR #1697:
URL: https://github.com/apache/incubator-seatunnel/pull/1697#issuecomment-1100568204

   @wuchunfu The CI failed, maybe here is need to fix the 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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] ruanwenjun commented on pull request #1697: [Feature][CI] Support build on windows

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on PR #1697:
URL: https://github.com/apache/incubator-seatunnel/pull/1697#issuecomment-1107266892

   @wuchunfu You need to solve the IT path error on Windows :).


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] ruanwenjun commented on a diff in pull request #1697: [Feature][CI] Support build on windows

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on code in PR #1697:
URL: https://github.com/apache/incubator-seatunnel/pull/1697#discussion_r856246522


##########
seatunnel-config/seatunnel-config-shade/src/test/java/org/apache/seatunnel/config/utils/FileUtils.java:
##########
@@ -27,16 +27,13 @@ private FileUtils() {
 
     // get file from classpath, resources folder
     public static File getFileFromResources(String fileName) {
-
-        ClassLoader classLoader = FileUtils.class.getClassLoader();
-
+        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

Review Comment:
   I debug at my laptop, the classloader is the same with `FileUtils.class.getClassLoader`.
   And I find there is a better way to solve these path issue in window. https://stackoverflow.com/questions/6164448/convert-url-to-normal-windows-filename-java
   ```
   URL resource = classLoader.getResource(fileName);
   Paths.get(resource.toURI()).toFile();
   ```



##########
seatunnel-config/seatunnel-config-shade/src/test/java/org/apache/seatunnel/config/utils/FileUtils.java:
##########
@@ -27,16 +27,13 @@ private FileUtils() {
 
     // get file from classpath, resources folder
     public static File getFileFromResources(String fileName) {
-
-        ClassLoader classLoader = FileUtils.class.getClassLoader();
-
+        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

Review Comment:
   I debug at my laptop, the classloader is the same with `FileUtils.class.getClassLoader`.
   And I find there is a better way to solve these path issue in window. https://stackoverflow.com/questions/6164448/convert-url-to-normal-windows-filename-java
   ```
   URL resource = classLoader.getResource(fileName);
   return Paths.get(resource.toURI()).toFile();
   ```



-- 
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@seatunnel.apache.org

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