-
Notifications
You must be signed in to change notification settings - Fork 241
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
[Application] Validate the version of Nuclio before deploying #5618
[Application] Validate the version of Nuclio before deploying #5618
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.
There is already a check in the constructor
@min_nuclio_versions("1.12.7")
def __init__(self, spec=None, metadata=None):
just change the version
@@ -172,7 +172,7 @@ def __init__( | |||
class ApplicationRuntime(RemoteRuntime): | |||
kind = "application" | |||
|
|||
@min_nuclio_versions("1.12.7") | |||
@min_nuclio_versions("1.13.1") |
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.
it worth changing min_nuclio_versions
implementation that when using it on init it will log the Class name (ApplicationRuntime) and not init as it says nothing.
when using specific function (.deploy) it will log Class.deploy functionality not supported.
mlrun/runtimes/nuclio/function.py
Outdated
@@ -66,7 +66,7 @@ def wrapper(*args, **kwargs): | |||
return function(*args, **kwargs) | |||
|
|||
message = ( | |||
f"{function.__name__} is supported since nuclio {' or '.join(versions)}, currently using " | |||
f"'{function.__qualname__}' is supported since nuclio {' or '.join(versions)}, currently using " |
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.
TIL 🚀
Functions with
kind="application"
are deployed on non-supported nuclio versions. The function was generated, and then the error was raised:__init__ is supported since nuclio 1.13.1, currently using nuclio 1.12.14, please upgrade
The validation was done after the base deploy when calling API Gateways that were only supported by Nuclio 1.13.1.
We can fail the request early by doing validation in the
ApplicationRuntime
constructor.https://iguazio.atlassian.net/browse/ML-6540
Also fixing the error message
https://iguazio.atlassian.net/browse/ML-6539