You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/01/08 15:41:48 UTC

[GitHub] [flink] zentol opened a new pull request #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution

zentol opened a new pull request #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution
URL: https://github.com/apache/flink/pull/10801
 
 
   Fixes an issue where pointing `distDir` to a symbolic link would fail with misleading exceptions.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution
URL: https://github.com/apache/flink/pull/10801#issuecomment-572141766
 
 
   <!--
   Meta data
   Hash:ee810d1cbf22046bb237506c74e885a6c29b4b5c Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/143594176 TriggerType:PUSH TriggerID:ee810d1cbf22046bb237506c74e885a6c29b4b5c
   Hash:ee810d1cbf22046bb237506c74e885a6c29b4b5c Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4196 TriggerType:PUSH TriggerID:ee810d1cbf22046bb237506c74e885a6c29b4b5c
   Hash:47607178f852dfe950ce979a6d215c74c178235c Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4373 TriggerType:PUSH TriggerID:47607178f852dfe950ce979a6d215c74c178235c
   Hash:47607178f852dfe950ce979a6d215c74c178235c Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/144542997 TriggerType:PUSH TriggerID:47607178f852dfe950ce979a6d215c74c178235c
   -->
   ## CI report:
   
   * ee810d1cbf22046bb237506c74e885a6c29b4b5c Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/143594176) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4196) 
   * 47607178f852dfe950ce979a6d215c74c178235c Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/144542997) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4373) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] zentol merged pull request #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution

Posted by GitBox <gi...@apache.org>.
zentol merged pull request #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution
URL: https://github.com/apache/flink/pull/10801
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] zentol commented on a change in pull request #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution

