Skip to content

Commit

Permalink
feat: allow users to use version suffix pipeline runs
Browse files Browse the repository at this point in the history
Signed-off-by: rkpattnaik780 <rkpattnaik780@gmail.com>
  • Loading branch information
rkpattnaik780 committed Sep 28, 2023
1 parent 6cb0e3d commit abe2f86
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion elyra/pipeline/kfp/processor_kfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,15 @@ def process(self, pipeline):

# Create an instance id that will be used to store
# the pipelines' dependencies, if applicable
pipeline_instance_id = f"{pipeline_name}-{timestamp}"
pipeline_instance_id = ""

# Use environment variable to set version as suffix instead of timestamp
if os.environ.get("KFP_SUFFIX_USE_VERSION") == "true":
# Version is determined by the count of existing pipeline versions
version = client.list_pipeline_versions(pipeline_id=pipeline_id).total_size
pipeline_instance_id = f"{pipeline_name}-v{version}"
else:
pipeline_instance_id = f"{pipeline_name}-{timestamp}"

# Generate Python DSL from workflow
pipeline_dsl = self._generate_pipeline_dsl(
Expand Down

0 comments on commit abe2f86

Please sign in to comment.