fix(sdk): fix set_container_image within ParallelFor. Fixes #12413 #12414
+59
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
pipeline_channel.extract_pipeline_channels_from_any(name)to find all PipelineChannel instances embedded in thenameargument.self._channel_inputslist.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: