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

Remove DOCKER_REMOTE_IMAGE from .make.defaults #890

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

touma-I
Copy link
Collaborator

@touma-I touma-I commented Dec 18, 2024

Why are these changes needed?

In recent transform refactoring PRs, such as those for #878 and #869, the kind load command is executed twice for the transform image in the kfp tests. This happens instead of executing it once for the kfp-data-processing image and once for the transform image. This issue can be observed in the logs of KFP runs in these PRs by searching for the kind load string.

This PR aims to address this issue.

Explanation of the Error:

To understand why kfp-data-processing:latest quay.io/dataprep1/data-prep-kit/kfp-data-processing:latest is not loaded as expected in kfp-load-kind target let's look at the Makefile in kfp/kfp_ray_components:

in its first line it includes .make.defaults which defines DOCKER_REMOTE_IMAGE:

DOCKER_REMOTE_IMAGE=$(DOCKER_REGISTRY_ENDPOINT)/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_VERSION)
This is a recursively expanded variable, meaning its value is dynamically recalculated each time it is referenced, using the current values of any variables it depends on.

The recent transform refactoring PRs define the DOCKER_IMAGE_NAME variable in kfp_ray/Makefile as follows:

DOCKER_IMAGE_NAME = $(TRANSFORM_NAME)-$(TRANSFORM_RUNTIME)
Which is also recursively expanded variable, causing DOCKER_REMOTE_IMAGE to be as follows:

DOCKER_REMOTE_IMAGE=$(DOCKER_REGISTRY_ENDPOINT)/$(TRANSFORM_NAME)-$(TRANSFORM_RUNTIME):$(DOCKER_IMAGE_VERSION)
This explains why when executing kind-load-image target DOCKER_REMOTE_IMAGE equals to quay.io/dataprep1/data-prep-kit/ededup-ray:latest.

Related issue number (if any).

@touma-I touma-I changed the title Remote image fix Remove DOCKER_REMOTE_IMAGE from .make.defaults Dec 18, 2024
@touma-I touma-I requested review from roytman and revit13 December 18, 2024 13:37
@revit13
Copy link
Collaborator

revit13 commented Dec 18, 2024

LGTM please remove the assignment of DOCKER_REMOTE_IMAGE in workflow-test traget in kfp_ray/Makefile file as it overrides its value . Thanks

@@ -35,6 +35,10 @@ DOCKER_IMAGE_NAME?=$(TRANSFORM_NAME)-$(TRANSFORM_RUNTIME)
TRANSFORM_RUNTIME_SRC_FILE?=$(TRANSFORM_NAME)_transform_$(TRANSFORM_RUNTIME).py
TRANSFORM_TEST_FILE?=test/test_$(TRANSFORM_NAME).py

## Used when publish or building the image by legacy tansforms.
## Will be removed when all transfdorms get refactored
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor typo transfdorms

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oops. Done. Thanks

Signed-off-by: Maroun Touma <[email protected]>
@touma-I touma-I marked this pull request as ready for review December 19, 2024 11:53
@touma-I touma-I requested a review from revit13 December 19, 2024 11:55
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