-
Notifications
You must be signed in to change notification settings - Fork 547
[Controller] Enrich invocation status for unhealthy function #3448
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
Conversation
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.
Overall ok, but a couple of questions
// if function is unhealthy, it might be invokable, and | ||
// it can become ready, so enrich invocation status | ||
if functionErrorState == functionconfig.FunctionStateUnhealthy && resources != nil { | ||
if err := fo.populateFunctionInvocationStatus(function, functionStatus, resources); err != nil { | ||
return errors.Wrap(err, "Failed to populate function invocation status") | ||
} | ||
} |
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.
There's only 1 place the function state can be set to unhealthy (line 275). Why not handle it specifically there instead of in the more general setFunctionError
function?
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.
@TomerShor because status object is defined there. I think, if doing it properly, the whole code of this function should be refactored and creation of any additional status object should be avoided because status is already a part of the function. The way it's done in the pr to fix it is the least intrusive I can think of.
Also, imagine we have another place of setting function to unhealthy. In this case the approach where we set function in the CreateOrUpdate
won't be a very good idea
…3448) Enrich function invocation URLs even if function is Unhealthy, because it can still be moved to Ready status and then the URLs are valid. jira - https://iguazio.atlassian.net/browse/NUC-331
Enrich function invocation URLs even if function is Unhealthy, because it can still be moved to Ready status and then the URLs are valid.
jira - https://iguazio.atlassian.net/browse/NUC-331