Skip to content

Commit

Permalink
Merge branch 'dev' into geal/more-integration-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal authored Oct 3, 2024
2 parents 4261715 + e91a612 commit 37f96ca
Show file tree
Hide file tree
Showing 86 changed files with 980 additions and 1,950 deletions.
8 changes: 0 additions & 8 deletions .changesets/chore_update_router_bridge.md

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

5 changes: 5 additions & 0 deletions .changesets/maint_feature_rhaitelemetry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Added telemetry for Rhai usage ([PR #6027](https://github.com/apollographql/router/pull/6027))

Added telemetry for Rhai usage

By [@andrewmcgivery](https://github.com/andrewmcgivery) in https://github.com/apollographql/router/pull/6027
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ commands:
equal: [ *arm_linux_test_executor, << parameters.platform >> ]
steps:
- run:
name: Install nightly-2024-09-22 Rust to build the fuzzers
name: Install nightly Rust to build the fuzzers
command: |
rustup install nightly-2024-09-22
rustup install nightly
install_extra_tools:
steps:
Expand Down Expand Up @@ -524,7 +524,7 @@ commands:
path: ./target/nextest/ci/junit.xml
fuzz_build:
steps:
- run: cargo +nightly-2024-09-22 fuzz build
- run: cargo +nightly fuzz build

jobs:
lint:
Expand Down
1 change: 1 addition & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
paths = [
'''^apollo-router\/src\/.+\/testdata\/.+''',
'''^apollo-router\/tests\/snapshots\/apollo_otel_traces__.+\.snap$''',
"docs/source/configuration/entity-caching.mdx"
]

[[ rules ]]
Expand Down
114 changes: 114 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,127 @@ 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.56.0] - 2024-10-01

> [!IMPORTANT]
> If you have enabled [Distributed query plan caching](https://www.apollographql.com/docs/router/configuration/distributed-caching/#distributed-query-plan-caching), this release changes the hashing algorithm used for the cache keys. On account of this, you should anticipate additional cache regeneration cost when updating between these versions while the new hashing algorithm comes into service.

## 🚀 Features

## Native query planner is now in public preview

The native query planner is now in public preview. You can configure the `experimental_query_planner_mode` option in the router configuration YAML to change the mode of the native query planner. The following modes are available:

- `new`: Enable _only_ the new Rust-native query planner in the hot-path of query execution.
- `legacy`: Enable _only_ the legacy JavaScript query planner in the hot-path of query execution.
- `both_best_effort`: Enables _both_ the new and legacy query planners. They are configured in a comparison-based mode of operation with the legacy planner in the hot-path and the and the new planner in the cold-path. Comparisons are made between the two plans on a sampled basis and metrics are available to analyze the differences in aggregate.

### Support loading Apollo key from file ([PR #5917](https://github.com/apollographql/router/pull/5917))

You can now specific the location to a file containing the Apollo key that's used by Apollo Uplink and usage reporting. The router now supports both the `--apollo-key-path` CLI argument and the `APOLLO_KEY_PATH` environment variable for passing the file containing your Apollo key.

Previously, the router supported only the `APOLLO_KEY` environment variable to provide the key. The new CLI argument and environment variable help users who prefer not to pass sensitive keys through environment variables.

Note: This feature is unavailable for Windows.

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


## 🐛 Fixes

### Prevent sending internal `apollo_private.*` attributes to Jaeger collector ([PR #6033](https://github.com/apollographql/router/pull/6033))

When using the router's Jaeger collector to send traces, you will no longer receive span attributes with the `apollo_private.` prefix. Those attributes were incorrectly sent, as that prefix is reserved for internal attributes.

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

### Fix displaying custom event attributes on subscription events ([PR #6033](https://github.com/apollographql/router/pull/6033))

The router now properly displays custom event attributes that are set with selectors at the supergraph level.

An example configuration:

```yaml title=router.yaml
telemetry:
instrumentation:
events:
supergraph:
supergraph.event:
message: supergraph event
on: event_response # on every supergraph event (like subscription event for example)
level: info
attributes:
test:
static: foo
response.data:
response_data: $ # Display all the response data payload
response.errors:
response_errors: $ # Display all the response errors payload
```

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

### Update to Federation v2.9.2 ([PR #6069](https://github.com/apollographql/router/pull/6069))

This release updates to Federation v2.9.2, with a small fix to the internal `__typename` optimization and a fix to prevent argument name collisions in the `@context`/`@fromContext` directives.

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

## 📃 Configuration

### Add metrics for Rust vs. Deno configuration values ([PR #6056](https://github.com/apollographql/router/pull/6056))

To help track the migration from JavaScript (Deno) to native Rust implementations, the router now reports the values of the following configuration options to Apollo:

- `apollo.router.config.experimental_query_planner_mode`
- `apollo.router.config.experimental_introspection_mode`

By [@goto-bus-stop](https://github.com/goto-bus-stop) in https://github.com/apollographql/router/pull/6056



# [1.55.0] - 2024-09-24

> [!IMPORTANT]
> If you have enabled [Distributed query plan caching](https://www.apollographql.com/docs/router/configuration/distributed-caching/#distributed-query-plan-caching), this release changes the hashing algorithm used for the cache keys. On account of this, you should anticipate additional cache regeneration cost when updating between these versions while the new hashing algorithm comes into service.

## 🚀 Features

### Entity cache invalidation preview ([PR #5889](https://github.com/apollographql/router/pull/5889))

> ⚠️ This is a preview for an [Enterprise feature](https://www.apollographql.com/blog/platform/evaluating-apollo-router-understanding-free-and-open-vs-commercial-features/) of the Apollo Router. It requires an organization with a [GraphOS Enterprise plan](https://www.apollographql.com/pricing/). If your organization doesn't currently have an Enterprise plan, you can test out this functionality with a [free Enterprise trial](https://studio.apollographql.com/signup?type=enterprise-trial).
>
> As a preview feature, it's subject to our [Preview launch stage](https://www.apollographql.com/docs/resources/product-launch-stages/#preview) expectations and configuration and performance may change in future releases.

As a follow up to the Entity cache preview that was published in the router 1.46.0 release, we're introducing a new feature that allows you to invalidate cached entries.

This introduces two ways to invalidate cached entries:
- through an HTTP endpoint exposed by the router
- via GraphQL response `extensions` returned from subgraph requests

The invalidation endpoint can be defined in the router's configuration, as follows:

```yaml
preview_entity_cache:
enabled: true

# global invalidation configuration
invalidation:
# address of the invalidation endpoint
# this should only be exposed to internal networks
listen: "127.0.0.1:3000"
path: "/invalidation"
```

Invalidation requests can target cached entries by:
- subgraph name
- subgraph name and type name
- subgraph name, type name and entity key

You can learn more about invalidation in the [documentation](https://www.apollographql.com/docs/router/configuration/entity-caching#entity-cache-invalidation).

By [@bnjjj](https://github.com/bnjjj),[@bryncooke](https://github.com/bryncooke), [@garypen](https://github.com/garypen), [@Geal](https://github.com/Geal), [@IvanGoncharov](https://github.com/IvanGoncharov) in https://github.com/apollographql/router/pull/5889

### Support aliasing standard attributes for telemetry ([Issue #5930](https://github.com/apollographql/router/issues/5930))

The router now supports creating aliases for standard attributes for telemetry.
Expand Down
Loading

0 comments on commit 37f96ca

Please sign in to comment.