luca-p-castelli opened a new pull request, #948: URL: https://github.com/apache/flink-kubernetes-operator/pull/948
## What is the purpose of the change This pull request fixes a bug where in the observation phase, the operator tries to observe savepoint information for batch jobs and fails since checkpointing is not enabled for batch jobs. More information in: https://issues.apache.org/jira/browse/FLINK-37370 ## Brief change log 1. Modifies JobDetailsInfo and downstream tests to include job-type 2. Adds a method to FlinkService + AbstractFlinkService to fetch JobDetailsInfo for the given job 3. Adds a method to SnapshotObserver to check if a job is a batch job. This method is used to skip observing checkpoints/savepoints for batch jobs. ### Some questions 1. We have a local version of JobDetailsInfo in the operator code. Based on the existing comment, saying it can be removed when the client upgrades to 1.20, I tried to remove our local version, but ran into issues with the non-null requirement for slotSharingGroupId and jobType - particularly with the flink15 and flink16 compatibility tests. Open to suggestions. 2. When running a batch job there are still some exceptions being logged as warnings that originate in [populateStateSize](https://github.com/apache/flink-kubernetes-operator/blob/main/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/service/AbstractFlinkService.java#L783) - also related to checkpointing not being enabled for batch jobs. I didn't change anything there since those warnings don't crash anything. Open to suggestions if you think we shouldn't leave this as is. ## Verifying this change - All existing tests pass (modified a couple tests to include job-type) - Tested locally with the manifest attached to the issue to make sure the job successfully reaches FINISHED JOB STATUS As a next step, happy to add some tests for the new logic I've introduced. Where would you like to see tests? ## 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 changes to the `CustomResourceDescriptors`: no - Core observer or reconciler logic that is regularly executed: yes ## Documentation - Does this pull request introduce a new feature? no - If yes, how is the feature documented? not applicable -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
