8000 [Controller] Enrich invocation status for unhealthy function by rokatyy · Pull Request #3448 · nuclio/nuclio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[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

Merged
merged 4 commits into from
Jan 13, 2025

Conversation

rokatyy
Copy link
Contributor
@rokatyy rokatyy commented Jan 10, 2025

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

@rokatyy rokatyy marked this pull request as ready for review January 10, 2025 13:41
Copy link
Contributor
@TomerShor TomerShor left a 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

Comment on lines +406 to +412
// 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")
}
}
Copy link
Contributor

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?

Copy link
Contributor Author
@rokatyy rokatyy Jan 12, 2025

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

@TomerShor TomerShor merged commit d682aad into nuclio:development Jan 13, 2025
14 checks passed
rokatyy added a commit to rokatyy/nuclio that referenced this pull request Mar 6, 2025
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0