-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-33803] Set observedGeneration at end of reconciliation #755
Conversation
...api/src/main/java/org/apache/flink/kubernetes/operator/api/status/FlinkDeploymentStatus.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the comment about adopting the already existing observed generation logic from lastReconciledSpec and simply moving it into a top level field.
Also this change should be general to both FlinkDeployments and FlinkSessionJobs.
f253d34
to
d1b278b
Compare
...rator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/ReconciliationUtils.java
Outdated
Show resolved
Hide resolved
d1b278b
to
27ea201
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good overall and thanks for updating the existing usage 👍
I added a small comment to where we should set the generation so that it's a bit more intuitive when reading the code but that's an easy change.
...rc/main/java/org/apache/flink/kubernetes/operator/api/reconciler/ReconciliationMetadata.java
Outdated
Show resolved
Hide resolved
27ea201
to
83d244a
Compare
Please generate the docs via 'mvn clean install -DskipTests -Pgenerate-docs' |
83d244a
to
17f3b5f
Compare
Updated docs with |
This looks good. Any further comments @gyfora? |
🚢 |
What is the purpose of the change
https://issues.apache.org/jira/browse/FLINK-33803
This pull requests adds the
observedGeneration
field to theFlinkDeployment
CRD status. This field is used to persist the generation that was last acted on by the operator. At the end of a successful reconciliation (reconcile
,RecoveryFailureException
,DeploymentFailedException
), the operator sets theobservedGeneration
field to the currentgeneration
number (from the CRD metadata).Brief change log
observedGeneration
field withinFlinkDeploymentStatus
after a completed reconciliationVerifying this change
This change added tests and can be verified as follows:
observedGeneration
based ongeneration
metadata taken fromlastReconciledSpec
Does this pull request potentially affect one of the following parts:
CustomResourceDescriptors
: yesDocumentation