Skip to content

Commit 332fde3

Browse files
fix(job-orchestration): Make tag_ids a required list[int] for compatibility with Spider compressor. (#1453)
1 parent 13f2cfd commit 332fde3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

components/job-orchestration/job_orchestration/executor/compress/celery_compress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def compress(
1919
self: Task,
2020
job_id: int,
2121
task_id: int,
22-
tag_ids,
22+
tag_ids: list[int],
2323
clp_io_config_json: str,
2424
paths_to_compress_json: str,
2525
clp_metadata_db_connection_config,

components/job-orchestration/job_orchestration/executor/compress/compression_task.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def update_tags(
7171
table_prefix: str,
7272
dataset: Optional[str],
7373
archive_id: str,
74-
tag_ids: List[int],
74+
tag_ids: list[int],
7575
) -> None:
7676
db_cursor.executemany(
7777
f"""
@@ -87,10 +87,10 @@ def update_job_metadata_and_tags(
8787
job_id: int,
8888
table_prefix: str,
8989
dataset: Optional[str],
90-
tag_ids: List[int],
90+
tag_ids: list[int],
9191
archive_stats: Dict[str, Any],
9292
) -> None:
93-
if tag_ids is not None:
93+
if len(tag_ids) > 0:
9494
update_tags(db_cursor, table_prefix, dataset, archive_stats["id"], tag_ids)
9595
increment_compression_job_metadata(
9696
db_cursor,
@@ -312,7 +312,7 @@ def run_clp(
312312
logs_dir: pathlib.Path,
313313
job_id: int,
314314
task_id: int,
315-
tag_ids,
315+
tag_ids: list[int],
316316
paths_to_compress: PathsToCompress,
317317
sql_adapter: SQL_Adapter,
318318
clp_metadata_db_connection_config,
@@ -522,7 +522,7 @@ def run_clp(
522522
def compression_entry_point(
523523
job_id: int,
524524
task_id: int,
525-
tag_ids,
525+
tag_ids: list[int],
526526
clp_io_config_json: str,
527527
paths_to_compress_json: str,
528528
clp_metadata_db_connection_config: Dict[str, Any],

components/job-orchestration/job_orchestration/scheduler/compress/compression_scheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def search_and_schedule_new_tasks(
342342
)
343343
db_conn.commit()
344344

345-
tag_ids = None
345+
tag_ids = []
346346
if clp_io_config.output.tags:
347347
tags_table_name = get_tags_table_name(table_prefix, dataset)
348348
db_cursor.executemany(

0 commit comments

Comments
 (0)