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/16 12:52:48 UTC

[GitHub] [flink] hequn8128 opened a new pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

hequn8128 opened a new pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870
 
 
   
   ## What is the purpose of the change
   
   Previously, the boot error messages are printed in the log file under FLINK_LOG_DIR, i.e., "$FLINK_LOG_DIR/flink-$USER-python-udf-boot-$HOSTNAME.log". This additional file is very hard to locate for users.
   
   This pull request also prints the error messages into the taskmanager log file to make it more user-friendly. And throws an exception when there is an error during boot.
   
   
   ## Brief change log
   
     - Put the boot log file in the taskmanager's temp directly.
     - Prints the error messages into the taskmanager log file to make it more user-friendly.
     - Throws an exception when there is an error during boot.
   
   ## Verifying this change
   
   This change is already covered by existing tests, such as `ProcessPythonEnvironmentManagerTest.testSetLogDirectory()`
   
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
   

----------------------------------------------------------------
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 #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#issuecomment-575153364
 
 
   <!--
   Meta data
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4399 TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144739988 TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   -->
   ## CI report:
   
   * 41d519bed15a88fdc2ee812bafa62daa4c13867e Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144739988) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4399) 
   
   <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] hequn8128 commented on a change in pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
hequn8128 commented on a change in pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#discussion_r367893180
 
 

 ##########
 File path: flink-python/src/main/java/org/apache/flink/python/AbstractPythonFunctionRunner.java
 ##########
 @@ -176,10 +179,29 @@ public void open() throws Exception {
 		Struct pipelineOptions = PipelineOptionsTranslation.toProto(portableOptions);
 
 		jobBundleFactory = createJobBundleFactory(pipelineOptions);
-		stageBundleFactory = jobBundleFactory.forStage(createExecutableStage());
+		stageBundleFactory = createStageBundleFactory();
 		progressHandler = BundleProgressHandler.ignored();
 	}
 
+	/**
+	 * To make the error messages more user friendly, read the boot logs from the temp log file and
+	 * throw an exception directly.
+	 */
+	private StageBundleFactory createStageBundleFactory() throws Exception {
+		try {
+			return jobBundleFactory.forStage(createExecutableStage());
+		} catch (Exception e) {
+			byte[] output =
+				Files.readAllBytes(
+					new File(((ProcessPythonEnvironmentManager) environmentManager).getBaseDirectory()
 
 Review comment:
   Currently, the instance is always a `ProcessPythonEnvironmentManager`. How about adding the `getBaseDirectory` method into the interface, so that it is compatible with other kinds of `PythonEnvironmentManager` in the future. 

----------------------------------------------------------------
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 #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#issuecomment-575153364
 
 
   <!--
   Meta data
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4399 TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144739988 TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   Hash:e49961ea64a02d433bd91e0078f34b0ac48e4572 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144759942 TriggerType:PUSH TriggerID:e49961ea64a02d433bd91e0078f34b0ac48e4572
   Hash:e49961ea64a02d433bd91e0078f34b0ac48e4572 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4409 TriggerType:PUSH TriggerID:e49961ea64a02d433bd91e0078f34b0ac48e4572
   Hash:8cc3985f8aa7d45c854c012d7b07567f1c065aee Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:8cc3985f8aa7d45c854c012d7b07567f1c065aee
   Hash:9d39fad27f858459d1386faf648f7abf7f1e4416 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:9d39fad27f858459d1386faf648f7abf7f1e4416
   -->
   ## CI report:
   
   * 41d519bed15a88fdc2ee812bafa62daa4c13867e Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144739988) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4399) 
   * e49961ea64a02d433bd91e0078f34b0ac48e4572 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144759942) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4409) 
   * 8cc3985f8aa7d45c854c012d7b07567f1c065aee UNKNOWN
   * 9d39fad27f858459d1386faf648f7abf7f1e4416 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 commented on issue #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#issuecomment-575139237
 
 
   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 41d519bed15a88fdc2ee812bafa62daa4c13867e (Thu Jan 16 12:56:49 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] flinkbot edited a comment on issue #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#issuecomment-575153364
 
 
   <!--
   Meta data
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4399 TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144739988 TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   Hash:e49961ea64a02d433bd91e0078f34b0ac48e4572 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144759942 TriggerType:PUSH TriggerID:e49961ea64a02d433bd91e0078f34b0ac48e4572
   Hash:e49961ea64a02d433bd91e0078f34b0ac48e4572 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4409 TriggerType:PUSH TriggerID:e49961ea64a02d433bd91e0078f34b0ac48e4572
   Hash:8cc3985f8aa7d45c854c012d7b07567f1c065aee Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:8cc3985f8aa7d45c854c012d7b07567f1c065aee
   -->
   ## CI report:
   
   * 41d519bed15a88fdc2ee812bafa62daa4c13867e Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144739988) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4399) 
   * e49961ea64a02d433bd91e0078f34b0ac48e4572 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144759942) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4409) 
   * 8cc3985f8aa7d45c854c012d7b07567f1c065aee 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] hequn8128 closed pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
