Skip to content

Conversation

@uzi0espil
Copy link
Contributor

Description of your changes:

This PR fixes a bug in PipelineTask.set_container_image where dependencies from PipelineChannels (like PipelineParameter or upstream task outputs) were not correctly registered if they were partA of a formatted string.

The previous implementation only checked if the entire name argument was a PipelineChannel instance. It did not handle cases where channels were embedded within a string.

This PR introduces logic to:

  1. Use pipeline_channel.extract_pipeline_channels_from_any(name) to find all PipelineChannel instances embedded in the name argument.
  2. Iterate through the found channels.
  3. Add each channel to the task's self._channel_inputs list.
  4. Added a compiler test for testing set_container_image within a dsl.ParallelFor.

This ensures that all dynamic dependencies used to construct the container image name are properly registered, allowing the KFP compiler to build the correct task execution graph.

Which issue(s) this PR fixes
Fixes #12413

Checklist:

@google-oss-prow
Copy link

Hi @uzi0espil. 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.

@hbelmiro
Copy link
Contributor

hbelmiro commented Nov 7, 2025

/ok-to-test

@hbelmiro
Copy link
Contributor

hbelmiro commented Nov 7, 2025

/ok-to-test

@uzi0espil
Copy link
Contributor Author

/assign

@hbelmiro
Copy link
Contributor

/ok-to-test

@hbelmiro
Copy link
Contributor

hbelmiro commented Dec 1, 2025

/ok-to-test

Copy link
Contributor

@zazulam zazulam left a comment

Choose a reason for hiding this comment

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

Nice catch!

/lgtm
/approve

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zazulam

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

@zazulam zazulam added lgtm and removed lgtm labels Dec 1, 2025
@google-oss-prow google-oss-prow bot merged commit e4a7574 into kubeflow:master Dec 1, 2025
39 checks passed
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.

[sdk] dsl.set_container_image doesn't work within dsl.ParallelFor

3 participants