Skip to content

YAML Chains --replace and execution_log #734

@JBHighHair

Description

@JBHighHair

YAML Chains is a great way to facilitate homogeneous chain\task definitions across multiple instances using --replace
Restarting pg_timetable process with --replace every time will increment the chain_id and task_id for matching (unique) chain names.
This is correct and proper, but the issue is that the table timetable.execution_log references chain_ids and task_ids which are no longer present in tables timetable.chain and timetable.task
This makes reviewing historical records in the execution_log difficult because of the broken reference to chain_name and task_name

(I'm not too concerned about entries in the table execution_log for chains\tasks which users have intentionally removed\deleted.)

Some options for resolution are:

[1]
The --replace function could also be made to update the chain_id and task_id in the table timetable.execution_log with the newly "replaced" values.
The negative aspect of doing this is this will cause lots of updates to the table timetable.execution_log when --replace is run.

[2]
The more difficult method is for the --replace function to determine if the chain or task is actually different to the YAML definition and only recreate them if they are dissimilar.
The negative aspect here is that even if this is done the table timetable.execution_log will still reference old IDs for the chain\task which were replaced.

[3]
Add to the table timetable.execution_log columns for chain_name and task_name to record when the task runs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions