Skip to content

Releases: bufbuild/knit-go

v0.1.0

04 Oct 17:28
0a838d0
Compare
Choose a tag to compare

This release primarily contains improvements to the knitgateway command.

But it also includes a backwards-incompatible change, migrating from the old Connect Go runtime ("github.com/bufbuild/connect-go") to the new one ("connectrpc.com/connect"). This was deemed acceptable since Knit is still in an alpha state and has not yet had a v1.0 release. We are sorry for any breakages in user applications this causes. Please see Connect's migration instructions to remedy.

Command knitgateway

  • Release artifacts are now named knitgateway-... instead of knit-go-... since they contain only the knitgateway binary.

  • The gateway can now be configured to expose an admin web UI at /admin/. By default, they are served from an ephemeral port that is separate from application traffic. The web UI can be disabled or configured to serve from a different port via a knitgateway.yaml configuration file.

    The UI currently provides a way to view the current configuration, a way to view information about all supported services, and a mechanism to explicitly reload schemas for these services (instead of waiting until next scheduled polling).

  • The gateway now reports a user-agent of knitgateway/<version> (includes other details, like the version of the Connect Go library in use) when sending RPC requests to backends and when fetching the schema from a Buf Schema Registry.

Package github.com/bufbuild/knit-go

  • The Knit runtime now uses the Connect runtime via the "connectrpc.com/connect" import path. Previous versions used the "github.com/bufbuild/connect-go" import path. The two are not compatible and even linking both into the same program may cause issues. So users that import "github.com/bufbuild/knit-go" will need to migrate to using "connectrpc.com/connect" when upgrading to this release. We apologize for the inconvenience.
  • The original User-Agent from the client's request is no longer propagated when the gateway invokes backend RPCs to service the request. Instead, its own user-agent is sent. If not customized (via custom HTTP client or Connect interceptor), this will be the default user-agent of the Connect library, which will be connect-go/<connect-version> (go<go-version>) for the Connect protocol or grpc-go-connect/<connect-version> (go<go-version>) for gRPC and gRPC-Web protocols.

v0.0.2

25 May 21:30
ac036e8
Compare
Choose a tag to compare
v0.0.2 Pre-release
Pre-release

This adds numerous improvements to the knitgateway command to make it more suitable for use in production environments. This also includes some minor changes to the Go library for creating custom gateways (and which also powers knitgateway). Changes described in more detail below.

Command knitgateway

  • Add support for TLS as an HTTP server. Also adds ability to customize TLS settings as an HTTP client when connecting to RPC backends.
  • Add ability to configure CORS behavior.
  • Add signal-handling so that the gateway performs a graceful shutdown when terminated or interrupted.
  • Add periodic re-polling of descriptors, so that the gateway auto-reconfigures itself if and when the backing RPC schemas change. This allows it to update itself over time as backends are updated, without requiring a restart or redeploy.
  • Add ability to cache schema descriptors, for re-use in subsequent restart in the event that backend schema sources are unavailable (like due to network partition).
  • Add ability to configure per-request maximum parallelism.
  • Add --version flag, to easily check the version of knitgateway in use.
  • Fix a bug where requests through the gateway could inexplicably fail after a whole minute if the connections to backends used HTTP/2.

Package github.com/bufbuild/knit-go

  • Fix a bug where some headers that are request/protocol/transport-specific were incorrectly being propagated to requests to RPC backends. Some of these headers could arrive via HTTP 1.1 requests and then cause issues when propagated over HTTP/2 connections.
  • Fix error-handling for two cases:
    1. If request parameters for a top-level request in a Knit query or in a relation are invalid, an "invalid_argument" error code is now returned instead of "unknown".
    2. If a resolver returned the wrong number of results for a batch, this could bypass the Knit query's error-handling mode and result in the entire request failing, even if the relation in question was configured to catch (via @catch property in query). This is now fixed.
  • Add a vararg ...knit.HandlerOption parameter to the end of parameter list for Gateway.AsHandler, which allows providing Connect handler options when creating the handler.

v0.0.1

04 May 14:32
Compare
Choose a tag to compare
v0.0.1 Pre-release
Pre-release

This is an initial release of the Knit stand-alone gateway and accompanying Go library. Knit is in alpha state: it is still undergoing initial development and is not yet stable.