Skip to content

Commit

Permalink
gitlab-runner: Fix marshalling of TOML datetimes
Browse files Browse the repository at this point in the history
As described in nixpkgs#356717, `gitlab-runner` now uses TOML date-time
values in its configuration (namely the `token_obtained_at` and
`token_expires_at` keys). As there is no JSON syntax for such values,
remarshal refuses to serialise them without the `--stringify` flag.
Thankfully, `gitlab-runner` seems to accept the stringified values
without any complaints, so we can side-step this issue readily.
  • Loading branch information
bgamari committed Feb 5, 2025
1 parent ec16cae commit 2c6bc65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/services/gitlab-runner.nix
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ let
done
# update global options
remarshal --if toml --of json ${configPath} \
remarshal --if toml --of json --stringify ${configPath} \
| jq -cM ${escapeShellArg (concatStringsSep " | " [
".check_interval = ${toJSON cfg.checkInterval}"
".concurrent = ${toJSON cfg.concurrent}"
Expand Down

0 comments on commit 2c6bc65

Please sign in to comment.