Skip to content

Read the task commit from task_info.yaml - #943

Merged
rcannood merged 2 commits into
mainfrom
fix/task-info-commit
Aug 13, 2026
Merged

Read the task commit from task_info.yaml#943
rcannood merged 2 commits into
mainfrom
fix/task-info-commit

Conversation

@rcannood

@rcannood rcannood commented Jul 30, 2026

Copy link
Copy Markdown
Member

Describe your changes

get_task_info hardcoded the commit, so every task_info.json we have ever
published carries "commit": null:

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

It now reads the field:

commit = jsonlite::unbox(task_info_yaml$commit %||% NA_character_),

The %||% is there for the null rather than as a placeholder -- unbox(NULL)
serialises to {}, not null, so dropping it entirely would change the shape of
the output for every task that does not write the field yet:

jsonlite::toJSON(list(commit = jsonlite::unbox(list()$commit)))
#> {"commit":{}}
jsonlite::toJSON(list(commit = jsonlite::unbox(list()$commit %||% NA_character_)))
#> {"commit":null}

Issue ticket number and link

Closes #942

Checklist before requesting a review

  • I have performed a self-review of my code

  • Check the correct box. Does this PR contain:

    • Breaking changes
    • New functionality
    • Major changes
    • Minor changes
    • Bug fixes
    • Documentation
  • Proposed changes are described in the CHANGELOG.md

  • CI Tests succeed and look good!

run_and_check_output.py only turns an `example` into a cli argument for file
arguments, so `--timestamp` was never passed and the script stopped on the
missing timestamp. Set it through `info.test_default` instead.
@rcannood
rcannood merged commit 0ca5d0c into main Aug 13, 2026
2 checks passed
@rcannood
rcannood deleted the fix/task-info-commit branch August 13, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant