diff --git a/src/openeo_aggregator/partitionedjobs/tracking.py b/src/openeo_aggregator/partitionedjobs/tracking.py index dc07dfd4..1335bd1f 100644 --- a/src/openeo_aggregator/partitionedjobs/tracking.py +++ b/src/openeo_aggregator/partitionedjobs/tracking.py @@ -102,13 +102,14 @@ def create_crossbackend_pjob( create_stats = collections.Counter() def get_replacement(node_id: str, node: dict, subgraph_id: SubGraphId) -> dict: - # TODO: use `load_stac` iso `load_result`, and use canonical URL? nonlocal batch_jobs - job_id = batch_jobs[subgraph_id].job_id + # TODO: use canonical URL to circumvent auth issues + # but how does `parial` work there? (https://github.com/Open-EO/openeo-api/issues/507) + stac_url = batch_jobs[subgraph_id].get_results_metadata_url(full=True) + "?partial=true" return { node_id: { - "process_id": "load_result", - "arguments": {"id": job_id}, + "process_id": "load_stac", + "arguments": {"url": stac_url}, } } diff --git a/tests/partitionedjobs/test_api.py b/tests/partitionedjobs/test_api.py index 37b334d4..64f949c6 100644 --- a/tests/partitionedjobs/test_api.py +++ b/tests/partitionedjobs/test_api.py @@ -753,7 +753,10 @@ def test_create_job_basic(self, flask_app, api100, zk_db, dummy1): "backend_id": "b1", "process_graph": { "lc1": {"process_id": "load_collection", "arguments": {"id": "S2"}}, - "lc2": {"process_id": "load_result", "arguments": {"id": "1-jb-0"}}, + "lc2": { + "process_id": "load_stac", + "arguments": {"url": "https://b1.test/v1/jobs/1-jb-0/results?partial=true"}, + }, "merge": { "process_id": "merge_cubes", "arguments": {"cube1": {"from_node": "lc1"}, "cube2": {"from_node": "lc2"}}, @@ -775,7 +778,10 @@ def test_create_job_basic(self, flask_app, api100, zk_db, dummy1): assert dummy1.get_job_status(TEST_USER, expected_job_id) == "created" assert dummy1.get_job_data(TEST_USER, expected_job_id).create["process"]["process_graph"] == { "lc1": {"process_id": "load_collection", "arguments": {"id": "S2"}}, - "lc2": {"process_id": "load_result", "arguments": {"id": "1-jb-0"}}, + "lc2": { + "process_id": "load_stac", + "arguments": {"url": "https://b1.test/v1/jobs/1-jb-0/results?partial=true"}, + }, "merge": { "process_id": "merge_cubes", "arguments": {"cube1": {"from_node": "lc1"}, "cube2": {"from_node": "lc2"}},