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

[APIGateway] Keep mlrun function names in API gateway object on client side #5613

Merged
merged 8 commits into from
May 29, 2024

Conversation

rokatyy
Copy link
Member

@rokatyy rokatyy commented May 22, 2024

Jira - https://iguazio.atlassian.net/browse/ML-6491

There is a confusion between nuclio function names and mlrun function names in MLRun’s api gateway implementation. The problem is that now when functions are passed as MLRun object, mlrun generates a nuclio name and keeps it in api_gateway.functions (not an MLRun name). It can be a bit confusing for a user, so this is how the problem is solved:

  • We will keep MLRun function URI in api_gateway.function and generate nuclio function name just on MLRun api side

  • When sending api gateway request to nuclio api, we also need to populate an annotation which contains MLRun function URI (this functionality will be used in the future for https://iguazio.atlassian.net/browse/ML-6363)

  • When receive api gateway object from nuclio api, we want to decode a URI from annotation back to mlrun function name on MLRun api side, so when we get it on MLRun client side user won’t even have an idea what nuclio function name is.

@rokatyy rokatyy marked this pull request as ready for review May 22, 2024 16:03
mlrun/common/constants.py Outdated Show resolved Hide resolved
mlrun/common/schemas/api_gateway.py Outdated Show resolved Hide resolved
mlrun/common/schemas/api_gateway.py Outdated Show resolved Hide resolved
mlrun/runtimes/nuclio/api_gateway.py Outdated Show resolved Hide resolved
mlrun.common.helpers.parse_versioned_object_uri(func)
)

if parsed_project and function_name:
Copy link
Member

Choose a reason for hiding this comment

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

if function_name is not None that it wasn't a URI?
If so - explain this in the comment above (L287)

Copy link
Member Author

Choose a reason for hiding this comment

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

@TomerShor I have a comment above

tests/api/api/test_nuclio.py Outdated Show resolved Hide resolved
…-6491-keep-mlrun-names

# Conflicts:
#	mlrun/common/constants.py
@rokatyy rokatyy requested a review from TomerShor May 28, 2024 10:51
@TomerShor TomerShor merged commit 39bbdf8 into mlrun:development May 29, 2024
11 checks passed
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

2 participants