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

[API] Fix files API to work on non-k8s environments #3916

Merged
merged 2 commits into from
Jul 11, 2023

Conversation

theSaarco
Copy link
Member

@theSaarco theSaarco commented Jul 11, 2023

The new files API retrieves project secrets before accessing files, to enable access to stores that need credentials. In a situation where MLRun service is not running on k8s (Docker, local deployments), this would explode.
Added a check to verify first that we're running inside a k8s cluster. If we're not, the file will be retrieved without attempting to get project secrets for authentication.

Copy link
Member

@quaark quaark left a comment

Choose a reason for hiding this comment

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

Minor, looks good otherwise!

mlrun/api/api/endpoints/files.py Outdated Show resolved Hide resolved
Copy link
Member

@quaark quaark left a comment

Choose a reason for hiding this comment

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

Spoke with @theSaarco offline, we agreed the existing log is enough

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.

The fix is one step in the right direction but IIRC there are more places that we access the k8s helper when not running in k8s and we explode (see #3444)
For example submit_run_sync
Maybe see if you can find more places where this is needed

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.

discussed offline - should solve #3444

@alonmr alonmr merged commit 9f45fc8 into mlrun:development Jul 11, 2023
14 checks passed
guy1992l pushed a commit to guy1992l/mlrun that referenced this pull request Jul 25, 2023
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