proceed.model.StepResult¶
- class proceed.model.StepResult(name=None, image_id=None, exit_code=None, log_file=None, timing=None, progress_done_file=None, files_done=<factory>, files_in=<factory>, files_out=<factory>, files_summary=<factory>, skipped=False)¶
Records what happened when a
Stepran.- Parameters:
name (str)
image_id (str)
exit_code (int)
log_file (str)
timing (Timing)
progress_done_file (str)
files_done (dict[str, dict[str, str]])
files_in (dict[str, dict[str, str]])
files_out (dict[str, dict[str, str]])
files_summary (dict[str, dict[str, str]])
skipped (bool)
- image_id: str = None¶
The unique id of the
Step.imagethat was used.This
image_idis always a unique id (like theIMAGE IDoutput ofdocker images), even if the step’sStep.imagewas given as a human-readable tag. This avoids ambiguitiy from mutable tags like:latest.
- exit_code: int = None¶
The exit code / status code of the step’s container process.
Exit code
0is interpreted as success, nonzero as failure.
- log_file: str = None¶
The host path to the log file with step console output (stdout and stderr).
- timing: Timing = None¶
Start datetime, finish datetime, and duration for the step’s container process.
- progress_done_file: str = None¶
File that matches the
Step<progress_file>.done.When
progress_done_fileis found theStepis considered to be already complete before running, andskippedshould beTrue.See
Step.progress_file.
- files_done: dict[str, dict[str, str]]¶
Files that matched the
Step.match_donepattern.This is a key-value mapping from host
Step.volumespaths to matched files. The keys are strings (host volume paths). The values are nested key-value mappings, where the keys are matched file paths within a volume and the values are content hash digests of the matched files.step_results: - name: files done example files_done: /host/volume: {done_file.txt: 'sha256:5f386141...'} skipped: true
When
files_doneis nonempty theStepis considered to be already complete before running, andskippedshould beTrue.
- files_in: dict[str, dict[str, str]]¶
Files that matched the
Step.match_inpattern.This is a key-value mapping from host
Step.volumespaths to matched files. The keys are strings (host volume paths). The values are nested key-value mappings, where the keys are matched file paths within a volume and the values are content hash digests of the matched files.step_results: - name: files in example files_in: /host/volume/a: {first_match.txt: 'sha256:93d4e5c7...', second_match.txt: 'sha256:d1b54ec5...'} /host/volume/b: {third_match.txt: 'sha256:a4619a89...'}
Unlike
files_done,files_indoes not affect step execution.files_inis intended to support auditing for reproducibility and comparisons to files used in other steps or pipeline executions.
- files_out: dict[str, dict[str, str]]¶
Files that matched the
Step.match_outpattern.This is a key-value mapping from host
Step.volumespaths to matched files. The keys are strings (host volume paths). The values are nested key-value mappings, where the keys are matched file paths within a volume and the values are content hash digests of the matched files.step_results: - name: files out example files_out: /host/volume/a: {first_match.txt: 'sha256:93d4e5c7...', second_match.txt: 'sha256:d1b54ec5...'} /host/volume/b: {third_match.txt: 'sha256:a4619a89...'}
Unlike
files_done,files_outdoes not affect step execution.files_outis intended to support auditing for reproducibility and comparisons to files used in other steps or pipeline executions.
- files_summary: dict[str, dict[str, str]]¶
Files that matched the
Step.match_summarypattern, to include when summarizing results.This is a key-value mapping from host
Step.volumespaths to matched files. The keys are strings (host volume paths). The values are nested key-value mappings, where the keys are matched file paths within a volume and the values are content hash digests of the matched files.step_results: - name: files summary example files_summary: /host/volume/a: {first_match.txt: 'sha256:93d4e5c7...', second_match.txt: 'sha256:d1b54ec5...'} /host/volume/b: {third_match.txt: 'sha256:a4619a89...'}
Unlike
files_done,files_summarydoes not affect step execution.files_summaryis intended to enrich pipeline execution summaries with custom columns.When creating a pipeline execution summary (as with
proceed summarize ...) each file fromfiles_summarywill be parsed for one or more key-value pairs. Any keys found will be added as columns to the summery document. Values found will be added in corresponding columns and rows for the the same step. The parsing works as follows:YAML Matching YAML files will be parsed for top-level key-value mappings. Keys and values will be taken from within the YAML document.
Other Other matching files will be teated as plaintext. The file name will be taken as one key, and the file text content be taken as the corresponding value.
- skipped: bool = False¶
Whether a step was skipped (
True) or actually executed (False).step_results: - name: step skipped example skipped: true files_done: /host/volume: {done_file.txt: 'sha256:5f386141...'}
When
files_doneis nonempty theStepis considered to be already complete before running, andskippedshould beTrue.