Skip to content
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

[Controller] Replace selector only when function is ready #3235

Merged
merged 4 commits into from
May 5, 2024

Conversation

rokatyy
Copy link
Contributor

@rokatyy rokatyy commented Apr 26, 2024

This PR fixes a bug where on all request except the 1st one to scaledToZero function we returned 503 error without waiting for the function start.

Jira - https://iguazio.atlassian.net/browse/NUC-1 (solution is explained in the task)

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.

With the current implementation it seems that the function resources will be created and updated twice in a row - once for the FunctionStateWaitingForScaleResourcesFromZero state, and once for the FunctionStateWaitingForReadinessWhenScaleFromZero.
I understand that you want to update the service labels, but it is a part of the entire resource creation flow, so you will basically have to wait for all resources to be ready again...

@rokatyy
Copy link
Contributor Author

rokatyy commented Apr 28, 2024

@TomerShor that is true. Another option here is to update service right after waiting for available. However, it will ruin our consistency in terms of updating resources and waiting for availability in one place.

@rokatyy rokatyy marked this pull request as draft May 1, 2024 08:59
@rokatyy rokatyy marked this pull request as ready for review May 1, 2024 12:30
@rokatyy rokatyy requested a review from TomerShor May 2, 2024 08:10
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.

Much better! Logic is clear and correct, only have some suggestions for clarity

pkg/platform/kube/controller/nucliofunction.go Outdated Show resolved Hide resolved
pkg/platform/kube/functionres/lazy.go Outdated Show resolved Hide resolved
pkg/platform/kube/functionres/types.go Outdated Show resolved Hide resolved
pkg/platform/kube/functionres/lazy.go Outdated Show resolved Hide resolved
@rokatyy rokatyy requested a review from TomerShor May 2, 2024 10:21
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.

Nice, one little thing

pkg/platform/kube/functionres/lazy.go Outdated Show resolved Hide resolved
@TomerShor TomerShor merged commit b0d839d into nuclio:development May 5, 2024
11 checks passed
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.

None yet

2 participants