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

fix: server can be return as nil when not found causing panics #4934

Merged
merged 3 commits into from
Jun 22, 2023
Merged

fix: server can be return as nil when not found causing panics #4934

merged 3 commits into from
Jun 22, 2023

Conversation

ukclivecox
Copy link
Contributor

@ukclivecox ukclivecox commented Jun 21, 2023

FIXES: #4931 where a panic was causes when mlserver was deleted while it had a model. The envoy logic was getting the server for this model but there was none.

We were return no error when a server was not found but just a nil server. Having checked all the uses I think returning an error is best and no functionality will change.

In future we could return a typed error for no server found if we think clients need to check for this type of error but this does not seem to be needed right now.

Have tested the use case in #4931 and the model is reloaded ok after the mlserver pod comes back.

The PR also cleans up the Envoy update to not do unnecessary calls when an error state has been hit. The control flow still needs to reach the end of the modelUpdate call to do batch updates.

@ukclivecox ukclivecox added the v2 label Jun 21, 2023
@ukclivecox ukclivecox requested a review from sakoush June 21, 2023 13:42
@ukclivecox ukclivecox changed the title Fix server can be return as nil when not found causing panics fix: server can be return as nil when not found causing panics Jun 21, 2023
Copy link
Member

@sakoush sakoush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ukclivecox ukclivecox merged commit 6aec493 into SeldonIO:v2 Jun 22, 2023
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants