Commit f4ad5532 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

feat(dag): 新增 MSC L1 QC0 DAG 配置并统一任务命令格式

parent 905fcf73
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -14,17 +14,13 @@ match:
  obs_type: ["BIAS", "DARK", "FLAT", "BKG", "LASER"]

# 默认输入参数(JSON 字符串;DAG 的输入统一从该字符串解析)
default_params_input: '{"dag_id":"csst-cpic-l1-qc0","dag_run_id":"csst-cpic-l1-qc0-inttest","dataset":"test-dataset","instrument":"CPIC","obs_type":"SCI","obs_group":"G1","obs_id":"123456","detector":"01","batch_id":"inttest", "docker_images":{"csst-cpic-l1-qc0":"latest"}}'
default_params_input: '{"dag_id":"csst-cpic-l1-qc0","dag_run":"csst-cpic-l1-qc0-inttest","dataset":"test-dataset","instrument":"CPIC","obs_type":"SCI","obs_group":"G1","obs_id":"123456","detector":"01","batch_id":"inttest", "docker_images":{"csst-cpic-l1-qc0":"latest"}}'

# 日志后处理任务(可选)
log_tasks:
  - task_id: "capture_logs"
    bash_command: "echo '=== Pipeline Log Content ===' && cat {BASE_OUTPUT_DIR}/pipeline.log || echo 'Log file not found'"

# 容器任务定义(按 dependencies 串联)
tasks:
  - name: QC0
    image: csst-cpic-l1-qc0
    command: "run {{ params.input }}"
    command: ["run", "{{ params.input }}"]
    retries: 1
    retry_delay_minutes: 5
+2 −8
Original line number Diff line number Diff line
@@ -15,19 +15,13 @@ match:
  detector_group: "EFFECTIVE"

# 默认输入参数(JSON 字符串;DAG 的输入统一从该字符串解析)
default_params_input: '{"dag_id":"csst-cpic-l1","dag_run_id":"csst-cpic-l1-inttest","dataset":"test-dataset","instrument":"CPIC","obs_type":"SCI","obs_group":"G1","obs_id":"123456","detector":"01","batch_id":"inttest", "docker_images":{"csst-cpic-l1":"latest"}}'
default_params_input: '{"dag_id":"csst-cpic-l1","dag_run":"csst-cpic-l1-inttest","dataset":"test-dataset","instrument":"CPIC","obs_type":"SCI","obs_group":"G1","obs_id":"123456","detector":"01","batch_id":"inttest", "docker_images":{"csst-cpic-l1":"latest"}}'

# 日志后处理任务(可选)
log_tasks:
  - task_id: "capture_logs"
    bash_command: "echo '=== Pipeline Log Content ===' > {BASE_OUTPUT_DIR}/combined.log && find {BASE_OUTPUT_DIR} -name 'pipeline.log' -exec echo '=== Log from {} ===' >> {BASE_OUTPUT_DIR}/combined.log \\; -exec cat {} >> {BASE_OUTPUT_DIR}/combined.log \\;"
  - task_id: "display_combined_logs"
    bash_command: "cat {BASE_OUTPUT_DIR}/combined.log"

# 容器任务定义(按 dependencies 串联)
tasks:
  - name: CPIC
    image: csst-cpic-l1
    command: "run {{ params.input }}"
    command: ["run", "{{ params.input }}"]
    retries: 1
    retry_delay_minutes: 5
+2 −8
Original line number Diff line number Diff line
@@ -14,18 +14,12 @@ match:
  obs_type: ["WIDE", "DEEP", "CALF"]

# 默认输入参数
default_params_input: '{"dag_id":"csst-echo","dag_run_id":"csst-echo-inttest","dataset":"test-msc-c9-25sqdeg-v3","instrument":"MSC","obs_type":"WIDE","obs_group":"W5","obs_id":"10100131914","detector":"09","batch_id":"inttest", "docker_images":{"csst-echo":"latest"}}'
default_params_input: '{"dag_id":"csst-echo","dag_run":"csst-echo-inttest","dataset":"test-msc-c9-25sqdeg-v3","instrument":"MSC","obs_type":"WIDE","obs_group":"W5","obs_id":"10100131914","detector":"09","batch_id":"inttest", "docker_images":{"csst-echo":"latest"}}'