hequn8128 closed pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870
 
 
   

----------------------------------------------------------------
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] hequn8128 commented on issue #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
hequn8128 commented on issue #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#issuecomment-575613077
 
 
   @dianfu Thanks a lot for the review and good suggestions! Will merge this once travis passed. 

----------------------------------------------------------------
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 #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#issuecomment-575153364
 
 
   <!--
   Meta data
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   -->
   ## CI report:
   
   * 41d519bed15a88fdc2ee812bafa62daa4c13867e 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] dianfu commented on a change in pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#discussion_r367830927
 
 

 ##########
 File path: flink-python/src/main/java/org/apache/flink/python/AbstractPythonFunctionRunner.java
 ##########
 @@ -176,10 +179,29 @@ public void open() throws Exception {
 		Struct pipelineOptions = PipelineOptionsTranslation.toProto(portableOptions);
 
 		jobBundleFactory = createJobBundleFactory(pipelineOptions);
-		stageBundleFactory = jobBundleFactory.forStage(createExecutableStage());
+		stageBundleFactory = createStageBundleFactory();
 		progressHandler = BundleProgressHandler.ignored();
 	}
 
+	/**
+	 * To make the error messages more user friendly, read the boot logs from the temp log file and
+	 * throw an exception directly.
+	 */
+	private StageBundleFactory createStageBundleFactory() throws Exception {
+		try {
+			return jobBundleFactory.forStage(createExecutableStage());
+		} catch (Exception e) {
+			byte[] output =
+				Files.readAllBytes(
 
 Review comment:
   Should we check if the log file exists?

----------------------------------------------------------------
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 #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#issuecomment-575153364
 
 
   <!--
   Meta data
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4399 TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144739988 TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   Hash:e49961ea64a02d433bd91e0078f34b0ac48e4572 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144759942 TriggerType:PUSH TriggerID:e49961ea64a02d433bd91e0078f34b0ac48e4572
   Hash:e49961ea64a02d433bd91e0078f34b0ac48e4572 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4409 TriggerType:PUSH TriggerID:e49961ea64a02d433bd91e0078f34b0ac48e4572
   -->
   ## CI report:
   
   * 41d519bed15a88fdc2ee812bafa62daa4c13867e Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144739988) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4399) 
   * e49961ea64a02d433bd91e0078f34b0ac48e4572 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144759942) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4409) 
   
   <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 #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#issuecomment-575153364
 
 
   <!--
   Meta data
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4399 TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144739988 TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   Hash:e49961ea64a02d433bd91e0078f34b0ac48e4572 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144759942 TriggerType:PUSH TriggerID:e49961ea64a02d433bd91e0078f34b0ac48e4572
   Hash:e49961ea64a02d433bd91e0078f34b0ac48e4572 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4409 TriggerType:PUSH TriggerID:e49961ea64a02d433bd91e0078f34b0ac48e4572
   Hash:8cc3985f8aa7d45c854c012d7b07567f1c065aee Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:8cc3985f8aa7d45c854c012d7b07567f1c065aee
   Hash:9d39fad27f858459d1386faf648f7abf7f1e4416 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144929705 TriggerType:PUSH TriggerID:9d39fad27f858459d1386faf648f7abf7f1e4416
   Hash:9d39fad27f858459d1386faf648f7abf7f1e4416 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4436 TriggerType:PUSH TriggerID:9d39fad27f858459d1386faf648f7abf7f1e4416
   -->
   ## CI report:
   
   * 41d519bed15a88fdc2ee812bafa62daa4c13867e Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144739988) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4399) 
   * e49961ea64a02d433bd91e0078f34b0ac48e4572 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144759942) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4409) 
   * 8cc3985f8aa7d45c854c012d7b07567f1c065aee UNKNOWN
   * 9d39fad27f858459d1386faf648f7abf7f1e4416 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144929705) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4436) 
   
   <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] hequn8128 commented on a change in pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
