zentol commented on a change in pull request #18416: URL: https://github.com/apache/flink/pull/18416#discussion_r789500760
########## File path: flink-clients/src/main/java/org/apache/flink/client/deployment/application/ApplicationDispatcherBootstrap.java ########## @@ -266,10 +271,22 @@ private void runApplicationEntryPoint( final Set<JobID> tolerateMissingResult, final DispatcherGateway dispatcherGateway, final ScheduledExecutor scheduledExecutor, - final boolean enforceSingleJobExecution) { + final boolean enforceSingleJobExecution, + final boolean submitFailedJobOnApplicationError) { + if (submitFailedJobOnApplicationError && !enforceSingleJobExecution) { + dispatcherGateway.submitFailedJob( + ZERO_JOB_ID, + FAILED_JOB_NAME, + new IllegalStateException( + String.format( + "Submission of failed job in case of an application error ('%s') is not supported in non-HA setups.", Review comment: > For this to be useful, the user should know the jobId upfront I don't think that's really true; outside of application mode users don't know the job ID upfront. The job name & stacktrace are the identifiable bits imo. * the stacktrace provides information on where it failed * the job name could be something like "Job # 4" or "Job after <insert job name of previous successful job>", "UserClass#Line<where execute was called>", anything that is reasonable deterministic. > I think the current approach should be sufficient for now (failing the whole dispatcher bootstrap) It's not documented though ;) Neither for users (config docs) and devs (comment). -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org