diff --git a/userCode/main.py b/userCode/main.py index 17b96de0..28bfbedc 100644 --- a/userCode/main.py +++ b/userCode/main.py @@ -92,6 +92,11 @@ def gleaner_config(context: AssetExecutionContext): sources = [] names = set() + + assert ( + len(Lines) > 0 + ), f"No sitemaps found in sitemap index {REMOTE_GLEANER_SITEMAP}" + for line in Lines: basename = REMOTE_GLEANER_SITEMAP.removesuffix(".xml") name = ( diff --git a/userCode/test/test_e2e.py b/userCode/test/test_e2e.py index dc08560c..d27326fc 100644 --- a/userCode/test/test_e2e.py +++ b/userCode/test/test_e2e.py @@ -10,7 +10,7 @@ from dagster import AssetsDefinition, AssetSpec, SourceAsset -def test_materialize_configs(): +def test_materialize_ref_hu02(): instance = DagsterInstance.ephemeral() assets = load_assets_from_modules([main]) @@ -34,10 +34,10 @@ def test_materialize_configs(): all_partitions = sources_partitions_def.get_partition_keys( dynamic_partitions_store=instance ) - assert len(all_partitions) > 0 + assert len(all_partitions) > 0, "Partitions were not generated" result = resolved_job.execute_in_process( instance=instance, partition_key="ref_hu02_hu02__0" ) - assert result.success + assert result.success, "Job execution failed for partition 'ref_hu02_hu02__0'"