hequn8128 commented on a change in pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#discussion_r367893180
 
 

 ##########
 File path: flink-python/src/main/java/org/apache/flink/python/AbstractPythonFunctionRunner.java
 ##########
 @@ -176,10 +179,29 @@ public void open() throws Exception {
 		Struct pipelineOptions = PipelineOptionsTranslation.toProto(portableOptions);
 
 		jobBundleFactory = createJobBundleFactory(pipelineOptions);
-		stageBundleFactory = jobBundleFactory.forStage(createExecutableStage());
+		stageBundleFactory = createStageBundleFactory();
 		progressHandler = BundleProgressHandler.ignored();
 	}
 
+	/**
+	 * To make the error messages more user friendly, read the boot logs from the temp log file and
+	 * throw an exception directly.
+	 */
+	private StageBundleFactory createStageBundleFactory() throws Exception {
+		try {
+			return jobBundleFactory.forStage(createExecutableStage());
+		} catch (Exception e) {
+			byte[] output =
+				Files.readAllBytes(
+					new File(((ProcessPythonEnvironmentManager) environmentManager).getBaseDirectory()
 
 Review comment:
   How about adding the `getBaseDirectory` method into the interface?

----------------------------------------------------------------
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] dianfu commented on issue #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
dianfu commented on issue #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#issuecomment-575611390
 
 
   @hequn8128 Thanks a lot for the update. LGTM. +1 to merge.

----------------------------------------------------------------
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] dianfu commented on a change in pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#discussion_r367830147
 
 

 ##########
 File path: flink-python/src/main/java/org/apache/flink/python/AbstractPythonFunctionRunner.java
 ##########
 @@ -176,10 +179,29 @@ public void open() throws Exception {
 		Struct pipelineOptions = PipelineOptionsTranslation.toProto(portableOptions);
 
 		jobBundleFactory = createJobBundleFactory(pipelineOptions);
-		stageBundleFactory = jobBundleFactory.forStage(createExecutableStage());
+		stageBundleFactory = createStageBundleFactory();
 		progressHandler = BundleProgressHandler.ignored();
 	}
 
+	/**
+	 * To make the error messages more user friendly, read the boot logs from the temp log file and
+	 * throw an exception directly.
+	 */
+	private StageBundleFactory createStageBundleFactory() throws Exception {
+		try {
+			return jobBundleFactory.forStage(createExecutableStage());
+		} catch (Exception e) {
+			byte[] output =
+				Files.readAllBytes(
+					new File(((ProcessPythonEnvironmentManager) environmentManager).getBaseDirectory()
+						+ "/flink-python-udf-boot.log").toPath());
 
 Review comment:
   What about changing `/flink-python-udf-boot.log` to `File.separator + "flink-python-udf-boot.log`?

----------------------------------------------------------------
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 #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#issuecomment-575153364
 
 
   <!--
   Meta data
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4399 TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/144739988 TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   -->
   ## CI report:
   
   * 41d519bed15a88fdc2ee812bafa62daa4c13867e Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/144739988) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4399) 
   
   <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] dianfu commented on a change in pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#discussion_r367828797
 
 

 ##########
 File path: flink-python/src/main/java/org/apache/flink/python/AbstractPythonFunctionRunner.java
 ##########
 @@ -176,10 +179,29 @@ public void open() throws Exception {
 		Struct pipelineOptions = PipelineOptionsTranslation.toProto(portableOptions);
 
 		jobBundleFactory = createJobBundleFactory(pipelineOptions);
-		stageBundleFactory = jobBundleFactory.forStage(createExecutableStage());
+		stageBundleFactory = createStageBundleFactory();
 		progressHandler = BundleProgressHandler.ignored();
 	}
 
+	/**
+	 * To make the error messages more user friendly, read the boot logs from the temp log file and
+	 * throw an exception directly.
+	 */
+	private StageBundleFactory createStageBundleFactory() throws Exception {
+		try {
+			return jobBundleFactory.forStage(createExecutableStage());
+		} catch (Exception e) {
 
 Review comment:
   catch Throwable?

----------------------------------------------------------------
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] dianfu commented on a change in pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#discussion_r367830301
 
 

 ##########
 File path: flink-python/src/main/java/org/apache/flink/python/AbstractPythonFunctionRunner.java
 ##########
 @@ -176,10 +179,29 @@ public void open() throws Exception {
 		Struct pipelineOptions = PipelineOptionsTranslation.toProto(portableOptions);
 
 		jobBundleFactory = createJobBundleFactory(pipelineOptions);
-		stageBundleFactory = jobBundleFactory.forStage(createExecutableStage());
+		stageBundleFactory = createStageBundleFactory();
 		progressHandler = BundleProgressHandler.ignored();
 	}
 
+	/**
+	 * To make the error messages more user friendly, read the boot logs from the temp log file and
+	 * throw an exception directly.
+	 */
+	private StageBundleFactory createStageBundleFactory() throws Exception {
+		try {
+			return jobBundleFactory.forStage(createExecutableStage());
+		} catch (Exception e) {
+			byte[] output =
+				Files.readAllBytes(
+					new File(((ProcessPythonEnvironmentManager) environmentManager).getBaseDirectory()
 
 Review comment:
   What happens if it's not an instance of ProcessPythonEnvironmentManager?

----------------------------------------------------------------
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 #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#issuecomment-575153364
 
 
   <!--
   Meta data
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4399 TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144739988 TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   Hash:e49961ea64a02d433bd91e0078f34b0ac48e4572 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:e49961ea64a02d433bd91e0078f34b0ac48e4572
   -->
   ## CI report:
   
   * 41d519bed15a88fdc2ee812bafa62daa4c13867e Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144739988) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4399) 
   * e49961ea64a02d433bd91e0078f34b0ac48e4572 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] hequn8128 commented on a change in pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
hequn8128 commented on a change in pull request #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#discussion_r367893180
 
 

 ##########
 File path: flink-python/src/main/java/org/apache/flink/python/AbstractPythonFunctionRunner.java
 ##########
 @@ -176,10 +179,29 @@ public void open() throws Exception {
 		Struct pipelineOptions = PipelineOptionsTranslation.toProto(portableOptions);
 
 		jobBundleFactory = createJobBundleFactory(pipelineOptions);
-		stageBundleFactory = jobBundleFactory.forStage(createExecutableStage());
+		stageBundleFactory = createStageBundleFactory();
 		progressHandler = BundleProgressHandler.ignored();
 	}
 
+	/**
+	 * To make the error messages more user friendly, read the boot logs from the temp log file and
+	 * throw an exception directly.
+	 */
+	private StageBundleFactory createStageBundleFactory() throws Exception {
+		try {
+			return jobBundleFactory.forStage(createExecutableStage());
+		} catch (Exception e) {
+			byte[] output =
+				Files.readAllBytes(
+					new File(((ProcessPythonEnvironmentManager) environmentManager).getBaseDirectory()
 
 Review comment:
   Currently, the instance is always a `ProcessPythonEnvironmentManager`. How about adding a `getBootLog` method into the interface, so that different `PythonEnvironmentManager` gets logs accordingly.  

----------------------------------------------------------------
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 #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10870: [FLINK-15616][python] Move boot error messages from python-udf-boot.log to taskmanager's log file
URL: https://github.com/apache/flink/pull/10870#issuecomment-575153364
 
 
   <!--
   Meta data
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4399 TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   Hash:41d519bed15a88fdc2ee812bafa62daa4c13867e Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144739988 TriggerType:PUSH TriggerID:41d519bed15a88fdc2ee812bafa62daa4c13867e
   Hash:e49961ea64a02d433bd91e0078f34b0ac48e4572 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/144759942 TriggerType:PUSH TriggerID:e49961ea64a02d433bd91e0078f34b0ac48e4572
   Hash:e49961ea64a02d433bd91e0078f34b0ac48e4572 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4409 TriggerType:PUSH TriggerID:e49961ea64a02d433bd91e0078f34b0ac48e4572
   -->
   ## CI report:
   
   * 41d519bed15a88fdc2ee812bafa62daa4c13867e Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144739988) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4399) 
   * e49961ea64a02d433bd91e0078f34b0ac48e4572 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/144759942) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4409) 
   
   <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