Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prep release: v1.29.0 #3734

Merged
merged 15 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
24 changes: 0 additions & 24 deletions .changesets/feat_geal_authorization_directives.md

This file was deleted.

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

This file was deleted.

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

This file was deleted.

6 changes: 0 additions & 6 deletions .changesets/fix_igni_update_router_bridge.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changesets/maint_bryn_uplink_client.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changesets/maint_geal_authorization_analytics.md

This file was deleted.

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

This file was deleted.

69 changes: 69 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,75 @@ 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.29.0] - 2023-09-04

## 🚀 Features

### GraphOS Enterprise: authorization directives ([PR #3397](https://github.com/apollographql/router/pull/3397), [PR #3662](https://github.com/apollographql/router/pull/3662))

Geal marked this conversation as resolved.
Show resolved Hide resolved
We introduce two new directives, `@requiresScopes` and `@authenticated`, that define authorization policies for fields and types in the supergraph schema.
Geal marked this conversation as resolved.
Show resolved Hide resolved

They are defined as follows:

```graphql
scalar federation__Scope
directive @requiresScopes(scopes: [[federation__Scope!]!]!) on OBJECT | FIELD_DEFINITION | INTERFACE | SCALAR | ENUM
Geal marked this conversation as resolved.
Show resolved Hide resolved

Geal marked this conversation as resolved.
Show resolved Hide resolved
This directive allows granular access control through user-defined scopes.

directive @authenticated on OBJECT | FIELD_DEFINITION | INTERFACE | SCALAR | ENUM
Geal marked this conversation as resolved.
Show resolved Hide resolved
```

The implementation hooks into the request lifecycle at multiple steps:
- In query analysis, we extract the list of scopes necessary to authorize the query.
- In a supergraph plugin, we calculate the authorization status and put it in the request context:
- for `@requiresScopes`, this is the intersection of the query's required scopes and the scopes provided in the request token
- for `@authenticated`, it is `is_authenticated` or not
Geal marked this conversation as resolved.
Show resolved Hide resolved
- In the query planning phase, we filter the query to remove unauthorized fields before proceeding with query planning.
- At the subgraph level, if query deduplication is active, the authorization status is used to group queries together.
- At the execution service level, the response is first formatted according to the filtered query, which removed any unauthorized information, then to the shape of the original query, which propagates nulls as needed.
- At the execution service level, errors are added to the response indicating which fields were removed because they were not authorized.
Geal marked this conversation as resolved.
Show resolved Hide resolved

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

## 🐛 Fixes

### Update Deno to resolve Rust Docs generation failure ([Issue #3305](https://github.com/apollographql/router/issues/3305))

The documentation for our [`apollo-router` Crate on Crates.io](https://crates.io/crates/apollo-router), was failing to build because of a dependency's complication errors [in the docs.rs build environment](https://docs.rs/about/builds).

We've updated to the latest version of Deno (0.200) which has resolved this constraint and allows us to generate our [docs.rs/apollo-router](https://docs.rs/crate/apollo-router/latest) docs once again.
Geal marked this conversation as resolved.
Show resolved Hide resolved

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

### Fix config metrics path and test for subscription callbacks ([Issue #3687](https://github.com/apollographql/router/issues/3687))
Geal marked this conversation as resolved.
Show resolved Hide resolved

Detection of subscription callbacks has been fixed for internal Apollo metrics. This has no user facing impact.

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

Geal marked this conversation as resolved.
Show resolved Hide resolved
### GraphQL response processing is now captured under the execution span ([PR #3732](https://github.com/apollographql/router/pull/3732))

This ensures that the response processing is captured under the "execution" span. Previously, any event in processing would be reported under the supergraph span or — even more arbitrarily — any plugin's span (e.g., Rhai) which was happening in between.
Geal marked this conversation as resolved.
Show resolved Hide resolved

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

## 🛠 Maintenance

### Apollo Uplink connections re-use the existing HTTP client ([Issue #3333](https://github.com/apollographql/router/issues/3333))

A single HTTP client will now be shared between requests of the same type when making requests to [Apollo Uplink](https://www.apollographql.com/docs/federation/managed-federation/uplink/) to fetch supergraphs, licenses and configuration from Studio. Previously, such requests created a new HTTP client on each periodic fetch which occasionally resulted in CPU spikes, especially on macOS.

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

### Remove unneeded schema parsing steps ([PR #3547](https://github.com/apollographql/router/pull/3547))

We need access to a parsed schema in various parts of the router, sometimes before the point where it is actually parsed and integrated with the rest of the configuration, so it was parsed multiple times to mitigate that. Some architecture changes made these parsing steps obsolete so they were removed.
Geal marked this conversation as resolved.
Show resolved Hide resolved

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



# [1.28.1] - 2023-08-28

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

[[package]]
name = "apollo-router"
version = "1.29.0-rc.1"
version = "1.29.0"
dependencies = [
"access-json",
"anyhow",
Expand Down Expand Up @@ -419,7 +419,7 @@ dependencies = [

[[package]]
name = "apollo-router-benchmarks"
version = "1.29.0-rc.1"
version = "1.29.0"
dependencies = [
"apollo-parser 0.6.1",
"apollo-router",
Expand All @@ -435,7 +435,7 @@ dependencies = [

[[package]]
name = "apollo-router-scaffold"
version = "1.29.0-rc.1"
version = "1.29.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.29.0-rc.1"
version = "1.29.0"
authors = ["Apollo Graph, Inc. <[email protected]>"]
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.29.0-rc.1"
version = "1.29.0"
authors = ["Apollo Graph, Inc. <[email protected]>"]
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.29.0-rc.1"
apollo-router = "1.29.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.29.0-rc.1" }
apollo-router-scaffold = { git = "https://github.com/apollographql/router.git", tag = "v1.29.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.29.0-rc.1"
version = "1.29.0"
authors = ["Apollo Graph, Inc. <[email protected]>"]
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.29.0-rc.1
image: ghcr.io/apollographql/router:v1.29.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.29.0-rc.1
image: ghcr.io/apollographql/router:v1.29.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.29.0-rc.1
image: ghcr.io/apollographql/router:v1.29.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.29.0-rc.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.29.0`

## Override the configuration

Expand Down
28 changes: 14 additions & 14 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.29.0-rc.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.29.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.29.0-rc.1
helm.sh/chart: router-1.29.0
app.kubernetes.io/name: router
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "v1.29.0-rc.1"
app.kubernetes.io/version: "v1.29.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.29.0-rc.1
helm.sh/chart: router-1.29.0
app.kubernetes.io/name: router
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "v1.29.0-rc.1"
app.kubernetes.io/version: "v1.29.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.29.0-rc.1
helm.sh/chart: router-1.29.0
app.kubernetes.io/name: router
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "v1.29.0-rc.1"
app.kubernetes.io/version: "v1.29.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.29.0-rc.1
helm.sh/chart: router-1.29.0
app.kubernetes.io/name: router
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "v1.29.0-rc.1"
app.kubernetes.io/version: "v1.29.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.29.0-rc.1
helm.sh/chart: router-1.29.0
app.kubernetes.io/name: router
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "v1.29.0-rc.1"
app.kubernetes.io/version: "v1.29.0"
app.kubernetes.io/managed-by: Helm

annotations:
Expand Down Expand Up @@ -174,7 +174,7 @@ spec:
- name: router
securityContext:
{}
image: "ghcr.io/apollographql/router:v1.29.0-rc.1"
image: "ghcr.io/apollographql/router:v1.29.0"
imagePullPolicy: IfNotPresent
args:
- --hot-reload
Expand Down Expand Up @@ -226,10 +226,10 @@ kind: Pod
metadata:
name: "release-name-router-test-connection"
labels:
helm.sh/chart: router-1.29.0-rc.1
helm.sh/chart: router-1.29.0
app.kubernetes.io/name: router
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "v1.29.0-rc.1"
app.kubernetes.io/version: "v1.29.0"
app.kubernetes.io/managed-by: Helm
annotations:
"helm.sh/hook": test
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.29.0-rc.1
version: 1.29.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.29.0-rc.1"
appVersion: "v1.29.0"
9 changes: 3 additions & 6 deletions helm/chart/router/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[router](https://github.com/apollographql/router) Rust Graph Routing runtime for Apollo Federation

![Version: 1.29.0-rc.1](https://img.shields.io/badge/Version-1.29.0--rc.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.29.0-rc.1](https://img.shields.io/badge/AppVersion-v1.29.0--rc.1-informational?style=flat-square)
![Version: 1.29.0](https://img.shields.io/badge/Version-1.29.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.29.0](https://img.shields.io/badge/AppVersion-v1.29.0-informational?style=flat-square)

## Prerequisites

Expand All @@ -11,15 +11,15 @@
## Get Repo Info

```console
helm pull oci://ghcr.io/apollographql/helm-charts/router --version 1.29.0-rc.1
helm pull oci://ghcr.io/apollographql/helm-charts/router --version 1.29.0
```

## Install Chart

**Important:** only helm3 is supported

```console
helm upgrade --install [RELEASE_NAME] oci://ghcr.io/apollographql/helm-charts/router --version 1.29.0-rc.1 --values my-values.yaml
helm upgrade --install [RELEASE_NAME] oci://ghcr.io/apollographql/helm-charts/router --version 1.29.0 --values my-values.yaml
```

_See [configuration](#configuration) below._
Expand Down Expand Up @@ -92,6 +92,3 @@ helm show values oci://ghcr.io/apollographql/helm-charts/router
| terminationGracePeriodSeconds | int | `30` | Sets the [termination grace period](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#hook-handler-execution) for Deployment pods |
| tolerations | list | `[]` | |
| virtualservice.enabled | bool | `false` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Loading