From 0d85b3c3138635aeb965d7a7e67d02048661e5fd Mon Sep 17 00:00:00 2001 From: Philippe Moussalli Date: Thu, 24 Aug 2023 10:25:13 +0200 Subject: [PATCH] Fix missing slash manifest evolution (#385) --- src/fondant/manifest.py | 2 +- tests/example_specs/evolution_examples/4/output_manifest.json | 2 +- tests/example_specs/evolution_examples/5/output_manifest.json | 2 +- tests/example_specs/evolution_examples/6/output_manifest.json | 2 +- tests/example_specs/evolution_examples/7/output_manifest.json | 2 +- tests/test_manifest_evolution.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/fondant/manifest.py b/src/fondant/manifest.py index c0ba456dd..b94439ac7 100644 --- a/src/fondant/manifest.py +++ b/src/fondant/manifest.py @@ -305,7 +305,7 @@ def evolve( # noqa : PLR0912 (too many branches) # Update subset location as this is currently always rewritten evolved_manifest.subsets[subset_name]._specification[ "location" - ] = f"{self.pipeline_name}/{self.run_id}/{component_id}/{subset_name}" + ] = f"/{self.pipeline_name}/{self.run_id}/{component_id}/{subset_name}" # Subset is not yet in manifest, add it else: diff --git a/tests/example_specs/evolution_examples/4/output_manifest.json b/tests/example_specs/evolution_examples/4/output_manifest.json index 4b824a0fb..e5d318645 100644 --- a/tests/example_specs/evolution_examples/4/output_manifest.json +++ b/tests/example_specs/evolution_examples/4/output_manifest.json @@ -10,7 +10,7 @@ }, "subsets":{ "images":{ - "location":"test_pipeline/12345/example_component/images", + "location":"/test_pipeline/12345/example_component/images", "fields":{ "width":{ "type":"int32" diff --git a/tests/example_specs/evolution_examples/5/output_manifest.json b/tests/example_specs/evolution_examples/5/output_manifest.json index 4f9ee5604..a30b7840a 100644 --- a/tests/example_specs/evolution_examples/5/output_manifest.json +++ b/tests/example_specs/evolution_examples/5/output_manifest.json @@ -10,7 +10,7 @@ }, "subsets":{ "images":{ - "location":"test_pipeline/12345/example_component/images", + "location":"/test_pipeline/12345/example_component/images", "fields":{ "encoding":{ "type":"string" diff --git a/tests/example_specs/evolution_examples/6/output_manifest.json b/tests/example_specs/evolution_examples/6/output_manifest.json index 57cb50734..abe68ed17 100644 --- a/tests/example_specs/evolution_examples/6/output_manifest.json +++ b/tests/example_specs/evolution_examples/6/output_manifest.json @@ -10,7 +10,7 @@ }, "subsets":{ "images":{ - "location":"test_pipeline/12345/example_component/images", + "location":"/test_pipeline/12345/example_component/images", "fields":{ "encoding":{ "type":"string" diff --git a/tests/example_specs/evolution_examples/7/output_manifest.json b/tests/example_specs/evolution_examples/7/output_manifest.json index 2ec76c1ae..5aad56ccb 100644 --- a/tests/example_specs/evolution_examples/7/output_manifest.json +++ b/tests/example_specs/evolution_examples/7/output_manifest.json @@ -10,7 +10,7 @@ }, "subsets":{ "images":{ - "location":"test_pipeline/12345/example_component/images", + "location":"/test_pipeline/12345/example_component/images", "fields":{ "data":{ "type":"string" diff --git a/tests/test_manifest_evolution.py b/tests/test_manifest_evolution.py index f07e5d498..6ff5dae16 100644 --- a/tests/test_manifest_evolution.py +++ b/tests/test_manifest_evolution.py @@ -46,5 +46,5 @@ def test_component_spec_location_update(): assert ( evolved_manifest._specification["subsets"]["images"]["location"] - == "test_pipeline/12345/example_component/images" + == "/test_pipeline/12345/example_component/images" )