-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(backend): configurable log level for driver / launcher images #11278
feat(backend): configurable log level for driver / launcher images #11278
Conversation
Hi @CarterFendley. Thanks for your PR. I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
d66664a
to
ce4527f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you for tackling this, @CarterFendley!
Maybe worth adding just one unit test to verify if setting both env vars will generate the Workflow yaml with the new flags. |
Will do :) |
3f73d4c
to
714901f
Compare
Okay in this commit I have updated the compiler tests with logic to optional take in environment variables and set them: if tt.envVars != nil {
for _, envVar := range tt.envVars {
parts := strings.Split(strings.ReplaceAll(envVar, " ", ""), "=")
os.Setenv(parts[0], parts[1])
// Unset after test cases has ended
defer os.Unsetenv(parts[0])
}
} To test cases and golden files have been added to test the logic included in this PR. {
jobPath: "../testdata/hello_world.json",
platformSpecPath: "",
argoYAMLPath: "testdata/with_logging/hello_world.yaml",
envVars: []string{"DRIVER_LOG_LEVEL=5", "LAUNCHER_LOG_LEVEL=5"},
},
{
jobPath: "../testdata/importer.json",
platformSpecPath: "",
argoYAMLPath: "testdata/with_logging/importer.yaml",
envVars: []string{"DRIVER_LOG_LEVEL=5", "LAUNCHER_LOG_LEVEL=5"},
}, |
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @CarterFendley.
Looks good. I just left a few minor comments.
@@ -303,8 +318,9 @@ func (c *workflowCompiler) addContainerExecutorTemplate(refName string) string { | |||
InitContainers: []wfapi.UserContainer{{ | |||
Container: k8score.Container{ | |||
Name: "kfp-launcher", | |||
Image: GetLauncherImage(), | |||
Command: []string{"launcher-v2", "--copy", component.KFPLauncherPath}, | |||
Image: c.launcherImage, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for this change besides optimization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No not really, just made it a bit concise to add flags and follows the pattern used in the other Container definitions for driver / launcher
714901f
to
264d809
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
264d809
to
8d0113b
Compare
8d0113b
to
302b9a2
Compare
Signed-off-by: carter.fendley <carter.fendley@gmail.com>
Signed-off-by: carter.fendley <carter.fendley@gmail.com>
Signed-off-by: carter.fendley <carter.fendley@gmail.com>
Signed-off-by: carter.fendley <carter.fendley@gmail.com>
Signed-off-by: carter.fendley <carter.fendley@gmail.com>
Signed-off-by: carter.fendley <carter.fendley@gmail.com>
Signed-off-by: carter.fendley <carter.fendley@gmail.com>
302b9a2
to
edb2172
Compare
launcher Signed-off-by: carter.fendley <carter.fendley@gmail.com>
edb2172
to
d4dacb3
Compare
Modifications have been made to address this issue found by @gregsheremeta, thanks for pointing that out! Since the instance was one where the driver sets the log level of the launcher a design change was made to have one unified The new usage is to update the environment variable on the
Importantly, as before, it is important that a numerical value such as the literal 3 not "3" here will be invalid deployment spec and validation on the spec will fail causing After these updates, the @hbelmiro @HumairAK, or any others: Please let me know if you have any additional feedback on this PR. Apologies for the delay in the patch! |
Signed-off-by: carter.fendley <carter.fendley@gmail.com>
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: droctothorpe, HumairAK The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
IMPORTANT
Design changes have been made since the original description, see this comment for updated usage
Description of your changes:
This PR adds the ability to change log level in the driver / launcher containers. This is implemented in a similar pattern as the overrides for driver / launcher images. Specifically, you can add the following environment variables to the
ml-pipeline
deployments:Note: A numerical value such as the literal
3
not"3"
here will be invalid deployment spec and validation on the spec will fail causingkubectl edit
to reject it with the message:error: deployments.apps "ml-pipeline" is invalid
.Other minor alterations
workflowCompiler.driverImage
andworkflowCompiler.launcherImage
attributes which are populated here. This is a very minor change but seemed better to invoke only once and match other such usages (in importer.go and dag.go). If there are reasons this should be re-invoked, please let me know.Feedback wanted
The environment variable for this is similar to the
V2_LAUNCHER_IMAGE
andV2_DRIVER_IMAGE
but without theV2_
prefix. If anyone has preferences here, I do not, so happy to take any path.Checklist: