Skip to content

Commit

Permalink
Changelog and test path fix
Browse files Browse the repository at this point in the history
  • Loading branch information
unmultimedio committed Aug 5, 2022
1 parent e25ca0d commit 54dcfbf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
## [Unreleased]

- Change default for `--origin` flag of `buf beta studio-agent` to `https://studio.buf.build`
- Change default for `--timeout` flag of `buf beta studio-agent` to `0` (no timeout). Before it was
`2m` (the default for all the other `buf` commands).
- Add `connect.CodeUnavailable` as an unhandled Connect error code for `buf beta studio-agent`,
which will trigger an `http.StatusBadGateway` response in case of a bad or unreachable upstream
server. Before the only unhandled error was `connect.CodeUnavailable`.

## [v1.7.0] - 2022-06-27

Expand Down
4 changes: 3 additions & 1 deletion private/bufpkg/bufstudioagent/bufstudioagent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,10 @@ func newTestConnectServer(t *testing.T, tls bool) *httptest.Server {
},
connect.WithCodec(&bufferCodec{name: "proto"}),
))
// unknownPath returns the body as error message with code unknown, to test
// studio agent behaviour on potential server closed connections.
mux.Handle(unknownPath, connect.NewUnaryHandler(
errorPath,
unknownPath,
func(ctx context.Context, r *connect.Request[bytes.Buffer]) (*connect.Response[bytes.Buffer], error) {
return nil, connect.NewError(connect.CodeUnknown, errors.New(r.Msg.String()))
},
Expand Down

0 comments on commit 54dcfbf

Please sign in to comment.