lrsb opened a new pull request, #1125:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1125
## What is the purpose of the change
`FlinkStateSnapshot`-triggered savepoints resolved their target directory
from the parent
`FlinkDeployment`'s observe config, so a per-job `state.savepoints.dir` set
on the
referenced `FlinkSessionJob` was silently dropped. This affects every
operator-triggered savepoint when
`kubernetes.operator.snapshot.resource.enabled` is true (upgrade savepoints,
savepoint-on-deletion, manual triggers). Per-job `state.checkpoints.dir` is
unaffected,
since Flink bakes it into the job's `CheckpointStorage` at submission.
## Brief change log
- `FlinkStateSnapshotContext.referencedJobObserveConfig` now merges the
referenced
`FlinkSessionJob`'s `flinkConfiguration` via
`FlinkConfigManager.getSessionJobConfig`,
instead of only resolving the parent `FlinkDeployment`'s observe config
- `StateSnapshotReconciler.triggerCheckpointOrSavepoint` uses
`ctx.getReferencedJobObserveConfig()` to resolve the snapshot config; the
`FlinkService` still comes from the `FlinkDeployment` context
- Deployment-referenced snapshots are unaffected (fall back to the
deployment observe
config)
## Verifying this change
This change added tests and can be verified as follows:
- `FlinkStateSnapshotContextTest`: verifies `referencedJobObserveConfig`
returns the
per-job `state.savepoints.dir` for a `FlinkSessionJob` reference, and
falls back to the
deployment-level dir for a `FlinkDeployment` reference
- Existing `FlinkStateSnapshotControllerTest` continues to pass (no
regression)
## 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]