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

feat(backend): Parameterizing v2 Launcher and Driver Images #10269

Merged
merged 2 commits into from
Dec 5, 2023
Merged

feat(backend): Parameterizing v2 Launcher and Driver Images #10269

merged 2 commits into from
Dec 5, 2023

Conversation

DharmitD
Copy link
Contributor

@DharmitD DharmitD commented Nov 28, 2023

Description of your changes:
Resolves #10229

Parameterizing the v2 launcher and driver images so it's possible to extend/provide fixes to the code.

Testing instructions:

Follow instructions listed here and run a make install-compiler to ensure that the changes compile correctly.
Save the code changes locally and build an API Server image
Deploy KFP using steps listed here and replace the API Server image with the above image. Make sure API Server still comes up correctly.

Checklist:

Copy link

Hi @DharmitD. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@DharmitD DharmitD marked this pull request as draft November 28, 2023 14:36
@DharmitD DharmitD changed the title feat(backend): Parameterizing v2 Launcher Image. WIP: feat(backend): Parameterizing v2 Launcher Image. Nov 28, 2023
backend/src/v2/compiler/argocompiler/container.go Outdated Show resolved Hide resolved
backend/src/v2/compiler/argocompiler/container.go Outdated Show resolved Hide resolved
backend/src/v2/compiler/argocompiler/container.go Outdated Show resolved Hide resolved
backend/src/v2/compiler/argocompiler/container.go Outdated Show resolved Hide resolved
backend/src/v2/compiler/argocompiler/container.go Outdated Show resolved Hide resolved
backend/src/v2/compiler/argocompiler/container.go Outdated Show resolved Hide resolved
@google-oss-prow google-oss-prow bot added size/S and removed size/M labels Nov 29, 2023
@DharmitD DharmitD changed the title WIP: feat(backend): Parameterizing v2 Launcher Image. feat(backend): Parameterizing v2 Launcher Image. Nov 29, 2023
@DharmitD DharmitD marked this pull request as ready for review November 29, 2023 14:59
@DharmitD DharmitD marked this pull request as draft November 29, 2023 16:03
@DharmitD DharmitD changed the title feat(backend): Parameterizing v2 Launcher Image. WIP: feat(backend): Parameterizing v2 Launcher Image. Nov 29, 2023
@DharmitD DharmitD changed the title WIP: feat(backend): Parameterizing v2 Launcher Image. feat(backend): Parameterizing v2 Launcher Image. Nov 30, 2023
@DharmitD DharmitD marked this pull request as ready for review November 30, 2023 08:59
Env: []k8score.EnvVar{
{
Name: LauncherImageEnvVar,
Value: GetLauncherImage(),
Copy link
Member

Choose a reason for hiding this comment

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

is this value the same as c.launcherImage at line 241? if yes, you can directly use it. no need to call the function again, although it gets the same value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yhwang good catch!
I updated it to set Image directly to the result of GetLauncherImage() and remove the Env field.

@@ -117,7 +117,7 @@ func Compile(jobArg *pipelinespec.PipelineJob, kubernetesSpecArg *pipelinespec.S
templates: make(map[string]*wfapi.Template),
// TODO(chensun): release process and update the images.
driverImage: "gcr.io/ml-pipeline/kfp-driver@sha256:8e60086b04d92b657898a310ca9757631d58547e76bbbb8bfc376d654bef1707",
Copy link
Member

Choose a reason for hiding this comment

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

Not sure do you also want to parameterize the driver image? This image is also hard coded into the spec unless the Argo compiler move it to use Argo HTTP Template.

Copy link
Member

Choose a reason for hiding this comment

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

+1, please do the same for driver as well, the two are usually updated together

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Tomcli @chensun Added a commit to parameterize the driver image as well. Could you please take a look?

@Tomcli
Copy link
Member

Tomcli commented Nov 30, 2023

/ok-to-test

@chensun
Copy link
Member

chensun commented Dec 1, 2023

/test kubeflow-pipeline-upgrade-test

@DharmitD
Copy link
Contributor Author

DharmitD commented Dec 2, 2023

/test kubeflow-pipelines-samples-v2

1 similar comment
@DharmitD
Copy link
Contributor Author

DharmitD commented Dec 2, 2023

/test kubeflow-pipelines-samples-v2

@google-oss-prow google-oss-prow bot added size/M and removed size/S labels Dec 4, 2023
@chensun
Copy link
Member

chensun commented Dec 5, 2023

Seems like the error is related to this issue #10282 @connor-mccarthy Do you know how can we pass this test? It seems like this is an issue that could block future PRs as well. Thank you.

kubeflow-pipelines-samples-v2 is broken and it's a know issue, this test is not a required test though, it won't block any PR merge.

Copy link
Member

@chensun chensun left a comment

Choose a reason for hiding this comment

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

Thanks @DharmitD for the contribution.

I'll leave it to @Tomcli to add the lgtm label for merging

/approve

backend/src/v2/compiler/argocompiler/container.go Outdated Show resolved Hide resolved
@@ -111,7 +133,7 @@ func (c *workflowCompiler) addContainerDriverTemplate() string {
},
},
Container: &k8score.Container{
Image: c.driverImage,
Image: GetDriverImage(),
Copy link
Member

Choose a reason for hiding this comment

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

nit: It would be great if you can add some unit tests to this change. Not necessarily a blocker for merging this PR though.

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chensun

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot added size/S and removed size/M labels Dec 5, 2023
Copy link

@DharmitD: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
kubeflow-pipelines-samples-v2 af2fa35 link false /test kubeflow-pipelines-samples-v2

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. I understand the commands that are listed here.

@Tomcli
Copy link
Member

Tomcli commented Dec 5, 2023

/lgtm

Thanks @DharmitD

@google-oss-prow google-oss-prow bot added the lgtm label Dec 5, 2023
@google-oss-prow google-oss-prow bot merged commit 23a2bc3 into kubeflow:master Dec 5, 2023
5 of 6 checks passed
@DharmitD
Copy link
Contributor Author

DharmitD commented Dec 6, 2023

Thank you for reviewing @chensun @Tomcli !

petethegreat pushed a commit to petethegreat/pipelines that referenced this pull request Dec 10, 2023
…#10269)

* Parameterize v2 launcher image

* Parameterize v2 driver image
@xixici
Copy link

xixici commented Dec 27, 2023

I added the environment variables in the API server, but it doesn't seem to have any effect. Here are the commands I used:

echo 'export V2_LAUNCHER_IMAGE=kfp-launcher:0.0.1-aarch64-beta' >> ~/.bashrc
echo 'export V2_DRIVER_IMAGE=kfp-driver:0.0.1-aarch64-beta' >> ~/.bashrc

source ~/.bashrc

I also added the environment variables in the ArgoExec image, but unfortunately, it doesn't work either.
I'm confused about this feature. I am not a Golang engineer, so I might have made some mistakes in understanding or implementing the necessary configurations.

@DharmitD @chensun

@xin053
Copy link

xin053 commented Jan 30, 2024

I added the environment variables in the API server, but it doesn't seem to have any effect. Here are the commands I used:

echo 'export V2_LAUNCHER_IMAGE=kfp-launcher:0.0.1-aarch64-beta' >> ~/.bashrc
echo 'export V2_DRIVER_IMAGE=kfp-driver:0.0.1-aarch64-beta' >> ~/.bashrc

source ~/.bashrc

I also added the environment variables in the ArgoExec image, but unfortunately, it doesn't work either. I'm confused about this feature. I am not a Golang engineer, so I might have made some mistakes in understanding or implementing the necessary configurations.

@DharmitD @chensun

kubectl -n kubeflow edit deployment.apps/ml-pipeline

update image gcr.io/ml-pipeline/api-server to use new tag,such as gcr.io/ml-pipeline/api-server:2.0.5

then add env V2_LAUNCHER_IMAGE and V2_DRIVER_IMAGE

微信截图_20240130154858

@thesuperzapper
Copy link
Member

I want to highlight that V2_LAUNCHER_IMAGE will NOT affect V2_COMPATIBLE mode runs.

These runs will still use the _DEFAULT_LAUNCHER_IMAGE which was hard-coded in the version of the kfp SDK you are using which is usually gcr.io/ml-pipeline/kfp-launcher:1.8.7:

orfeas-k added a commit to canonical/kfp-operators that referenced this pull request May 22, 2024
…455)

Enable charm configuration of launcher and driver images used during pipeline steps. Those can be configured through config options `launcher-image` and `driver-image`. When unset, KFP uses the default values defined. This is based on upstream implementation introduced in kubeflow/pipelines#10269.

Closes #452
orfeas-k added a commit to canonical/kfp-operators that referenced this pull request May 22, 2024
…455)

Enable charm configuration of launcher and driver images used during pipeline steps. Those can be configured through config options `launcher-image` and `driver-image`. When unset, KFP uses the default values defined. This is based on upstream implementation introduced in kubeflow/pipelines#10269.

Closes #452
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] Parametrize launcher image in KFPV2
8 participants