)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000040,"name":"kn","email":"klemens@posteo.de","username":"kn"},"change_message_id":"ad30613c40cc3fe7beed698070be3a7bd6e51b60","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"c4a3bf1f_501358dd","updated":"2021-05-24 20:03:15.000000000","message":"Enough nits picked, already looking fine as is *for starters*.","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"033ebbd10b9e5e8ba9953a1ba9d173f37503c976","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"1b0e435c_881457e8","updated":"2021-05-31 13:34:07.000000000","message":"@kn thanks for the very detailed review! Really appreciate it","commit_id":"cfd833221f72a3120501fb918da54e76fee4340e"}],"ops/deploy-whitby/default.nix":[{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"e888dda7750366c973c8910229dd4511f1551b7b","unresolved":true,"context_lines":[{"line_number":3,"context_line":"pkgs.stdenv.mkDerivation {"},{"line_number":4,"context_line":"  name \u003d \"deploy-whitby\";"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"  unpackPhase \u003d \":\";"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"  nativeBuildInputs \u003d with pkgs; ["},{"line_number":9,"context_line":"    makeWrapper"}],"source_content_type":"text/x-nix","patch_set":8,"id":"eb17f52c_36141b17","line":6,"range":{"start_line":6,"start_character":0,"end_line":6,"end_character":20},"updated":"2021-05-24 18:16:06.000000000","message":"maybe you could use the `phases` attribute or something to disable this instead","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"033ebbd10b9e5e8ba9953a1ba9d173f37503c976","unresolved":false,"context_lines":[{"line_number":3,"context_line":"pkgs.stdenv.mkDerivation {"},{"line_number":4,"context_line":"  name \u003d \"deploy-whitby\";"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"  unpackPhase \u003d \":\";"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"  nativeBuildInputs \u003d with pkgs; ["},{"line_number":9,"context_line":"    makeWrapper"}],"source_content_type":"text/x-nix","patch_set":8,"id":"a5a01956_e23c87e4","line":6,"range":{"start_line":6,"start_character":0,"end_line":6,"end_character":20},"in_reply_to":"eb17f52c_36141b17","updated":"2021-05-31 13:34:07.000000000","message":"Done","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"},{"author":{"_account_id":1000040,"name":"kn","email":"klemens@posteo.de","username":"kn"},"change_message_id":"ad30613c40cc3fe7beed698070be3a7bd6e51b60","unresolved":true,"context_lines":[{"line_number":16,"context_line":"        nix-diff"},{"line_number":17,"context_line":"        ansi2html"},{"line_number":18,"context_line":"        git"},{"line_number":19,"context_line":"      ]}"},{"line_number":20,"context_line":"  \u0027\u0027;"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"  installCheckInputs \u003d with pkgs; ["}],"source_content_type":"text/x-nix","patch_set":8,"id":"122c208c_1fdd0d19","line":19,"updated":"2021-05-24 20:03:15.000000000","message":"Two spaces too many, no?","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"033ebbd10b9e5e8ba9953a1ba9d173f37503c976","unresolved":false,"context_lines":[{"line_number":16,"context_line":"        nix-diff"},{"line_number":17,"context_line":"        ansi2html"},{"line_number":18,"context_line":"        git"},{"line_number":19,"context_line":"      ]}"},{"line_number":20,"context_line":"  \u0027\u0027;"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"  installCheckInputs \u003d with pkgs; ["}],"source_content_type":"text/x-nix","patch_set":8,"id":"ab552fd1_244d039e","line":19,"in_reply_to":"122c208c_1fdd0d19","updated":"2021-05-31 13:34:07.000000000","message":"Nope, this is matching the `lib.makeBinPath` argument","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"}],"ops/deploy-whitby/deploy-whitby.sh":[{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"1d0e3e60cddbafb250f2ab293ed5af33f05c1d58","unresolved":true,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/env bash"},{"line_number":2,"context_line":"set -eu"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"HTML_ROOT\u003d\"${HTML_ROOT:-/srv/www/deploy.tvl.fyi}\""},{"line_number":5,"context_line":"URL_BASE\u003d\"${URL_BASE:-https://deploy.tvl.fyi/diff}\""}],"source_content_type":"text/x-sh","patch_set":4,"id":"37640b8a_7b24dfaf","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":7},"updated":"2021-05-23 18:32:38.000000000","message":"-o pipefail","commit_id":"fad43c96fe57930767d2ea7b380d03f54997bd31"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"fd7c0356ab23b59c92e814fc9f224a3a555f771f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/env bash"},{"line_number":2,"context_line":"set -eu"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"HTML_ROOT\u003d\"${HTML_ROOT:-/srv/www/deploy.tvl.fyi}\""},{"line_number":5,"context_line":"URL_BASE\u003d\"${URL_BASE:-https://deploy.tvl.fyi/diff}\""}],"source_content_type":"text/x-sh","patch_set":4,"id":"c2b5e791_b7f54a10","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":7},"in_reply_to":"37640b8a_7b24dfaf","updated":"2021-05-23 20:11:45.000000000","message":"Done","commit_id":"fad43c96fe57930767d2ea7b380d03f54997bd31"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"cc199e54de38606a4af9cf4b609cfda43843686f","unresolved":true,"context_lines":[{"line_number":6,"context_line":"IRCCAT_PORT\u003d\"${IRCCAT_PORT:-4722}\""},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"depot_git() {"},{"line_number":9,"context_line":"    git -C /depot \"$@\""},{"line_number":10,"context_line":"}"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"drv_hash() {"}],"source_content_type":"text/x-sh","patch_set":4,"id":"b84acfaa_2239e005","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":22},"updated":"2021-05-23 18:31:09.000000000","message":"I think we should instead check out/clone this fresh, but use `--references /depot` instead which will avoid downloading objects we already have and avoid issues with the strange way /depot is set up.","commit_id":"fad43c96fe57930767d2ea7b380d03f54997bd31"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"fd7c0356ab23b59c92e814fc9f224a3a555f771f","unresolved":false,"context_lines":[{"line_number":6,"context_line":"IRCCAT_PORT\u003d\"${IRCCAT_PORT:-4722}\""},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"depot_git() {"},{"line_number":9,"context_line":"    git -C /depot \"$@\""},{"line_number":10,"context_line":"}"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"drv_hash() {"}],"source_content_type":"text/x-sh","patch_set":4,"id":"1ff48c15_a59dc12a","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":22},"in_reply_to":"b84acfaa_2239e005","updated":"2021-05-23 20:11:45.000000000","message":"Done","commit_id":"fad43c96fe57930767d2ea7b380d03f54997bd31"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"cc199e54de38606a4af9cf4b609cfda43843686f","unresolved":true,"context_lines":[{"line_number":16,"context_line":"new_rev\u003d\"$1\""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"if [ -z \"$new_rev\" ]; then"},{"line_number":19,"context_line":"    echo \"Usage: $0 \u003cnew_rev\u003e\""},{"line_number":20,"context_line":"    exit 1"},{"line_number":21,"context_line":"fi"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-sh","patch_set":4,"id":"3e11a428_34f5b46b","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":30},"updated":"2021-05-23 18:31:09.000000000","message":"this goes to stderr","commit_id":"fad43c96fe57930767d2ea7b380d03f54997bd31"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"fd7c0356ab23b59c92e814fc9f224a3a555f771f","unresolved":false,"context_lines":[{"line_number":16,"context_line":"new_rev\u003d\"$1\""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"if [ -z \"$new_rev\" ]; then"},{"line_number":19,"context_line":"    echo \"Usage: $0 \u003cnew_rev\u003e\""},{"line_number":20,"context_line":"    exit 1"},{"line_number":21,"context_line":"fi"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-sh","patch_set":4,"id":"dbfd585d_4b89d6e5","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":30},"in_reply_to":"3e11a428_34f5b46b","updated":"2021-05-23 20:11:45.000000000","message":"Done","commit_id":"fad43c96fe57930767d2ea7b380d03f54997bd31"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"cc199e54de38606a4af9cf4b609cfda43843686f","unresolved":true,"context_lines":[{"line_number":26,"context_line":"fi"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"cleanup() {"},{"line_number":29,"context_line":"    rm -rf /tmp/deploy.worktree"},{"line_number":30,"context_line":"    depot_git worktree prune"},{"line_number":31,"context_line":"}"},{"line_number":32,"context_line":"trap cleanup EXIT"}],"source_content_type":"text/x-sh","patch_set":4,"id":"4e401ca1_ca4a1154","line":29,"range":{"start_line":29,"start_character":16,"end_line":29,"end_character":31},"updated":"2021-05-23 18:31:09.000000000","message":"I feel like we should use temporary folders here to avoid potential strange state bugs (just mktmp -d)","commit_id":"fad43c96fe57930767d2ea7b380d03f54997bd31"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"fd7c0356ab23b59c92e814fc9f224a3a555f771f","unresolved":false,"context_lines":[{"line_number":26,"context_line":"fi"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"cleanup() {"},{"line_number":29,"context_line":"    rm -rf /tmp/deploy.worktree"},{"line_number":30,"context_line":"    depot_git worktree prune"},{"line_number":31,"context_line":"}"},{"line_number":32,"context_line":"trap cleanup EXIT"}],"source_content_type":"text/x-sh","patch_set":4,"id":"f55eef01_149b06c5","line":29,"range":{"start_line":29,"start_character":16,"end_line":29,"end_character":31},"in_reply_to":"4e401ca1_ca4a1154","updated":"2021-05-23 20:11:45.000000000","message":"I specifically wanted to use a constant directory here as a lock to prevent two instances of this script at the same time","commit_id":"fad43c96fe57930767d2ea7b380d03f54997bd31"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"a48d65ca316ff9305f87ca6bc0a91ea0067df710","unresolved":true,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"diff_filename\u003d\"$(drv_hash \"$current\")..$(drv_hash \"$new\")\""},{"line_number":40,"context_line":"nix-diff \"$current\" \"$new\" --color always \\"},{"line_number":41,"context_line":"    | ansi2html \\"},{"line_number":42,"context_line":"    \u003e \"$HTML_ROOT/diff/$diff_filename\""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"echo \"#tvl Whitby is being deployed! System diff: $URL_BASE/$diff_filename\" \\"}],"source_content_type":"text/x-sh","patch_set":4,"id":"f63af5d0_ee2400dd","line":41,"range":{"start_line":41,"start_character":6,"end_line":41,"end_character":15},"updated":"2021-05-23 18:32:07.000000000","message":"not for this CL, but I\u0027d like to add CSS or something to this to get it to look the same way as our other pages","commit_id":"fad43c96fe57930767d2ea7b380d03f54997bd31"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"fd7c0356ab23b59c92e814fc9f224a3a555f771f","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"diff_filename\u003d\"$(drv_hash \"$current\")..$(drv_hash \"$new\")\""},{"line_number":40,"context_line":"nix-diff \"$current\" \"$new\" --color always \\"},{"line_number":41,"context_line":"    | ansi2html \\"},{"line_number":42,"context_line":"    \u003e \"$HTML_ROOT/diff/$diff_filename\""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"echo \"#tvl Whitby is being deployed! System diff: $URL_BASE/$diff_filename\" \\"}],"source_content_type":"text/x-sh","patch_set":4,"id":"4779099a_f73eb74d","line":41,"range":{"start_line":41,"start_character":6,"end_line":41,"end_character":15},"in_reply_to":"f63af5d0_ee2400dd","updated":"2021-05-23 20:11:45.000000000","message":"Ack","commit_id":"fad43c96fe57930767d2ea7b380d03f54997bd31"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"cc199e54de38606a4af9cf4b609cfda43843686f","unresolved":true,"context_lines":[{"line_number":41,"context_line":"    | ansi2html \\"},{"line_number":42,"context_line":"    \u003e \"$HTML_ROOT/diff/$diff_filename\""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"echo \"#tvl Whitby is being deployed! System diff: $URL_BASE/$diff_filename\" \\"},{"line_number":45,"context_line":"    | nc localhost \"$IRCCAT_PORT\""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# TODO(grfn): Actually do the deploy"}],"source_content_type":"text/x-sh","patch_set":4,"id":"34bdf9c1_05c4e878","line":44,"range":{"start_line":44,"start_character":11,"end_line":44,"end_character":12},"updated":"2021-05-23 18:31:09.000000000","message":"w","commit_id":"fad43c96fe57930767d2ea7b380d03f54997bd31"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"fd7c0356ab23b59c92e814fc9f224a3a555f771f","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    | ansi2html \\"},{"line_number":42,"context_line":"    \u003e \"$HTML_ROOT/diff/$diff_filename\""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"echo \"#tvl Whitby is being deployed! System diff: $URL_BASE/$diff_filename\" \\"},{"line_number":45,"context_line":"    | nc localhost \"$IRCCAT_PORT\""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# TODO(grfn): Actually do the deploy"}],"source_content_type":"text/x-sh","patch_set":4,"id":"76472702_36fd3a98","line":44,"range":{"start_line":44,"start_character":11,"end_line":44,"end_character":12},"in_reply_to":"34bdf9c1_05c4e878","updated":"2021-05-23 20:11:45.000000000","message":"Done","commit_id":"fad43c96fe57930767d2ea7b380d03f54997bd31"},{"author":{"_account_id":1000040,"name":"kn","email":"klemens@posteo.de","username":"kn"},"change_message_id":"ad30613c40cc3fe7beed698070be3a7bd6e51b60","unresolved":true,"context_lines":[{"line_number":19,"context_line":"if [ -d \"/tmp/deploy.worktree\" ]; then"},{"line_number":20,"context_line":"    \u003e\u00262 echo \"/tmp/deploy.worktree exists - exiting in case another deploy is currently running\""},{"line_number":21,"context_line":"    exit 1"},{"line_number":22,"context_line":"fi"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"cleanup() {"},{"line_number":25,"context_line":"    rm -rf /tmp/deploy.worktree"}],"source_content_type":"text/x-sh","patch_set":8,"id":"3a319b3f_cda9d7f6","line":22,"updated":"2021-05-24 20:03:15.000000000","message":"Using the directory as lock is inherently racy and I think the callee (your systemd-timer unit) should deal with this instead of the script itself.\n\nFine for now I guess but once it actually deploys this ought to change.","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"033ebbd10b9e5e8ba9953a1ba9d173f37503c976","unresolved":false,"context_lines":[{"line_number":19,"context_line":"if [ -d \"/tmp/deploy.worktree\" ]; then"},{"line_number":20,"context_line":"    \u003e\u00262 echo \"/tmp/deploy.worktree exists - exiting in case another deploy is currently running\""},{"line_number":21,"context_line":"    exit 1"},{"line_number":22,"context_line":"fi"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"cleanup() {"},{"line_number":25,"context_line":"    rm -rf /tmp/deploy.worktree"}],"source_content_type":"text/x-sh","patch_set":8,"id":"121bab25_5a08656f","line":22,"in_reply_to":"3a319b3f_cda9d7f6","updated":"2021-05-31 13:34:07.000000000","message":"Ack","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"},{"author":{"_account_id":1000040,"name":"kn","email":"klemens@posteo.de","username":"kn"},"change_message_id":"ad30613c40cc3fe7beed698070be3a7bd6e51b60","unresolved":true,"context_lines":[{"line_number":22,"context_line":"fi"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"cleanup() {"},{"line_number":25,"context_line":"    rm -rf /tmp/deploy.worktree"},{"line_number":26,"context_line":"}"},{"line_number":27,"context_line":"trap cleanup EXIT"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-sh","patch_set":8,"id":"39f3cfbb_93635235","line":25,"updated":"2021-05-24 20:03:15.000000000","message":"Use a variable for this path as `-f` will silently fail on nonexistent files;\nthe shell\u0027s `nounset` option however will fail if besaid variable is unset.","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"033ebbd10b9e5e8ba9953a1ba9d173f37503c976","unresolved":false,"context_lines":[{"line_number":22,"context_line":"fi"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"cleanup() {"},{"line_number":25,"context_line":"    rm -rf /tmp/deploy.worktree"},{"line_number":26,"context_line":"}"},{"line_number":27,"context_line":"trap cleanup EXIT"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-sh","patch_set":8,"id":"17bb8d20_fdae606d","line":25,"in_reply_to":"39f3cfbb_93635235","updated":"2021-05-31 13:34:07.000000000","message":"Done","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"},{"author":{"_account_id":1000040,"name":"kn","email":"klemens@posteo.de","username":"kn"},"change_message_id":"ad30613c40cc3fe7beed698070be3a7bd6e51b60","unresolved":true,"context_lines":[{"line_number":27,"context_line":"trap cleanup EXIT"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"git clone https://cl.tvl.fyi/depot /tmp/deploy.worktree --reference /depot"},{"line_number":30,"context_line":"git -C /tmp/deploy.worktree checkout \"$new_rev\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"current\u003d$(nix show-derivation /run/current-system | jq -r \u0027keys | .[0]\u0027)"},{"line_number":33,"context_line":"new\u003d$(nix-instantiate -A ops.nixos.whitbySystem /tmp/deploy.worktree)"}],"source_content_type":"text/x-sh","patch_set":8,"id":"74a20583_58bbdb7c","line":30,"updated":"2021-05-24 20:03:15.000000000","message":"git-clone(1) has `-b|--branch \u003cname\u003e`.","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"033ebbd10b9e5e8ba9953a1ba9d173f37503c976","unresolved":false,"context_lines":[{"line_number":27,"context_line":"trap cleanup EXIT"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"git clone https://cl.tvl.fyi/depot /tmp/deploy.worktree --reference /depot"},{"line_number":30,"context_line":"git -C /tmp/deploy.worktree checkout \"$new_rev\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"current\u003d$(nix show-derivation /run/current-system | jq -r \u0027keys | .[0]\u0027)"},{"line_number":33,"context_line":"new\u003d$(nix-instantiate -A ops.nixos.whitbySystem /tmp/deploy.worktree)"}],"source_content_type":"text/x-sh","patch_set":8,"id":"6f4e364c_bbc0c07c","line":30,"in_reply_to":"74a20583_58bbdb7c","updated":"2021-05-31 13:34:07.000000000","message":"This needs to support commit IDs, in addition to just branches","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"},{"author":{"_account_id":1000040,"name":"kn","email":"klemens@posteo.de","username":"kn"},"change_message_id":"ad30613c40cc3fe7beed698070be3a7bd6e51b60","unresolved":true,"context_lines":[{"line_number":35,"context_line":"diff_filename\u003d\"$(drv_hash \"$current\")..$(drv_hash \"$new\")\""},{"line_number":36,"context_line":"nix-diff \"$current\" \"$new\" --color always \\"},{"line_number":37,"context_line":"    | ansi2html \\"},{"line_number":38,"context_line":"    \u003e \"$HTML_ROOT/diff/$diff_filename\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"echo \"#tvl whitby is being deployed! system diff: $URL_BASE/$diff_filename\" \\"},{"line_number":41,"context_line":"    | nc -N localhost \"$IRCCAT_PORT\""}],"source_content_type":"text/x-sh","patch_set":8,"id":"9dd57737_0b3d7f09","line":38,"updated":"2021-05-24 20:03:15.000000000","message":"The shell\u0027s `noclobber` option is a safe and sane way to protect against truncating existing files by means of redirection;  not that it should ever happen here, but your lock primitive is flawed already and `set -C` is basically always a good idea (I set it in all my interactive shells and therefore force myself to explicitly use `\u003e| ./file` for truncating existing data.","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"033ebbd10b9e5e8ba9953a1ba9d173f37503c976","unresolved":false,"context_lines":[{"line_number":35,"context_line":"diff_filename\u003d\"$(drv_hash \"$current\")..$(drv_hash \"$new\")\""},{"line_number":36,"context_line":"nix-diff \"$current\" \"$new\" --color always \\"},{"line_number":37,"context_line":"    | ansi2html \\"},{"line_number":38,"context_line":"    \u003e \"$HTML_ROOT/diff/$diff_filename\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"echo \"#tvl whitby is being deployed! system diff: $URL_BASE/$diff_filename\" \\"},{"line_number":41,"context_line":"    | nc -N localhost \"$IRCCAT_PORT\""}],"source_content_type":"text/x-sh","patch_set":8,"id":"3e9ef1f8_3025984d","line":38,"in_reply_to":"9dd57737_0b3d7f09","updated":"2021-05-31 13:34:07.000000000","message":"Done. Did end up using \u003e| here, as I do want to clobber this file.","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"},{"author":{"_account_id":1000040,"name":"kn","email":"klemens@posteo.de","username":"kn"},"change_message_id":"ad30613c40cc3fe7beed698070be3a7bd6e51b60","unresolved":true,"context_lines":[{"line_number":37,"context_line":"    | ansi2html \\"},{"line_number":38,"context_line":"    \u003e \"$HTML_ROOT/diff/$diff_filename\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"echo \"#tvl whitby is being deployed! system diff: $URL_BASE/$diff_filename\" \\"},{"line_number":41,"context_line":"    | nc -N localhost \"$IRCCAT_PORT\""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"# TODO(grfn): Actually do the deploy"}],"source_content_type":"text/x-sh","patch_set":8,"id":"536a184a_923bea3b","line":40,"updated":"2021-05-24 20:03:15.000000000","message":"`!` is special in bash\u0027s interactive mode (see bash(1)\u0027s HISTORY EXPANSION), i.e. omitting the trailing whitespace inside the double quotes would do try to execute `system` -- not an issue here (at this point), but pointing it out seems helpful nonetheless given that you plan on testing that script manually and such issues are annoying to fix after the fact.","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"033ebbd10b9e5e8ba9953a1ba9d173f37503c976","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    | ansi2html \\"},{"line_number":38,"context_line":"    \u003e \"$HTML_ROOT/diff/$diff_filename\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"echo \"#tvl whitby is being deployed! system diff: $URL_BASE/$diff_filename\" \\"},{"line_number":41,"context_line":"    | nc -N localhost \"$IRCCAT_PORT\""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"# TODO(grfn): Actually do the deploy"}],"source_content_type":"text/x-sh","patch_set":8,"id":"15315387_976214ae","line":40,"in_reply_to":"536a184a_923bea3b","updated":"2021-05-31 13:34:07.000000000","message":"Ack","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"},{"author":{"_account_id":1000040,"name":"kn","email":"klemens@posteo.de","username":"kn"},"change_message_id":"ad30613c40cc3fe7beed698070be3a7bd6e51b60","unresolved":true,"context_lines":[{"line_number":38,"context_line":"    \u003e \"$HTML_ROOT/diff/$diff_filename\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"echo \"#tvl whitby is being deployed! system diff: $URL_BASE/$diff_filename\" \\"},{"line_number":41,"context_line":"    | nc -N localhost \"$IRCCAT_PORT\""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"# TODO(grfn): Actually do the deploy"}],"source_content_type":"text/x-sh","patch_set":8,"id":"6ba91128_40c0cdec","line":41,"updated":"2021-05-24 20:03:15.000000000","message":"You probably want a connection timeout (`-w 5`) here such that nc(1) won\u0027t try to connect forever.","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"033ebbd10b9e5e8ba9953a1ba9d173f37503c976","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    \u003e \"$HTML_ROOT/diff/$diff_filename\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"echo \"#tvl whitby is being deployed! system diff: $URL_BASE/$diff_filename\" \\"},{"line_number":41,"context_line":"    | nc -N localhost \"$IRCCAT_PORT\""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"# TODO(grfn): Actually do the deploy"}],"source_content_type":"text/x-sh","patch_set":8,"id":"9fa0ffc5_2cbb1970","line":41,"in_reply_to":"6ba91128_40c0cdec","updated":"2021-05-31 13:34:07.000000000","message":"Done","commit_id":"52766f312b2506d8b74e0173ecd6edc895e4feb5"}]}
