From 174e409da6f275904c34875c64ca3440117ce61b Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Tue, 28 Apr 2026 07:21:17 +0000 Subject: [PATCH] github: drop nu flatten in needs-more-info timer The scheduled job has failed every night since 2026-04-13. Two prior fixes (race-condition guards and splitting the combined where predicate in #3200) did not address the actual cause: `flatten` collapses nested records in a list-of-records pipeline, so after `gh api ... | from json | flatten` the `label` and `user` columns no longer exist - their fields are lifted to the top level (with prefix only on naming collisions). `where label.name == ...` and `where user.type != "Bot"` then both reference a column that is not there. `gh api --paginate` already returns a single concatenated JSON array, so `from json` produces a list of records directly and no flattening is needed. Drop both `| flatten` calls. Verified locally with nu 0.108 against the events stream of issue #3178: without flatten, `where event == "labeled" | where label.name == "needs-more-info" | last` returns the labeled event with its `label` record intact. --- .github/workflows/needs-more-info-timer.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/needs-more-info-timer.yml b/.github/workflows/needs-more-info-timer.yml index de46c7b1..c85e7bd3 100644 --- a/.github/workflows/needs-more-info-timer.yml +++ b/.github/workflows/needs-more-info-timer.yml @@ -58,7 +58,7 @@ jobs: # Find when needs-more-info was last added let events = (gh api $"repos/($env.GH_REPO)/issues/($number)/events" - --paginate | from json | flatten) + --paginate | from json) let label_event = ($events | where event == "labeled" | where label.name == "needs-more-info" @@ -67,7 +67,7 @@ jobs: # Check for non-bot comments after the label was added let comments = (gh api $"repos/($env.GH_REPO)/issues/($number)/comments" - --paginate | from json | flatten) + --paginate | from json) let human_responses = ($comments | where user.type != "Bot" | where { ($in.created_at | into datetime) > $label_added_at })