Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .changesets/feat_swan_cub_foot_audience.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changesets/fix_abernix_remove_curl.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changesets/fix_bernard_helmtest.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changesets/fix_fed_247.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changesets/fix_garypen_3173_ca_certs.md

This file was deleted.

14 changes: 0 additions & 14 deletions .changesets/fix_lib_global_alloc.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changesets/maint_garypen_3176_filter_licenses.md

This file was deleted.

83 changes: 83 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,89 @@ All notable changes to Router will be documented in this file.

This project adheres to [Semantic Versioning v2.0.0](https://semver.org/spec/v2.0.0.html).

# [1.20.0] - 2023-05-31

## 🚀 Features

### Configurable histogram buckets for metrics ([Issue #2333](https://github.com/apollographql/router/issues/2333))

It is now possible to change the default bucketing for histograms generated for metrics:

```yaml title="router.yaml"
telemetry:
metrics:
common:
buckets:
- 0.05
- 0.10
- 0.25
- 0.50
- 1.00
- 2.50
- 5.00
- 10.00
- 20.00
```

By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/3098

## 🐛 Fixes

### Federation v2.4.7 ([Issue #3170](https://github.com/apollographql/router/issues/3170), [Issue #3133](https://github.com/apollographql/router/issues/3133))

This release bumps the Router's Federation support from v2.4.7 to v2.4.7, which brings in notable query planner fixes from [v2.4.7](https://github.com/apollographql/federation/releases/tag/%40apollo%2Fquery-planner%402.4.7). Of note from those releases, this brings query planner fixes that (per that dependency's changelog):

