Write the commit and timestamp into task_info.yaml - #18
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
task_info.yamlwas published as a verbatim copy of_viash.yaml:so it could only ever contain things known at build time, and nothing in a published
result pinned it to the run that produced it. Two fields were missing:
commit--task_info.jsonhas a field for it, but the closest_viash.yamlgets is
version: build_main, which is the revision rather than a commit, andbuild/mainmoves.timestamp-- required bycommon/schemas/results_v4/task_info.json. Nothingwas writing it, so
render_results_reporthas been guessing: it parses a date outof a
run_<date>results path, and falls back to the modification time oftask_info.yamlif the path does not have one.run_benchmarknow reads_viash.yaml, adds both, and writes that out instead:workflow.commitIdis null when Nextflow runs from a local checkout rather than arevision it resolved itself, so that field is only added when we actually know it,
rather than writing a placeholder. The timestamp is the launch time rather than the
completion time, because
workflow.completeis only known once the run is over, andthis closure runs before that -- it also lines up with the
run_<date>directory namethat the reporting side was inferring from anyway.
Checked against Nextflow 26.04 that
workflow.startis anOffsetDateTime, that.toInstant().truncatedTo(SECONDS).toString()gives2026-07-30T13:36:58Z, thatsnakeyaml quotes it so it stays a string rather than a YAML timestamp, and that
yaml::read_yaml()reads it back as a character -- so it passes ajv'sdate-timecheck. Comments in
_viash.yamldo not survive the parse/serialise round trip, whichseemed a fair trade for a file that only ever gets parsed.
Same change as openproblems-bio/task_spatial_simulators#33 and
openproblems-bio/task_spatial_simulators#34, sent here as promised in the first of
those. The reporting side reads the
commitfield as ofopenproblems-bio/openproblems#943; it already preferred the
timestampfromtask_info.yamlover its--timestampargument.Checklist before requesting a review
I have performed a self-review of my code
Check the correct box. Does this PR contain:
Proposed changes are described in the CHANGELOG.md
CI Tests succeed and look good!