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

[Application] Validate the version of Nuclio before deploying #5618

Merged

Conversation

moranbental
Copy link
Member

@moranbental moranbental commented May 23, 2024

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

@moranbental moranbental marked this pull request as ready for review May 23, 2024 08:50
Copy link
Member

@alonmr alonmr left a 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

@moranbental moranbental requested a review from alonmr May 23, 2024 09:05
@@ -172,7 +172,7 @@ def __init__(
class ApplicationRuntime(RemoteRuntime):
kind = "application"

@min_nuclio_versions("1.12.7")
@min_nuclio_versions("1.13.1")
Copy link
Member

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.

@@ -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 "
Copy link
Member

Choose a reason for hiding this comment

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

TIL 🚀

@liranbg liranbg merged commit f1f1b8f into mlrun:development May 26, 2024
11 checks passed
@moranbental moranbental deleted the application-runtime-nuclio-verstion branch May 26, 2024 09:42
rokatyy pushed a commit to rokatyy/mlrun that referenced this pull request May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants