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

[Runtimes] Fix and align with_source_archive() #1831

Merged
merged 37 commits into from
Apr 7, 2022

Conversation

yaronha
Copy link
Collaborator

@yaronha yaronha commented Mar 21, 2022

No description provided.

@yaronha yaronha requested a review from Hedingber March 28, 2022 15:58
mlrun/runtimes/base.py Outdated Show resolved Hide resolved
mlrun/runtimes/function.py Outdated Show resolved Hide resolved
mlrun/runtimes/function.py Outdated Show resolved Hide resolved
mlrun/runtimes/function.py Outdated Show resolved Hide resolved
mlrun/runtimes/function.py Outdated Show resolved Hide resolved
mlrun/runtimes/function.py Show resolved Hide resolved
mlrun/runtimes/function.py Show resolved Hide resolved
mlrun/runtimes/kubejob.py Show resolved Hide resolved
mlrun/runtimes/kubejob.py Outdated Show resolved Hide resolved
tests/system/runtimes/test_archives.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Hedingber Hedingber left a comment

Choose a reason for hiding this comment

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

Great test coverage

Comment on lines 1329 to 1339
def get_secrets(keys):
secrets = {}
if (
project
and get_k8s_helper(silent=True).is_running_inside_kubernetes_cluster()
):
secrets = function._get_k8s().get_project_secret_data(project, keys)
for key in keys:
if key in builder_env:
secrets[key] = builder_env.get(key)
return secrets
Copy link
Contributor

Choose a reason for hiding this comment

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

No reason for this to be nested, it's making it harder to read the code
You don't really need function._get_k8s() you can simply get_k8s_helper()
and you can pass it the rest of the variables

Comment on lines 165 to 166
# make sure we disable load_on_run mode if the source code is in the image
build.load_source_on_run = False
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure I follow, if you build an image, why it means that the source code is in the image ?

@Hedingber Hedingber changed the title fix and align with_source_archive() across runtimes [Runtimes] Fix and align with_source_archive() Apr 7, 2022
@Hedingber Hedingber merged commit 00fdb86 into mlrun:development Apr 7, 2022
@yaronha yaronha deleted the fix-nuclio-git-deploy branch May 11, 2022 16:32
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