Skip to content

Adopt shared ccbr_tools pipeline logging library in aspen wrapper (Phase B) #143

Description

@kopardev

Summary

Follow-up to #119 (Phase A: port CARLISLE's progress monitor +
enriched pipeline.status.json fields into aspen). Once that lands and the
ported implementation is stable, replace ASPEN's locally-duplicated logging/
state-marker bash functions with a shared library sourced from ccbr_tools,
so ASPEN and CARLISLE stop maintaining two independent copies of the same
code.

Tracked centrally in CCBR/Tools#230 (adds scripts/ccbr_pipeline_logging.sh
to ccbr_tools, installed onto PATH via module load ccbrpipeliner).

Proposed work (ASPEN side)

  1. Once Add shared pipeline logging/state-marker bash library for ASPEN/CARLISLE Tools#230 publishes ccbr_pipeline_logging.sh, replace the
    inline definitions of log_info/log_step/log_ok/log_warn/log_error/
    log_next/log_divider, json_escape, print_versions,
    write_pipeline_state_marker, run_jobby_best_effort, and
    _progress_monitor in aspen with a sourcing shim:
    command -v ccbr_pipeline_logging.sh >/dev/null 2>&1 || module load ccbrpipeliner >/dev/null 2>&1 || true
    source "$(command -v ccbr_pipeline_logging.sh)"
    
    mirroring the existing run_jobby_best_effort module-load-if-missing
    fallback pattern already used in aspen.
  2. Set ASPEN-specific env vars (PIPELINE_NAME=ASPEN, snakemake log path
    ${WORKDIR}/snakemake.log — note ASPEN keeps this at the workdir root, NOT
    under a logs/ subfolder like CARLISLE) before sourcing.
  3. Add a syncscripts/rescript runmode to aspen's main() case statement
    using the new shared helper from Add shared pipeline logging/state-marker bash library for ASPEN/CARLISLE Tools#230, to re-sync
    workflow/scripts into an existing workdir without a full reset.
  4. Prerequisite: extend ASPEN's check_essential_files() to also verify
    ESSENTIAL_FOLDERS (currently only checks config.yaml/samples.tsv/
    cluster.json/tools.yaml, unlike CARLISLE's version which checks both
    ESSENTIAL_FILES and ESSENTIAL_FOLDERS) — needed so syncscripts can
    safely assume the scripts/ folder exists in WORKDIR.
  5. Verify end-to-end on ASPEN's .test/ dataset: no behavioral/log-format
    regressions vs. the pre-refactor wrapper.

Related

⚡ Generated using AI ⚡

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions