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

[2/n][pipeline-gen] Convert default values into constant vars #38

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

khluu
Copy link
Collaborator

@khluu khluu commented Sep 28, 2024

  • Convert all default values used in plugin config into constant vars so it's easier to test

p
Signed-off-by: kevin <[email protected]>
@khluu khluu requested a review from aslonnie September 28, 2024 00:18
@@ -88,6 +95,7 @@ class KubernetesPluginConfig(BaseModel):


def get_kubernetes_plugin_config(container_image: str, test_bash_command: List[str], num_gpus: int) -> Dict:
test_bash_command[-1] = f'"{test_bash_command[-1]}"'
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is this line doing?

Copy link
Collaborator

Choose a reason for hiding this comment

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

is this for the quoting? why is this required? this is going to be prone to env var injection?

@@ -20,7 +20,7 @@ def test_get_kubernetes_plugin_config():
"containers": [
{
"image": docker_image_path,
"command": [" ".join(test_bash_command)],
"command": ['bash -c "echo A"'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

I do not quite understand the change in this file.

Copy link
Collaborator

@aslonnie aslonnie left a comment

Choose a reason for hiding this comment

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

can you separate the double quote thing into another PR?

p
Signed-off-by: kevin <[email protected]>
@khluu
Copy link
Collaborator Author

khluu commented Sep 30, 2024

I just removed the quote thing from this PR

@khluu khluu requested a review from aslonnie September 30, 2024 21:44
Copy link
Collaborator

@aslonnie aslonnie left a comment

Choose a reason for hiding this comment

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

could you also update the PR description?

@khluu khluu merged commit 10d0c43 into main Sep 30, 2024
1 check passed
@khluu khluu deleted the fix_plugin branch October 9, 2024 20:42
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.

2 participants