Skip to content

Commit

Permalink
release: v1.0.0-rc.2 (#1845)
Browse files Browse the repository at this point in the history
Co-authored-by: Coenen Benjamin <[email protected]>
  • Loading branch information
abernix and bnjjj authored Sep 20, 2022
1 parent d0249db commit f4e5263
Show file tree
Hide file tree
Showing 18 changed files with 128 additions and 124 deletions.
89 changes: 89 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,95 @@ All notable changes to Router will be documented in this file.

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

# [1.0.0-rc.2] - 2022-09-20

## 🐛 Fixes

### Update `apollo-parser` to v0.2.11 ([PR #1841](https://github.com/apollographql/router/pull/1841))

Fixes error creation for missing selection sets in named operation definitions by updating to `apollo-rs`'s [`apollo-parser` v0.2.11](https://crates.io/crates/apollo-parser/0.2.11).

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

### Fix router scaffold version ([Issue #1836](https://github.com/apollographql/router/issues/1836))

Add `v` prefix to the package version emitted in our [scaffold tooling](https://www.apollographql.com/docs/router/customizations/custom-binary/) when a published version of the crate is available. This results in packages depending (appropriately, we would claim!) on our published Cargo crates, rather than Git references to the repository.

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

### Fixed `extraVolumeMounts` in Helm charts ([Issue #1824](https://github.com/apollographql/router/issues/1824))

Correct a case in our Helm charts where `extraVolumeMounts` was not be being filled into the deployment template correctly.

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

### Do not fill in a skeleton object when canceling a subgraph request ([Discussion #1377](https://github.com/apollographql/router/discussions/1377#discussioncomment-3655967))

Given a supergraph with multiple subgraphs `USER` and `ORGA`, like [this example supergraph](https://github.com/apollographql/router/blob/d0a02525c670e4317586100a31fdbdcd95c6ef07/apollo-router/src/services/supergraph_service.rs#L586-L623), if a query spans multiple subgraphs, like this:

```graphql
query {
currentUser { # USER subgraph
activeOrganization { # ORGA subgraph
id
creatorUser {
name
}
}
}
}
```

...when the `USER` subgraph returns `{"currentUser": { "activeOrganization": null }}`, then the request to the `ORGA` subgraph
should be _cancelled_ and no data should be generated. This was not occurring since the query planner was incorrectly creating an object at the target path. This is now corrected.

This fix also improves the internal usage of mocked subgraphs with `TestHarness`.

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

### Default conditional `@defer` condition to `true` ([Issue #1820](https://github.com/apollographql/router/issues/1820))

According to recent updates in the `@defer` specification, defer conditions must default to `true`. This corrects a bug where that default value wasn't being initialized properly.

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

### Support query plans with empty primary subselections ([Issue #1800](https://github.com/apollographql/router/issues/1800))

When a query with `@defer` would result in an empty primary response, the router was returning
an error in interpreting the query plan. It is now using the query plan properly, and detects
more precisely queries containing `@defer`.

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

## 🛠 Maintenance

### Add more compilation gates to hide noisy warnings ([PR #1830](https://github.com/apollographql/router/pull/1830))

Add more gates (for the `console` feature introduced in [PR #1632](https://github.com/apollographql/router/pull/1632)) to not emit compiler warnings when using the `--all-features` flag. (See original PR for more details on the flag usage.)

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

### Deny `panic`, `unwrap` and `expect` in the spec module ([PR #1844](https://github.com/apollographql/router/pull/1844))

We are generally working to eliminate `unwrap()` and `expect()` statements from critical paths in the codebase and have done so on the `spec` module. The `spec` module, in particular, is reached after parsing has occurred so any invariants expressed by these `expect`s would have already been enforced or validated. Still, we've decided to tighten things even further, by raising errors instead to provide end-users with even more stability.

To further defend against re-introduction, the `spec` module now has linting annotations that prevent its content from using any code that explicitly panics.

```rust
#![deny(clippy::unwrap_used)]
#![deny(clippy::expect_used)]
#![deny(clippy::panic)]
```

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

### Remove potential panics from query plan execution ([PR #1842](https://github.com/apollographql/router/pull/1842))

Some remaining parts of the query plan execution code were using `expect()`, `unwrap()` and `panic()` to guard against assumptions
about data. These conditions have been replaced with errors which will returned in the response preventing the possibility of panics in these code paths.

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

# [1.0.0-rc.1] - 2022-09-16

> **Note**
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

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

85 changes: 0 additions & 85 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,90 +28,5 @@ By [@USERNAME](https://github.com/USERNAME) in https://github.com/apollographql/
## ❗ BREAKING ❗
## 🚀 Features
## 🐛 Fixes
### update apollo-parser to 0.2.11

Fixes error creation for missing selection sets in named operation definitions.

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

### Fix router scaffold version ([Issue #1836](https://github.com/apollographql/router/issues/1836))

Add `v` prefix to the cargo version when it's a crate version to match the git tag.

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

### Fixed extraVolumeMounts ([Issue #1824](https://github.com/apollographql/router/issues/1824))

Fixed extraVolumeMounts not be being read into the deployment template correctly.

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

### Do not fill in a skeleton object when canceling a subgraph request ([Issue #1819](https://github.com/apollographql/router/issues/1819))

in a query spanning multiple subgraphs like this:

query {
currentUser {
activeOrganization {
id
creatorUser {
name
}
}
}
}
if the user subgraph returns {"currentUser": { "activeOrganization": null }}, then the request to the organization subgraph
is cancelled, and no data should be generated, but the query planner was wrongly creating an object at the target path.

This PR also improves the usage of mocked subgraphs with `TestHarness`.

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

### Defer: default defer condition to true ([Issue #1820](https://github.com/apollographql/router/issues/1820))

According to the defer specification, defer conditions are mandatory and default to true.
We fixed a bug where the default value wasn't initialized properly.

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

### Support query plans with empty primary subselections ([Issue #1778](https://github.com/apollographql/router/issues/1778))

When a query with `@defer` would result in an empty primary response, the router was returning
an error in interpreting the query plan. It is now using the query plan properly, and detects
more precisely queries containing `@defer`.

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

## 🛠 Maintenance

### Add more compilation gates to delete useless warnings ([PR #1830](https://github.com/apollographql/router/pull/1830))

Add more gates (for `console` feature) to not have warnings when using `--all-features`.

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

### Deny panic, unwrap and expect in the spec module ([Issue #1844](https://github.com/apollographql/router/pull/1844))

As we are progressing towards 1.0, we are progressively banning `unwrap()` and `expect()` from the critical parts of the codebase.

This codepath is exercised after Parsing has happened, so invariants expressed by `expect`s would always have been enforced or checked before. However we decided to tighten the router even further, by raising errors instead, which will provide users with even more stability guarantees.

The spec module now has gates that prevent its content from using code that explicitly panics.

```rust
#![deny(clippy::unwrap_used)]
#![deny(clippy::expect_used)]
#![deny(clippy::panic)]
```


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

### Remove potential panics from query plan execution ([PR #1842](https://github.com/apollographql/router/pull/1842))

Some parts of the code were using `expect()`, `unwrap()` and `panic()` to guard some assumptions
about data. They are now replaced with errors returned in the response.

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

## 📚 Documentation
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.0.0-rc.1"
version = "1.0.0-rc.2"
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 = "1.0.0-rc.1"
version = "1.0.0-rc.2"
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 = "1.0.0-rc.1"
apollo-router = "1.0.0-rc.2"
{{/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.0.0-rc.1"}
apollo-router-scaffold = { git="https://github.com/apollographql/router.git", tag="v1.0.0-rc.2"}
{{/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.0.0-rc.1"
version = "1.0.0-rc.2"
authors = ["Apollo Graph, Inc. <[email protected]>"]
repository = "https://github.com/apollographql/router/"
documentation = "https://www.apollographql.com/docs/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.0.0-rc.1
image: ghcr.io/apollographql/router:v1.0.0-rc.2
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.0.0-rc.1
image: ghcr.io/apollographql/router:v1.0.0-rc.2
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.0.0-rc.1
image: ghcr.io/apollographql/router:v1.0.0-rc.2
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.: `v1.0.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.0.0-rc.2`

## 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 v1.0.0-rc.1
build_docker_image.sh -b v1.0.0-rc.2
Example 3: Building commit hash from the repo
build_docker_image.sh -b 1c220d35acf9ad2537b8edc58c498390b6701d3d
Example 4: Building tag v1.0.0-rc.1 from the released tarball
build_docker_image.sh v1.0.0-rc.1
Example 4: Building tag v1.0.0-rc.2 from the released tarball
build_docker_image.sh v1.0.0-rc.2
```
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 f4e5263

Please sign in to comment.