Skip to content

get_task_info hardcodes commit to NA, so every task_info.json reports a null commit #942

Description

@rcannood

task_info.json always comes out with "commit": null, for every task, because
get_task_info hardcodes it:

commit = jsonlite::unbox(NA_character_), # TODO: Add when available in task_info.yaml

commit = jsonlite::unbox(NA_character_), # TODO: Add when available in task_info.yaml

From a report I rendered yesterday (task_spatial_simulators, run
run_2026-07-29_13-06-59):

{
  "name": "spatial_simulators",
  "commit": null,
  "label": "Spatial Simulators",
  ...
  "version": "build_main",

version is the revision (build_main), so as it stands there is nothing in the
published results that pins a task to the code that produced it. Methods and
datasets both already carry one:

# get_method_info/script.R
commit = jsonlite::unbox(.config$build_info$git_commit %||% "missing-sha"),

# get_dataset_info/script.R
commit = jsonlite::unbox(.dataset$dataset_commit %||% "missing-sha"),

Proposal

The TODO's precondition is easy to satisfy on the task side -- workflow.commitId
is available in run_benchmark, so the task can write the commit into
task_info.yaml alongside everything else it already copies out of _viash.yaml.
I have done that in task_spatial_simulators
(openproblems-bio/task_spatial_simulators#33) and am happy to send the same change
to task_template.

That leaves this side, which would become:

commit = jsonlite::unbox(task_info_yaml$commit %||% "missing-sha"),

matching what get_method_info does, so a task whose workflow predates the change
degrades to "missing-sha" rather than breaking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions