Skip to content

Commit

Permalink
release: v1.0.0-alpha.0 (#1638)
Browse files Browse the repository at this point in the history
  • Loading branch information
abernix authored Aug 29, 2022
1 parent bc6c0cd commit d5e6406
Show file tree
Hide file tree
Showing 22 changed files with 545 additions and 307 deletions.
338 changes: 284 additions & 54 deletions CHANGELOG.md

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

214 changes: 0 additions & 214 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,221 +26,7 @@ By [@USERNAME](https://github.com/USERNAME) in https://github.com/apollographql/
# [x.x.x] (unreleased) - 2022-mm-dd

## ❗ BREAKING ❗

### Move cors configuration from `server` to top level ([PR #1586](https://github.com/apollographql/router/pull/1586))

The cors configuration is now located at the top level of the configuration file.

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

### Exit the router after logging panic details ([PR #1602](https://github.com/apollographql/router/pull/1602))

If the router panics, it can leave the router in an unuseable state.

Terminating after logging the panic details is the best choice here.

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

### Rename the `endpoint` parameter to `graphql_path` ([#1606](https://github.com/apollographql/router/issues/1606))

The `endpoint` parameter within the `server` portion of the YAML configuration has been renamed to `graphql_path` to more accurately reflect its behavior.

If you used this option, the necessary change would look like:

```diff
- server:
- endpoint: /graphql
+ server:
+ graphql_path: /graphql
```

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

### Remove `activate()` from the plugin API ([PR #1569](https://github.com/apollographql/router/pull/1569))

Recent changes to configuration reloading means that the only known consumer of this API, telemetry, is no longer using it.

Let's remove it since it's simple to add back if later required.

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

### Rename TestHarness methods ([PR #1579](https://github.com/apollographql/router/pull/1579))

Some methods of `apollo_router::TestHarness` were renamed:

* `extra_supergraph_plugin``supergraph_hook`
* `extra_execution_plugin``execution_hook`
* `extra_subgraph_plugin``subgraph_hook`

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

### `Request` and `Response` types from `apollo_router::http_ext` are private ([Issue #1589](https://github.com/apollographql/router/issues/1589))

These types were wrappers around the `Request` and `Response` types from the `http` crate.
Now the latter are used directly instead.

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

### Changes to `IntoHeaderName` and `IntoHeaderValue` ([PR #1607](https://github.com/apollographql/router/pull/1607))

Note: these types are typically not use directly, so we expect most user code to require no change.

* Move from `apollo_router::http_ext` to `apollo_router::services`
* Rename to `TryIntoHeaderName` and `TryIntoHeaderValue`
* Make contents opaque
* Replace generic `From<T: Display>` conversion with multiple specific conversions
that are implemented by `http::headers::Header{Name,Value}`.

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

### QueryPlan::usage_reporting and QueryPlannerContent are private ([Issue #1556](https://github.com/apollographql/router/issues/1556))

These items have been removed from the public API of `apollo_router::services::execution`.

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

### Insert the full target triplet in the package name, and prefix with `v` ([Issue #1385](https://github.com/apollographql/router/issues/1385))

The release tarballs now contain the full target triplet in their name along with a `v` prefix to be consistent with our other packaging techniques (e.g., Rover):

* `router-0.16.0-x86_64-linux.tar.gz` -> `router-v0.16.0-x86_64-unknown-linux-gnu.tar.gz`
* `router-0.16.0-x86_64-macos.tar.gz` -> `router-v0.16.0-x86_64-apple-darwin.tar.gz`
* `router-0.16.0-x86_64-windows.tar.gz` -> `router-v0.16.0-x86_64-pc-windows-msvc.tar.gz`

By [@abernix](https://github.com/abernix) and [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/1433 (which re-lands work done in https://github.com/apollographql/router/pull/1393)

### Many structs and enums are now `#[non_exhaustive]` ([Issue #1550](https://github.com/apollographql/router/issues/1550))

This means we may add struct fields or enum variants in the future.
To prepare for that eventuality:

When using a struct pattern (such as for deconstructing a value into its fields),
use `..` to allow further fields:

```diff
-let PluginInit { config, supergraph_sdl } = init;
+let PluginInit { config, supergraph_sdl, .. } = init;
```

Or use field access instead:

```diff
-let PluginInit { config, supergraph_sdl } = init;
+let config = init.config;
+let supergraph_sdl = init.supergraph_sdl;
```

When constructing a struct, use a builder or constructor method instead of struct literal syntax:

```diff
-let error = graphql::Error {
- message: "something went wrong".to_string(),
- ..Default::default()
-};
+let error = graphql::Error::builder()
+ .message("something went wrong")
+ .build();
```

When matching on an enum, add a wildcard match arm:

```diff
match error {
ApolloRouterError::StartupError => "StartupError",
ApolloRouterError::HttpServerLifecycleError => "HttpServerLifecycleError",
ApolloRouterError::NoConfiguration => "NoConfiguration",
ApolloRouterError::NoSchema => "NoSchema",
ApolloRouterError::ServiceCreationError(_) => "ServiceCreationError",
ApolloRouterError::ServerCreationError(_) => "ServerCreationError",
+ _ => "other error",
}
```

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

### Some error enums or variants were removed ([Issue #81](https://github.com/apollographql/router/issues/81))

They were not used anymore in the public API (or at all).

By [@SimonSapin](https://github.com/SimonSapin) in FIXME

## 🚀 Features

### instrument the rhai plugin with a tracing span ([PR #1598](https://github.com/apollographql/router/pull/1598))

If you have an active rhai script in your router, you will now see a "rhai plugin" tracing span.

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

## 🐛 Fixes

### Only send one report for a response with deferred responses ([PR #1576](https://github.com/apollographql/router/issues/1576))

The router was sending one report per response (even deferred ones), while Studio was expecting one report for the entire
response. The router now sends one report, that measures the latency of the entire operation.

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

### Include formatted query plan when exposing the query plan ([#1557](https://github.com/apollographql/router/issues/1557))

Move the location of the `text` field when exposing the query plan and fill it with a formatted query plan.

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

### Change state machine log messages to `trace` ([#1578](https://github.com/apollographql/router/issues/1578))

We no longer show internal state machine log events at the `info` level since they are unnecessary during normal operation. They are instead emitted at the `trace` level and can be enabled selectively using the `--log trace` flag.

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

### Formatting problem fix of scalar fields selected several times ([PR #1583](https://github.com/apollographql/router/issues/1583))

Fixed a bug where querying scalar fields several times would put `null`s instead of expected values.

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

### Fix typo on HTTP errors from subgraph ([#1593](https://github.com/apollographql/router/pull/1593))

Remove the closed parenthesis at the end of error messages resulting from HTTP errors from subgraphs.

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

### Only send one report for a response with deferred responses ([PR #1596](https://github.com/apollographql/router/issues/1596))

deferred responses come as multipart elements, send as individual HTTP response chunks. When a client receives one chunk,
it should contain the next delimiter, so the client knows that the response can be processed, instead of waiting for the
next chunk to see the delimiter.

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

### Patch async-compression to compress responses in streaming ([PR #1604](https://github.com/apollographql/router/issues/1604))

async-compression is a dependency used for response compression. Its implementation accumulates the entire compressed response
in memory before sending it, which creates problems for deferred responses, where we want the responses to come as soon as
possible, and not all at once after a while.

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

### Queries with defer must have the Accept: multipart/mixed header ([PR #1610](https://github.com/apollographql/router/issues/1610))

Since deferred responses can come back as multipart responses, we must check that the client supports that content type.
This will allow older clients to show a meaningful error message instead of a parsing error if the `@defer` directive is
used but they don't support it.

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

## 🛠 Maintenance

### Depend on published `router-bridge` ([PR #1613](https://github.com/apollographql/router/issues/1613))

We have published the `router-bridge` to crates.io, which removes the need for router developers to have nodejs installed.

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

### Re-organize our release steps checklist ([PR #1605](https://github.com/apollographql/router/pull/1605))

We've got a lot of manual steps we need to do in order to release the Router binarys, but we can at least organize them meaningfuly for ourselves to follow! This is only a Router-team concern today!

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

## 📚 Documentation
2 changes: 1 addition & 1 deletion RELEASE_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ in lieu of an official changelog.
- update the appVersion to the release version. e.g.: `appVersion: "v0.9.0"`
7. cd helm/chart && helm-docs router; cd - (if required, install [helm-docs](https://github.com/norwoodj/helm-docs))
8. Update `federation-version-support.mdx` with the latest version info. Use https://github.com/apollographql/version_matrix to generate the version matrix.
9. Update the `version` in `docker-compose*` files in the `dockerfiles` directory.
9. Update the `image` of the Docker image within `docker-compose*.yml` files inside the `dockerfiles` directory.
10. Update the license list with `cargo about generate --workspace -o licenses.html about.hbs`.
You can install `cargo-about` by running `cargo install cargo-about`.
11. Add a new section in `CHANGELOG.md` with the contents of `NEXT_CHANGELOG.md`
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 = "0.15.1"
version = "1.0.0-alpha.0"
authors = ["Apollo Graph, Inc. <[email protected]>"]
edition = "2021"
license = "LicenseRef-ELv2"
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 = "0.16.0"
version = "1.0.0-alpha.0"
authors = ["Apollo Graph, Inc. <[email protected]>"]
edition = "2021"
license = "LicenseRef-ELv2"
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 = { git="https://github.com/apollographql/router.git", tag="v0.16.0" }
apollo-router = { git="https://github.com/apollographql/router.git", tag="v1.0.0-alpha.0" }
{{/if}}
{{/if}}
async-trait = "0.1.52"
Expand Down
4 changes: 2 additions & 2 deletions apollo-router-scaffold/templates/base/xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "xtask"
edition = "2021"
publish = false
version = "0.16.0"
version = "0.1.0"

[dependencies]
# This dependency should stay in line with your router version
Expand All @@ -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="v0.16.0"}
apollo-router-scaffold = { git="https://github.com/apollographql/router.git", tag="v1.0.0-alpha.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 = "0.16.0"
version = "1.0.0-alpha.0"
authors = ["Apollo Graph, Inc. <[email protected]>"]
edition = "2021"
license = "LicenseRef-ELv2"
Expand Down
2 changes: 1 addition & 1 deletion apollo-spaceport/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apollo-spaceport"
version = "0.16.0"
version = "1.0.0-alpha.0"
authors = ["Apollo Graph, Inc. <[email protected]>"]
edition = "2021"
license = "LicenseRef-ELv2"
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:v0.16.0
image: ghcr.io/apollographql/router:v1.0.0-alpha.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:v0.16.0
image: ghcr.io/apollographql/router:v1.0.0-alpha.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:v0.16.0
image: ghcr.io/apollographql/router:v1.0.0-alpha.0
volumes:
- ./supergraph.graphql:/etc/config/supergraph.graphql
- ./router/zipkin.router.yaml:/etc/config/configuration.yaml
Expand Down
8 changes: 4 additions & 4 deletions 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.: `v0.16.0`
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.0.0-alpha.0`

## Override the configuration

Expand Down Expand Up @@ -92,10 +92,10 @@ Usage: build_docker_image.sh [-b] [<release>]
Example 1: Building HEAD from the repo
build_docker_image.sh -b
Example 2: Building tag from the repo
build_docker_image.sh -b v0.16.0
build_docker_image.sh -b v1.0.0-alpha.0
Example 3: Building commit hash from the repo
build_docker_image.sh -b 1c220d35acf9ad2537b8edc58c498390b6701d3d
Example 4: Building tag v0.16.0 from the released tarball
build_docker_image.sh v0.16.0
Example 4: Building tag v1.0.0-alpha.0 from the released tarball
build_docker_image.sh v1.0.0-alpha.0
```
Note: The script has to be run from the `dockerfiles/diy` directory because it makes assumptions about the relative availability of various files. The example uses [distroless images](https://github.com/GoogleContainerTools/distroless) for the final image build. Feel free to modify the script to use images which better suit your own needs.
Loading

0 comments on commit d5e6406

Please sign in to comment.