- Re-work the code use to try to reuse query named fragments to improve performance (thus sometimes improving query ([#2604](https://github.com/apollographql/federation/pull/2604)) planning performance)
- Fix a raised assertion error (again, with a message of form like `Cannot add selection of field X to selection set of parent type Y`).
- Fix a rare issue where an `interface` or `union` field was not being queried for all the types it should be.

By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3185

### Set the global allocator in the library crate, not just the executable ([Issue #3126](https://github.com/apollographql/router/issues/3126))

In 1.19, Apollo Router [switched to use `jemalloc` as the global Rust allocator on Linux](https://github.com/apollographql/router/blob/dev/CHANGELOG.md#improve-memory-fragmentation-and-resource-consumption-by-switching-to-jemalloc-as-the-memory-allocator-on-linux-pr-2882) to reduce memory fragmentation. However, prior to this change this was only occurring in the executable binary provided by the `apollo-router` crate and [custom binaries](https://www.apollographql.com/docs/router/customizations/custom-binary) using the crate _as a library_ were not getting this benefit.

The `apollo-router` library crate now sets the global allocator so that custom binaries also take advantage of this by default. If some other choice is desired, the `global-allocator` Cargo [feature flag](https://doc.rust-lang.org/cargo/reference/features.html) can be disabled in `Cargo.toml` with:

```toml
[dependencies]
apollo-router = {version = "[…]", default-features = false}
```

Library crates that depend on `apollo-router` (if any) should also do this in order to leave the choice to the eventual executable. (Cargo default features are only disabled if *all* dependents specify `default-features = false`.)

By [@SimonSapin](https://github.com/SimonSapin) in https://github.com/apollographql/router/pull/3157

### Add `ca-certificates` to our Docker image ([Issue #3173](https://github.com/apollographql/router/issues/3173))

We removed `curl` from our Docker images to improve security, which meant that our implicit install of `ca-certificates` (as a dependency of `curl`) was no longer performed.

This fix reinstates the `ca-certificates` package explicitly, which is required for the router to be able to process TLS requests.

By [@garypen](https://github.com/garypen) in https://github.com/apollographql/router/pull/3174

### Helm: Running of `helm test` no longer fails

Running `helm test` was generating an error since `wget` was sending a request without a proper body and expecting an HTTP status response of 2xx. Without the proper body, it expectedly resulted in an HTTP status of 400. By switching to using `netcat` (or `nc`) we will now check that the port is up and use that to determine that the router is functional.

By [@bbardawilwiser](https://github.com/bbardawilwiser) in https://github.com/apollographql/router/pull/3096

### Move `curl` dependency to separate layer in Docker image ([Issue #3144](https://github.com/apollographql/router/issues/3144))

We've moved `curl` out of the Docker image we publish. The `curl` command is only used in the image we produce today for the sake of downloading dependencies. It is never used after that, but we can move it to a separate layer to further remove it from the image.

By [@abernix](https://github.com/abernix) in https://github.com/apollographql/router/pull/3146

## 🛠 Maintenance

### Improve `cargo-about` license checking ([Issue #3176](https://github.com/apollographql/router/issues/3176))

From the description of this [cargo about PR](https://github.com/EmbarkStudios/cargo-about/pull/216), it is possible for `NOASSERTION` identifiers to be added when gathering license information, causing license checks to fail. This change uses the new `cargo-about` configuration `filter-noassertion` to eliminate the problem.

By [@garypen](https://github.com/garypen) in https://github.com/apollographql/router/pull/3178



# [1.19.1] - 2023-05-26

## 🐛 Fixes
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ dependencies = [

[[package]]
name = "apollo-router"
version = "1.19.1"
version = "1.20.0"
dependencies = [
"access-json",
"anyhow",
Expand Down Expand Up @@ -400,7 +400,7 @@ dependencies = [

[[package]]
name = "apollo-router-benchmarks"
version = "1.19.1"
version = "1.20.0"
dependencies = [
"apollo-parser 0.4.1",
"apollo-router",
Expand All @@ -416,7 +416,7 @@ dependencies = [

[[package]]
name = "apollo-router-scaffold"
version = "1.19.1"
version = "1.20.0"
dependencies = [
"anyhow",
"cargo-scaffold",
Expand Down
2 changes: 1 addition & 1 deletion apollo-router-benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apollo-router-benchmarks"
version = "1.19.1"
version = "1.20.0"
authors = ["Apollo Graph, Inc. <packages@apollographql.com>"]
edition = "2021"
license = "Elastic-2.0"
Expand Down
2 changes: 1 addition & 1 deletion apollo-router-scaffold/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apollo-router-scaffold"
version = "1.19.1"
version = "1.20.0"
authors = ["Apollo Graph, Inc. <packages@apollographql.com>"]
edition = "2021"
license = "Elastic-2.0"
Expand Down
2 changes: 1 addition & 1 deletion apollo-router-scaffold/templates/base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ apollo-router = { path ="{{integration_test}}apollo-router" }
apollo-router = { git="https://github.com/apollographql/router.git", branch="{{branch}}" }
{{else}}
# Note if you update these dependencies then also update xtask/Cargo.toml
apollo-router = "1.19.1"
apollo-router = "1.20.0"
{{/if}}
{{/if}}
async-trait = "0.1.52"
Expand Down
2 changes: 1 addition & 1 deletion apollo-router-scaffold/templates/base/xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ apollo-router-scaffold = { path ="{{integration_test}}apollo-router-scaffold" }
{{#if branch}}
apollo-router-scaffold = { git="https://github.com/apollographql/router.git", branch="{{branch}}" }
{{else}}
apollo-router-scaffold = { git = "https://github.com/apollographql/router.git", tag = "v1.19.1" }
apollo-router-scaffold = { git = "https://github.com/apollographql/router.git", tag = "v1.20.0" }
{{/if}}
{{/if}}
anyhow = "1.0.58"
Expand Down
2 changes: 1 addition & 1 deletion apollo-router/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apollo-router"
version = "1.19.1"
version = "1.20.0"
authors = ["Apollo Graph, Inc. <packages@apollographql.com>"]
repository = "https://github.com/apollographql/router/"
documentation = "https://docs.rs/apollo-router"
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/tracing/docker-compose.datadog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:

apollo-router:
container_name: apollo-router
image: ghcr.io/apollographql/router:v1.19.1
image: ghcr.io/apollographql/router:v1.20.0
volumes:
- ./supergraph.graphql:/etc/config/supergraph.graphql
- ./router/datadog.router.yaml:/etc/config/configuration.yaml
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/tracing/docker-compose.jaeger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
apollo-router:
container_name: apollo-router
#build: ./router
image: ghcr.io/apollographql/router:v1.19.1
image: ghcr.io/apollographql/router:v1.20.0
volumes:
- ./supergraph.graphql:/etc/config/supergraph.graphql
- ./router/jaeger.router.yaml:/etc/config/configuration.yaml
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/tracing/docker-compose.zipkin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
apollo-router:
container_name: apollo-router
build: ./router
image: ghcr.io/apollographql/router:v1.19.1
image: ghcr.io/apollographql/router:v1.20.0
volumes:
- ./supergraph.graphql:/etc/config/supergraph.graphql
- ./router/zipkin.router.yaml:/etc/config/configuration.yaml
Expand Down
2 changes: 1 addition & 1 deletion docs/source/containerization/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The default behaviour of the router images is suitable for a quickstart or devel

Note: The [docker documentation](https://docs.docker.com/engine/reference/run/) for the run command may be helpful when reading through the examples.

Note: The exact image version to use is your choice depending on which release you wish to use. In the following examples, replace `<image version>` with your chosen version. e.g.: `v1.19.1`
Note: The exact image version to use is your choice depending on which release you wish to use. In the following examples, replace `<image version>` with your chosen version. e.g.: `v1.20.0`

## Override the configuration

Expand Down
34 changes: 17 additions & 17 deletions docs/source/containerization/kubernetes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Link } from 'gatsby';

[Helm](https://helm.sh) is the package manager for kubernetes.

There is a complete [helm chart definition](https://github.com/apollographql/router/tree/v1.19.1/helm/chart/router) in the repo which illustrates how to use helm to deploy the router in kubernetes.
There is a complete [helm chart definition](https://github.com/apollographql/router/tree/v1.20.0/helm/chart/router) in the repo which illustrates how to use helm to deploy the router in kubernetes.

In both the following examples, we are using helm to install the router:
- into namespace "router-deploy" (create namespace if it doesn't exist)
Expand Down Expand Up @@ -64,10 +64,10 @@ kind: ServiceAccount
metadata:
name: release-name-router
labels:
helm.sh/chart: router-1.19.1
helm.sh/chart: router-1.20.0
app.kubernetes.io/name: router
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "v1.19.1"
app.kubernetes.io/version: "v1.20.0"
app.kubernetes.io/managed-by: Helm
---
# Source: router/templates/secret.yaml
Expand All @@ -76,10 +76,10 @@ kind: Secret
metadata:
name: "release-name-router"
labels:
helm.sh/chart: router-1.19.1
helm.sh/chart: router-1.20.0
app.kubernetes.io/name: router
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "v1.19.1"
app.kubernetes.io/version: "v1.20.0"
app.kubernetes.io/managed-by: Helm
data:
managedFederationApiKey: "UkVEQUNURUQ="
Expand All @@ -90,10 +90,10 @@ kind: ConfigMap
metadata:
name: release-name-router
labels:
helm.sh/chart: router-1.19.1
helm.sh/chart: router-1.20.0
app.kubernetes.io/name: router
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "v1.19.1"
app.kubernetes.io/version: "v1.20.0"
app.kubernetes.io/managed-by: Helm
data:
configuration.yaml: |
Expand All @@ -117,10 +117,10 @@ kind: Service
metadata:
name: release-name-router
labels:
helm.sh/chart: router-1.19.1
helm.sh/chart: router-1.20.0
app.kubernetes.io/name: router
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "v1.19.1"
app.kubernetes.io/version: "v1.20.0"
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
Expand All @@ -143,10 +143,10 @@ kind: Deployment
metadata:
name: release-name-router
labels:
helm.sh/chart: router-1.19.1
helm.sh/chart: router-1.20.0
app.kubernetes.io/name: router
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "v1.19.1"
app.kubernetes.io/version: "v1.20.0"
app.kubernetes.io/managed-by: Helm

annotations:
Expand All @@ -172,7 +172,7 @@ spec:
- name: router
securityContext:
{}
image: "ghcr.io/apollographql/router:v1.19.1"
image: "ghcr.io/apollographql/router:v1.20.0"
imagePullPolicy: IfNotPresent
args:
- --hot-reload
Expand Down Expand Up @@ -223,19 +223,19 @@ kind: Pod
metadata:
name: "release-name-router-test-connection"
labels:
helm.sh/chart: router-1.19.1
helm.sh/chart: router-1.20.0
app.kubernetes.io/name: router
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "v1.19.1"
app.kubernetes.io/version: "v1.20.0"
app.kubernetes.io/managed-by: Helm
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
- name: netcat
image: busybox
command: ['wget']
args: ['release-name-router:80']
command: ['nc']
args: ['-vz','-w','1','release-name-router:80']
restartPolicy: Never
```

Expand Down
4 changes: 2 additions & 2 deletions helm/chart/router/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ type: application
# so it matches the shape of our release process and release automation.
# By proxy of that decision, this version uses SemVer 2.0.0, though the prefix
# of "v" is not included.
version: 1.19.1
version: 1.20.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v1.19.1"
appVersion: "v1.20.0"
Loading