Skip to content

refactor: centralise all preflight checks into demux class initialisation #203

Description

@georgemarselis-nvi

Currently preflight checks are scattered across individual step modules. Each
step performs its own environment, credential, and dependency checks at runtime.

Move all preflight to core.py and the demux class:

  • all preflight checks run at demux.__init__() or a dedicated demux.preflight() method
  • each action (step) receives a fully validated demux object and can assume all
    preconditions are met
  • individual step modules expose lightweight helper functions that check only
    step-specific invariants against the already-validated demux state
  • no step should ever fail due to a missing environment variable, missing binary,
    or invalid config that could have been caught at startup

Benefits:

  • fail fast: bad config surfaces before any sequencing data is touched
  • cleaner step modules: steps do work, not environment checks
  • easier testing: preflight is one place to mock
  • daemon mode: preflight runs once at daemon start, not on every run

Scope:

  • demux/envsetup/check_running_environment.py
  • demux/envsetup/setup_environment.py
  • credential checks currently scattered in step07 and step08
  • binary path checks
  • SSH config policy validation

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions