Filed with the Feature request template's structure.
The problem
A scheduled setup that wants both a log and a dashboard runs two commands, and the second re-reads the CSV the first has just written. contrail passport is a separate pass over the output of contrail sync.
What you would like to happen
contrail sync --passport: a flag that calls the same renderer after a successful save, so a render failure can never cost a figure already fetched. The exit status should still reflect the sync, and a failed render should warn rather than fail the run.
Nothing in the config file needs to change. passport.output_path and PASSPORT_OUTPUT already resolve independently of how the renderer is invoked.
Alternatives you have considered
Making Passport a third output of the sync pipeline, or a storage role. This was considered while restructuring the config file in #44 and deliberately rejected. Recording why, because the question will come back:
- It would put a renderer on the pricing critical path.
sync.yml sets timeout-minutes: 60 with a comment explaining that a sync killed mid-run commits nothing, so every figure already fetched is lost. A template render between pricing and commit is a new way to lose figures for a reason unrelated to flights.
- It is the only candidate output that consumes nothing the pipeline fetched. Its input is the log sync already wrote, which is exactly what lets it work offline.
- The committed and gitignored boundary is legible right now precisely because the commands differ.
docs/contrail-gh.md requires the dashboard to stay out of sync.yml's git add line while the CSV and the raw log are committed every run. Merging the commands invites that mistake.
Leaving it as two commands, which is the status quo and costs one extra line in a workflow.
Anything else
Passport is a view, not state. The flight log and the raw log are kept because TIM will not price a flight once it has departed, so a stored row is the only copy of a figure that can ever exist. Passport is rebuilt from the CSV on demand, needs no API key, no feed and no network, and carries no type in the config file because there is no registry behind it. The flag shape above is the only one that preserves that distinction.
Filed with the Feature request template's structure.
The problem
A scheduled setup that wants both a log and a dashboard runs two commands, and the second re-reads the CSV the first has just written.
contrail passportis a separate pass over the output ofcontrail sync.What you would like to happen
contrail sync --passport: a flag that calls the same renderer after a successful save, so a render failure can never cost a figure already fetched. The exit status should still reflect the sync, and a failed render should warn rather than fail the run.Nothing in the config file needs to change.
passport.output_pathandPASSPORT_OUTPUTalready resolve independently of how the renderer is invoked.Alternatives you have considered
Making Passport a third output of the sync pipeline, or a storage role. This was considered while restructuring the config file in #44 and deliberately rejected. Recording why, because the question will come back:
sync.ymlsetstimeout-minutes: 60with a comment explaining that a sync killed mid-run commits nothing, so every figure already fetched is lost. A template render between pricing and commit is a new way to lose figures for a reason unrelated to flights.docs/contrail-gh.mdrequires the dashboard to stay out ofsync.yml'sgit addline while the CSV and the raw log are committed every run. Merging the commands invites that mistake.Leaving it as two commands, which is the status quo and costs one extra line in a workflow.
Anything else
Passport is a view, not state. The flight log and the raw log are kept because TIM will not price a flight once it has departed, so a stored row is the only copy of a figure that can ever exist. Passport is rebuilt from the CSV on demand, needs no API key, no feed and no network, and carries no
typein the config file because there is no registry behind it. The flag shape above is the only one that preserves that distinction.