[FLINK-33803] Remove deprecated lastReconciledSpec
meta generation in favour of observedGeneration
#834
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
Followup to https://issues.apache.org/jira/browse/FLINK-33803 (#755)
This PR removes internal usages of the
lastReconciledSpec
metadata (and generation) that were kept in the initial PR to avoid downstream breakage.observedGeneration
replaces this semantically. Removing the deprecated fields is to end up with a cleaner codebase.Note: the removed fields were nested within the
lastReconciledSpec
String
, thus there is no documentation to be updated (please advise if I missed something).Brief change log
ObjectMeta
metadata
attribute (containinggeneration
) within theReconciliationMetadata
classFlinkDeploymentStatus
w.r.t. reconciliationmetadata
field (from the CRD metadata) during deserialization before passing the content into aReconciliationMetadata
instance such that its constructor does not mutate the resourcesJsonMappingException
:Unrecognized field 'metadata' (class org.apache.flink.kubernetes.operator.api.reconciler.ReconciliationMetadata), not marked as ignorable
, causing pods to fail.Verifying this change
This change added tests and can be verified as follows:
specWithMeta.getMeta().getMetadata().getGeneration()
to assert againststatus.getObservedGeneration()
instead (tests pass)FlinkDeployment
custom resource that depends on the operator (with 2 JobManagers & 2 TaskManagers), and checking its CRD, verifying that fields are mapped accordingly.Logs
Before:
After:
Does this pull request potentially affect one of the following parts:
CustomResourceDescriptors
: yesDocumentation