Posted by GitBox <gi...@apache.org>.
zentol commented on a change in pull request #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution
URL: https://github.com/apache/flink/pull/10801#discussion_r366814124
 
 

 ##########
 File path: flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/TestUtils.java
 ##########
 @@ -87,15 +89,15 @@ public static Path getResourceJar(final String jarNameRegex) {
 	 * @throws IOException if any IO error happen.
 	 */
 	public static Path copyDirectory(final Path source, final Path destination) throws IOException {
-		Files.walkFileTree(source, new SimpleFileVisitor<Path>() {
+		Files.walkFileTree(source, EnumSet.of(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, new SimpleFileVisitor<Path>() {
 			@Override
 			public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes ignored)
 				throws IOException {
-				final Path targetRir = destination.resolve(source.relativize(dir));
+				final Path targetDir = destination.resolve(source.relativize(dir));
 				try {
-					Files.copy(dir, targetRir, StandardCopyOption.COPY_ATTRIBUTES);
+					Files.copy(dir, targetDir, StandardCopyOption.COPY_ATTRIBUTES);
 				} catch (FileAlreadyExistsException e) {
-					if (!Files.isDirectory(targetRir)) {
+					if (!Files.isDirectory(targetDir)) {
 
 Review comment:
   I have to guess since it's been a while, but I suppose the idea is that if a file already exists it is likely that the contents are different (hence affecting the correctness of the operation), while this is not the case for directories generally.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution
URL: https://github.com/apache/flink/pull/10801#issuecomment-572141766
 
 
   <!--
   Meta data
   Hash:ee810d1cbf22046bb237506c74e885a6c29b4b5c Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/143594176 TriggerType:PUSH TriggerID:ee810d1cbf22046bb237506c74e885a6c29b4b5c
   Hash:ee810d1cbf22046bb237506c74e885a6c29b4b5c Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4196 TriggerType:PUSH TriggerID:ee810d1cbf22046bb237506c74e885a6c29b4b5c
   -->
   ## CI report:
   
   * ee810d1cbf22046bb237506c74e885a6c29b4b5c Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/143594176) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4196) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution
URL: https://github.com/apache/flink/pull/10801#issuecomment-572141766
 
 
   <!--
   Meta data
   Hash:ee810d1cbf22046bb237506c74e885a6c29b4b5c Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/143594176 TriggerType:PUSH TriggerID:ee810d1cbf22046bb237506c74e885a6c29b4b5c
   Hash:ee810d1cbf22046bb237506c74e885a6c29b4b5c Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4196 TriggerType:PUSH TriggerID:ee810d1cbf22046bb237506c74e885a6c29b4b5c
   -->
   ## CI report:
   
   * ee810d1cbf22046bb237506c74e885a6c29b4b5c Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/143594176) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4196) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution
URL: https://github.com/apache/flink/pull/10801#issuecomment-572128476
 
 
   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit ee810d1cbf22046bb237506c74e885a6c29b4b5c (Wed Jan 08 15:45:09 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] GJL commented on a change in pull request #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution

Posted by GitBox <gi...@apache.org>.
GJL commented on a change in pull request #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution
URL: https://github.com/apache/flink/pull/10801#discussion_r365815918
 
 

 ##########
 File path: flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/TestUtils.java
 ##########
 @@ -87,15 +89,15 @@ public static Path getResourceJar(final String jarNameRegex) {
 	 * @throws IOException if any IO error happen.
 	 */
 	public static Path copyDirectory(final Path source, final Path destination) throws IOException {
-		Files.walkFileTree(source, new SimpleFileVisitor<Path>() {
+		Files.walkFileTree(source, EnumSet.of(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, new SimpleFileVisitor<Path>() {
 			@Override
 			public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes ignored)
 				throws IOException {
-				final Path targetRir = destination.resolve(source.relativize(dir));
+				final Path targetDir = destination.resolve(source.relativize(dir));
 				try {
-					Files.copy(dir, targetRir, StandardCopyOption.COPY_ATTRIBUTES);
+					Files.copy(dir, targetDir, StandardCopyOption.COPY_ATTRIBUTES);
 				} catch (FileAlreadyExistsException e) {
-					if (!Files.isDirectory(targetRir)) {
+					if (!Files.isDirectory(targetDir)) {
 
 Review comment:
   Why are we swallowing the exception if `targetDir` is a directory?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution
URL: https://github.com/apache/flink/pull/10801#issuecomment-572141766
 
 
   <!--
   Meta data
   Hash:ee810d1cbf22046bb237506c74e885a6c29b4b5c Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/143594176 TriggerType:PUSH TriggerID:ee810d1cbf22046bb237506c74e885a6c29b4b5c
   Hash:ee810d1cbf22046bb237506c74e885a6c29b4b5c Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4196 TriggerType:PUSH TriggerID:ee810d1cbf22046bb237506c74e885a6c29b4b5c
   Hash:47607178f852dfe950ce979a6d215c74c178235c Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4373 TriggerType:PUSH TriggerID:47607178f852dfe950ce979a6d215c74c178235c
   Hash:47607178f852dfe950ce979a6d215c74c178235c Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/144542997 TriggerType:PUSH TriggerID:47607178f852dfe950ce979a6d215c74c178235c
   -->
   ## CI report:
   
   * ee810d1cbf22046bb237506c74e885a6c29b4b5c Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/143594176) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4196) 
   * 47607178f852dfe950ce979a6d215c74c178235c Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/144542997) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4373) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution
URL: https://github.com/apache/flink/pull/10801#issuecomment-572141766
 
 
   <!--
   Meta data
   Hash:ee810d1cbf22046bb237506c74e885a6c29b4b5c Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:ee810d1cbf22046bb237506c74e885a6c29b4b5c
   -->
   ## CI report:
   
   * ee810d1cbf22046bb237506c74e885a6c29b4b5c UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution
URL: https://github.com/apache/flink/pull/10801#issuecomment-572141766
 
 
   <!--
   Meta data
   Hash:ee810d1cbf22046bb237506c74e885a6c29b4b5c Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/143594176 TriggerType:PUSH TriggerID:ee810d1cbf22046bb237506c74e885a6c29b4b5c
   Hash:ee810d1cbf22046bb237506c74e885a6c29b4b5c Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4196 TriggerType:PUSH TriggerID:ee810d1cbf22046bb237506c74e885a6c29b4b5c
   Hash:47607178f852dfe950ce979a6d215c74c178235c Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4373 TriggerType:PUSH TriggerID:47607178f852dfe950ce979a6d215c74c178235c
   Hash:47607178f852dfe950ce979a6d215c74c178235c Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/144542997 TriggerType:PUSH TriggerID:47607178f852dfe950ce979a6d215c74c178235c
   -->
   ## CI report:
   
   * ee810d1cbf22046bb237506c74e885a6c29b4b5c Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/143594176) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4196) 
   * 47607178f852dfe950ce979a6d215c74c178235c Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/144542997) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4373) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10801: [FLINK-15521][e2e] Follow symbolic link when copying distribution
URL: https://github.com/apache/flink/pull/10801#issuecomment-572141766
 
 
   <!--
   Meta data
   Hash:ee810d1cbf22046bb237506c74e885a6c29b4b5c Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/143594176 TriggerType:PUSH TriggerID:ee810d1cbf22046bb237506c74e885a6c29b4b5c
   Hash:ee810d1cbf22046bb237506c74e885a6c29b4b5c Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4196 TriggerType:PUSH TriggerID:ee810d1cbf22046bb237506c74e885a6c29b4b5c
   Hash:47607178f852dfe950ce979a6d215c74c178235c Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:47607178f852dfe950ce979a6d215c74c178235c
   -->
   ## CI report:
   
   * ee810d1cbf22046bb237506c74e885a6c29b4b5c Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/143594176) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4196) 
   * 47607178f852dfe950ce979a6d215c74c178235c UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services