# 日志后处理任务(可选)
log_tasks:
  - task_id: "concatenate_logs"
    bash_command: "echo '=== Concatenated Pipeline Logs ===' > {BASE_OUTPUT_DIR}/combined.log && find {BASE_OUTPUT_DIR} -name 'pipeline.log' -exec echo '=== Log from {} ===' >> {BASE_OUTPUT_DIR}/combined.log \\; -exec cat {} >> {BASE_OUTPUT_DIR}/combined.log \\;"
  - task_id: "display_combined_logs"
    bash_command: "cat {BASE_OUTPUT_DIR}/combined.log"

# 容器任务定义
tasks:
  - name: ECHO
    image: csst-echo
    command: "run {{ params.input }}"
    command: ["run", "{{ params.input }}"]
    retries: 1
+3 −9
Original line number Diff line number Diff line
@@ -15,25 +15,19 @@ match:
  detector_group: "EFFECTIVE"

# 默认输入参数(JSON 字符串;DAG 的输入统一从该字符串解析)
default_params_input: '{"dag_id":"csst-hstdm-l1","dag_run_id":"csst-hstdm-l1-inttest","dataset":"test-dataset","instrument":"HSTDM","obs_type":"STARE","obs_group":"G1","obs_id":"123456","detector":"01","batch_id":"inttest", "docker_images":{"csst-hstdm-l1":"latest", "csst-hstdm-l2":"latest"}}'
default_params_input: '{"dag_id":"csst-hstdm-l1","dag_run":"csst-hstdm-l1-inttest","dataset":"test-dataset","instrument":"HSTDM","obs_type":"STARE","obs_group":"G1","obs_id":"123456","detector":"01","batch_id":"inttest", "docker_images":{"csst-hstdm-l1":"latest", "csst-hstdm-l2":"latest"}}'

# 日志后处理任务(可选)
log_tasks:
  - task_id: "capture_logs"
    bash_command: "echo '=== Pipeline Log Content ===' > {BASE_OUTPUT_DIR}/combined.log && find {BASE_OUTPUT_DIR} -name 'pipeline.log' -exec echo '=== Log from {} ===' >> {BASE_OUTPUT_DIR}/combined.log \\; -exec cat {} >> {BASE_OUTPUT_DIR}/combined.log \\;"
  - task_id: "display_combined_logs"
    bash_command: "cat {BASE_OUTPUT_DIR}/combined.log"

# 容器任务定义(按 dependencies 串联)
tasks:
  - name: L1
    image: csst-hstdm-l1
    command: "run {{ params.input }}"
    command: ["run", "{{ params.input }}"]
    retries: 1
    retry_delay_minutes: 5

  - name: L2
    image: csst-hstdm-l2
    command: "run {{ params.input }}"
    command: ["run", "{{ params.input }}"]
    dependencies: [L1]
    retries: 1
+2 −8
Original line number Diff line number Diff line
@@ -15,19 +15,13 @@ match:
  detector_group: "EFFECTIVE"

# 默认输入参数(JSON 字符串;DAG 的输入统一从该字符串解析)
default_params_input: '{"dag_id":"csst-ifs-l1","dag_run_id":"csst-ifs-l1-inttest","dataset":"test-dataset","instrument":"IFS","obs_type":"SCI","obs_group":"G1","obs_id":"123456","detector":"01","batch_id":"inttest", "docker_images":{"csst-ifs-l1":"latest"}}'
default_params_input: '{"dag_id":"csst-ifs-l1","dag_run":"csst-ifs-l1-inttest","dataset":"test-dataset","instrument":"IFS","obs_type":"SCI","obs_group":"G1","obs_id":"123456","detector":"01","batch_id":"inttest", "docker_images":{"csst-ifs-l1":"latest"}}'

# 日志后处理任务(可选)
log_tasks:
  - task_id: "capture_logs"
    bash_command: "echo '=== Pipeline Log Content ===' > {BASE_OUTPUT_DIR}/combined.log && find {BASE_OUTPUT_DIR} -name 'pipeline.log' -exec echo '=== Log from {} ===' >> {BASE_OUTPUT_DIR}/combined.log \\; -exec cat {} >> {BASE_OUTPUT_DIR}/combined.log \\;"
  - task_id: "display_combined_logs"
    bash_command: "cat {BASE_OUTPUT_DIR}/combined.log"

# 容器任务定义(按 dependencies 串联)
tasks:
  - name: L1
    image: csst-ifs-l1
    command: "run {{ params.input }}"
    command: ["run", "{{ params.input }}"]
    retries: 1
    retry_delay_minutes: 5
Loading