Skip to content

panic running speakeasy openapi diff #1464

Description

@rwjblue-glean

When I run (from within a checkout of gleanwork/open-api):

speakeasy openapi diff --old=https://gleanwork.github.io/open-api/specs/source/client_rest.yaml --new=source/client_rest.yaml

I get the following error:

panic: send on closed channel

goroutine 1 [running]:
github.com/pb33f/openapi-changes/model.SendProgressUpdate(...)
        C:/Users/runneradmin/go/pkg/mod/github.com/pb33f/openapi-changes@v0.0.61/model/progress.go:26
github.com/speakeasy-api/speakeasy-core/changes.runLeftRightSummary({0x1081e1fe0, 0x14000453a40}, {0x140022bb450, 0x44}, {0x140016c7398, 0x17}, 0x1400241a1c0, 0x1400241a230, 0x1)
        C:/Users/runneradmin/go/pkg/mod/github.com/speakeasy-api/speakeasy-core@v0.19.8/changes/changes.go:166 +0x7b4
github.com/speakeasy-api/speakeasy-core/changes.GetChanges({0x1081e1fe0, 0x14000453a40}, {0x140016c9c20, 0x42}, {0x140016c7398, 0x17}, {0x0, 0x0, 0x0, 0x0, ...})
        C:/Users/runneradmin/go/pkg/mod/github.com/speakeasy-api/speakeasy-core@v0.19.8/changes/changes.go:74 +0x300
github.com/speakeasy-api/speakeasy/internal/changes.GetChanges({0x1081e1fe0?, 0x14000453a40?}, {0x140016c9c20?, 0x42?}, {0x140016c7398?, 0x17?})
        C:/a/speakeasy/speakeasy/internal/changes/openapiChanges.go:31 +0x44
github.com/speakeasy-api/speakeasy/cmd/openapi.diffOpenapiInteractive({0x1081e1fe0, 0x14000453a40}, {{0x140016c9c20, 0x42}, {0x140016c7398, 0x17}, {0x140010a4320, 0x7}, {0x1079bf468, 0x1}})
        C:/a/speakeasy/speakeasy/cmd/openapi/openapi.go:145 +0xe4
github.com/speakeasy-api/speakeasy/internal/model.ExecutableCommand[...].Init.func1.1()
        C:/a/speakeasy/speakeasy/internal/model/command.go:171 +0x84
github.com/speakeasy-api/speakeasy/internal/model.ExecutableCommand[...].Init.func1.2(0x107ba0f20?)
        C:/a/speakeasy/speakeasy/internal/model/command.go:178 +0x2c
github.com/speakeasy-api/speakeasy-core/events.Telemetry({0x1081e1fe0, 0x14000453050}, {0x10663482b, 0x8}, 0x14007207af8)
        C:/Users/runneradmin/go/pkg/mod/github.com/speakeasy-api/speakeasy-core@v0.19.8/events/capture.go:92 +0x328
github.com/speakeasy-api/speakeasy/internal/model.ExecutableCommand[...].Init.func1({0x106616cd1, 0x4?, 0x106616bdd?})
        C:/a/speakeasy/speakeasy/internal/model/command.go:177 +0x4c4
github.com/spf13/cobra.(*Command).execute(0x1400625d508, {0x140024e4a40, 0x2, 0x2})
        C:/Users/runneradmin/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1015 +0x828
github.com/spf13/cobra.(*Command).ExecuteC(0x10a566200)
        C:/Users/runneradmin/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1148 +0x350
github.com/spf13/cobra.(*Command).Execute(...)
        C:/Users/runneradmin/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1071
github.com/speakeasy-api/speakeasy/cmd.Execute({0x1079b2928?, 0x15?}, {0x1079b2940?, 0x140000021c0?})
        C:/a/speakeasy/speakeasy/cmd/root.go:117 +0x38
main.main()
        C:/a/speakeasy/speakeasy/main.go:29 +0x130

I've confirmed that doing roughly the same thing directly with pb33f/openapi-changes works without error:

openapi-changes summary https://gleanwork.github.io/open-api/specs/source/client_rest.yaml source_specs/client_rest.yaml --markdown

GEN-1560 Bug: Reported bug about panic in speakeasy openapi diff

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcliThe speakeasy CLI itself: commands, install, auth, workflow

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions