Skip to content

Release v2.2

Latest

Choose a tag to compare

@github-actions github-actions released this 24 Oct 17:34
· 1 commit to main since this release

Built for Trino 484

Upgrading from v2.1

These changes can break existing catalogs or queries:

  • Credentials are sent only over HTTPS. To send them to an http:// server, like an API on a local network, set authentication.allow-insecure-http=true. (#321)
  • Credentials are sent only to base-uri, or to the servers declared in the spec when base-uri isn't set. A tokenUrl from the spec that uses HTTP on a different host than the API is ignored, unless authentication.token-url sets it. (#321, #336)
  • Redirects fail instead of being followed, because following them could send credentials to another host. The error names the redirect target, so base-uri can be updated. (#327)
  • authentication.type=oauth is rejected when the catalog is created. It never worked, because OAuth needs an oauth2 security scheme from the spec. (#329)
  • A 404 response to a list endpoint fails the query. A 404 still returns no rows when the path has path parameters, or when the operation declares a 404 response. (#324)
  • number without a format is read as DECIMAL(38, 10) instead of DECIMAL(18, 8). (#314)
  • Union columns and columns of unknown types hold JSON text, so strings are quoted, like "abc". Values written to them must be valid JSON. (#323)
  • Unions of a single type and null are mapped to that type, instead of JSON text. Unions of const or enum values of one type are mapped to that type. (#325, #365)
  • Response fields next to resultsPath, like totals and has-more flags, are hidden from SELECT * and DESCRIBE. (#328)
  • Paths with the same table name, like /a/b and /a-b, become separate tables, and the next ones get numeric suffixes. In the bundled Cloudflare spec, this only adds accounts_billable_usage_2. (#332)
  • Responses that can't be mapped to any columns no longer appear as empty tables. (#338)
  • All nodes must load the same spec. A query fails with a clear error on a worker that loaded a different version. (#342)
  • The HTTP cache directory is named after the account, so existing cached responses are not reused. Cached files are readable only by the Trino user. (#322, #352)
  • max-requests-per-second and max-splits-per-second must be greater than 0. (#329)

New features

  • OpenAPI 3.1: tuples (prefixItems) become ROW types, const and enum values without a type use the type of their values, and exclusive bounds limit page sizes and parameter defaults. (#365)
  • Cursor, Link header, and offset pagination, with new cursorParam, nextCursorPath, nextPageLinkHeader, and offsetParam pagination properties. (#341)
  • Per-user credentials: authentication.*-credential-name properties name extra credentials that replace the catalog credentials for users who pass them. (#352)
  • The servers declared in the spec are used when base-uri isn't set, including relative URLs and server variables. (#336)
  • OAuth tokens are requested with the scopes of the security requirement, and refreshed when the API rejects them. New properties: authentication.client-auth-method and authentication.token-url. (#337)
  • spec-location.authentication=catalog sends the catalog credentials when fetching the spec. (#345)
  • schema-from-tags puts tables into schemas named after the tags of their operations. (#347)
  • trimmed-path-prefixes leaves prefixes like /api/v1 out of table names, and a spec extension can name a table. (#343)
  • Form-encoded request bodies. (#344)
  • Responses with arrays of plain values, objects with dynamic keys, other JSON media types, and other success statuses. (#335, #338, #340)
  • Path parameters linked to the response fields they identify, so filters on those columns are sent as path parameters. (#330)
  • UPDATE and DELETE use a row ID made from the path parameters that identify a resource. (#333)
  • max-scan-requests-per-second limits the request rate of a table scan across all nodes. (#353)
  • max-response-size, max-filter-combinations, dynamic-filtering.wait-timeout, and stride-splits make limits that were fixed before configurable. (#349, #353)
  • EXPLAIN shows the pushed-down predicates, limit, and sort. (#329)

Security

  • Requests can't leave the host of base-uri, for example because of a trailing slash or an empty path parameter. (#304)
  • API keys, tokens, the spec location, and response bodies are kept out of logs and error messages. (#305, #317)
  • Basic credentials use standard base64, and API keys in query strings are encoded correctly. (#311)
  • Cached responses are separated by credentials and request headers, and don't store cookies. (#322, #352)

Fixes

  • Pagination stops at the right page when totals, has-more flags, or page sizes disagree. (#319)
  • TopN is pushed down only for types the server sorts like Trino. (#320)
  • Values that don't fit their column type fail the query instead of being read wrong. (#314)
  • Columns missing from some SELECT responses are nullable. (#326)
  • Response values of parameters that are also response fields are returned. (#316)
  • Errors returned with status 200 are reported, and resultsPath is validated when the spec is loaded. (#334)
  • Request bodies with arrays, unions, and array schemas are sent correctly. (#323)
  • Retries cover POST reads and 429 responses, and a retried DELETE of a missing resource succeeds. (#327)
  • Arrays in allOf alternatives keep their element type. (#331)
  • Predicates pushed down again on a filtered column are intersected. (#364)
  • Token endpoint errors, 401 responses without a challenge, and spec problems are reported with connector error codes. (#350, #356, #358)
  • HTTP clients and threads are released when a catalog is dropped. (#309)
  • The Docker image's generic catalog sets only the properties passed to the container. (#306)

Build

  • The build now runs airstyle, Error Prone, the Trino modernizer rules, and the duplicate class checks, and fails on compiler warnings. (#303, #307, #308, #310)