-
Notifications
You must be signed in to change notification settings - Fork 23
fix: check lambda Function latest status in sdkupdate #174
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
fix: check lambda Function latest status in sdkupdate #174
Conversation
updatedStatusResource := rm.concreteResource(desired.DeepCopy()) | ||
updatedStatusResource.SetStatus(latest) |
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.
Q: Am I correct in assuming that the reason for this is to set the ensure that the new Function status is applied the resource? Doesn't the controller normally handle updating the status field until the synced:when
condition is met?
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.
Yes, it usually does if there is no error. But since below here we were returning a requeue error, the Synced one is ignored.
We should probably have a patch in runtime handling this..
pkg/resource/function/sdk.go
Outdated
if isFunctionPending(&resource{ko}) { | ||
ackcondition.SetSynced(&resource{ko}, corev1.ConditionFalse, nil, nil) | ||
} |
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.
Is this necessary with synced:when
set in generator.yaml?
5f926ee
to
4f4693e
Compare
thanks @michaelhtm !! |
This change ensures the Lambda Function does not get stuck in `pending`. This issue occurs because we check the desired Status, which is not in sync with the latest Status in AWS.
e52e832
to
98afbbe
Compare
@michaelhtm: The following test 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. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: michaelhtm, rushmash91 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 |
Issue #2433
Description of changes:
This change ensures the Lambda Function does not get stuck in
pending
.This issue occurs because we check the desired Status, which is not in
sync with the latest Status in AWS.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.