-
Notifications
You must be signed in to change notification settings - Fork 214
feat: add SkipIncompleteLateInitializeCheck #606
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
base: main
Are you sure you want to change the base?
feat: add SkipIncompleteLateInitializeCheck #606
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: michaelhtm The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
pkg/generate/code/late_initialize.go
Outdated
for fieldName, lateInitConfig := range lateInitConfigs { | ||
if lateInitConfig.SkipIncompleteCheck { | ||
continue | ||
} |
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.
Would this mean that we only make a single attempt to read the field after initial creation? Is there any mechanism that would allow us to eventually sync this field is the AWS resource hadn't set a skipped field by the first post-create sync?
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.
For now we will rely on the resource status (eg. RDS DBInstance) being ready to know whether or not all fields returned from the initial LateInitialize call are finalized or not.
1783b55
to
d80ea4b
Compare
But why make an extra ReadOne API call if you could already get the info from the OG ReadOne call? |
When a field is marked for lateInitialize, the controller tries to ensure that field is never nil. If by chance the field is nil, the controller will reconcile every 5 seconds until the field is no longer nil. Although we want certain fields lateInitialized, we don't expect them to be nonNil. In the example of RDS DBInstance, DBInstance contains PerformanceInsightsKMSID, that we want to lateInitialize only when PerformanceInsights is Enabled. For now this change only allows us the incomplete check, but moving forward, we may want to add certain conditions, to skip or not to skip...
d80ea4b
to
19b99ae
Compare
I agree. LateInitialize can be improved in the future. |
/retest |
/retest-required |
1 similar comment
/retest-required |
/retest |
/retest ec2-controller-test |
@michaelhtm: The
The following commands are available to trigger optional jobs:
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@michaelhtm: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Description of changes:
When a field is marked for lateInitialize, the controller tries to
ensure that field is never nil.
If by chance the field is nil, the controller will reconcile every 5
seconds until the field is no longer nil.
Although we want certain fields lateInitialized, we don't expect them to
be nonNil.
In the example of RDS DBInstance, DBInstance contains
PerformanceInsightsKMSID, that we want to lateInitialize only when
PerformanceInsights is Enabled.
For now this change only allows us the incomplete check, but moving
forward, we may want to add certain conditions, to skip or not to
skip...
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.