Skip to content

cmd/dist: runPending doesn't JSON-encode skips in -json mode #61557

Closed
@dmitshur

Description

@dmitshur

runPending needs to print valid JSON to w.out when dist is invoked in -json mode. It normally does this because it runs a go test -json command, except we missed that in the case it prints a skip message. This causes consumers of dist test -json output to encounter non-JSON in such cases, and making sense of that can be wasteful of human time.

The fix is fairly trivial, but the diff ended up a bit bigger than I'd like as a result of cleaning things up and writing down more of how work fields are used. So I'll split most of that into a separate CL for Go 1.22, and do a minimal safe fix for Go 1.21.

CC @golang/release, @aclements.

Activity

added
NeedsFixThe path to resolution is known, but the work has not been done.
on Jul 24, 2023
added this to the Go1.21 milestone on Jul 24, 2023
self-assigned this
on Jul 24, 2023
moved this to In Progress in Go Releaseon Jul 24, 2023
gopherbot

gopherbot commented on Jul 24, 2023

@gopherbot
Contributor

Change https://go.dev/cl/512719 mentions this issue: cmd/dist: handle -json flag in runPending (minimal)

gopherbot

gopherbot commented on Jul 24, 2023

@gopherbot
Contributor

Change https://go.dev/cl/512115 mentions this issue: cmd/dist: handle -json flag in runPending (clean up)

gopherbot

gopherbot commented on Jul 28, 2023

@gopherbot
Contributor

Change https://go.dev/cl/513761 mentions this issue: [release-branch.go1.21] cmd/dist: handle -json flag in runPending (minimal)

gopherbot

gopherbot commented on Jul 28, 2023

@gopherbot
Contributor

Closed by merging 6df6e61 to release-branch.go1.21.

moved this from In Progress to Done in Go Releaseon Jul 28, 2023
added a commit that references this issue on Aug 2, 2023
d8bf2ed
locked and limited conversation to collaborators on Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

Type

No type

Projects

Status

Done

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @dmitshur@gopherbot

      Issue actions

        cmd/dist: runPending doesn't JSON-encode skips in -json mode · Issue #61557 · golang/go