Skip to content

Commit

Permalink
Promote next branch to dev; make 2.x our default development bran…
Browse files Browse the repository at this point in the history
…ch (#6576)
  • Loading branch information
garypen authored Jan 20, 2025
2 parents 95501ca + ab33ab0 commit c389c8d
Show file tree
Hide file tree
Showing 766 changed files with 61,132 additions and 14,850 deletions.
6 changes: 6 additions & 0 deletions .changesets/breaking_lb_next_apollo_otel_default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Default to Apollo reporting over OTel ([PR #5741](https://github.com/apollographql/router/pull/5741))

BREAKING CHANGE: This change will cause traces in Apollo Studio to appear differently


By [@lennyburdette](https://github.com/lennyburdette) in https://github.com/apollographql/router/pull/5741
7 changes: 7 additions & 0 deletions .changesets/config_apollo_reporting_defaults.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Changed Apollo reporting defaults ([PR #5975](https://github.com/apollographql/router/pull/5975))

Changed the defaults of the Apollo metrics reporting defaults.
* `telemetry.apollo.signature_normalization_algorithm` now defaults to `enhanced`
* `telemetry.apollo.metrics_reference_mode` now defaults to `extended`

By [@bonnici](https://github.com/bonnici) in https://github.com/apollographql/router/pull/5975
11 changes: 11 additions & 0 deletions .changesets/config_garypen_promote_otel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### promote experimental_otlp_tracing_sampler from experimental ([PR #6070](https://github.com/apollographql/router/pull/6070))

The router's otlp tracing sampler feature that was previously [experimental](https://www.apollographql.com/docs/resources/product-launch-stages/#experimental-features) is now [generally available](https://www.apollographql.com/docs/resources/product-launch-stages/#general-availability).

If you used its experimental configuration, you should migrate to the new configuration option:

* `telemetry.apollo.experimental_otlp_tracing_sampler` is now `telemetry.apollo.otlp_tracing_sampler`

The experimental configuration option is now deprecated. It remains functional but will log warnings.

By [@garypen](https://github.com/garypen) in https://github.com/apollographql/router/pull/6070
33 changes: 33 additions & 0 deletions .changesets/fix_error_locations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
### Gracefully handle subgraph response with `-1` values inside error locations ([PR #5633](https://github.com/apollographql/router/pull/5633))

[GraphQL specification requires](https://spec.graphql.org/draft/#sel-GAPHRPFCCaCGX5zM) that both "line" and "column" are positive numbers.
However GraphQL Java and GraphQL Kotlin use `{ "line": -1, "column": -1 }` value if they can't determine error location inside query.

This change makes Router to gracefully handle such responses by ignoring such invalid locations.

As an example, if subgraph respond with:
```json
{
"data": { "topProducts": null },
"errors": [{
"message":"Some error on subgraph",
"locations": [
{ "line": -1, "column": -1 },
],
"path":["topProducts"]
}]
}
```

Router will return following to a client:
```json
{
"data": { "topProducts": null },
"errors": [{
"message":"Some error on subgraph",
"path":["topProducts"]
}]
}
```

By [@IvanGoncharov](https://github.com/IvanGoncharov) in https://github.com/apollographql/router/pull/5633
5 changes: 5 additions & 0 deletions .changesets/maint_renee_migrate_metrics_histograms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Migrate histogram metrics to `{f,u}64_histogram!` ([PR #6356](https://github.com/apollographql/router/pull/6356))

Updates histogram metrics using the legacy `tracing::info!(histogram.*)` syntax to the new metrics macros.

By [@goto-bus-stop](https://github.com/goto-bus-stop) in https://github.com/apollographql/router/pull/6356
6 changes: 3 additions & 3 deletions .changesets/maint_renee_migrate_metrics_values.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Migrate various metrics to OTel instruments ([PR #6476](https://github.com/apollographql/router/pull/6476), [PR #6356](https://github.com/apollographql/router/pull/6356), [PR #6539](https://github.com/apollographql/router/pull/6539))
### Migrate gauge metrics to OTel instruments ([PR #6476](https://github.com/apollographql/router/pull/6476))

Various metrics using our legacy mechanism based on the `tracing` crate are migrated to OTel instruments.
Updates gauge metrics using the legacy `tracing::info!(value.*)` syntax to OTel instruments.

By [@goto-bus-stop](https://github.com/goto-bus-stop) in https://github.com/apollographql/router/pull/6476, https://github.com/apollographql/router/pull/6356, https://github.com/apollographql/router/pull/6539
By [@goto-bus-stop](https://github.com/goto-bus-stop) in https://github.com/apollographql/router/pull/6476
57 changes: 43 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,34 @@ orbs:
executors:
amd_linux_build: &amd_linux_build_executor
docker:
- image: cimg/base:stable
- image: cimg/base:current
resource_class: xlarge
environment:
CARGO_BUILD_JOBS: 4
RUST_TEST_THREADS: 6
amd_linux_helm: &amd_linux_helm_executor
docker:
- image: cimg/base:stable
- image: cimg/base:current
resource_class: small
amd_linux_test: &amd_linux_test_executor
docker:
- image: cimg/base:stable
- image: cimg/base:current
- image: cimg/redis:7.4.1
- image: jaegertracing/all-in-one:1.54.0
- image: openzipkin/zipkin:3.4.3
- image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.17.0
resource_class: xlarge
resource_class: 2xlarge
environment:
CARGO_BUILD_JOBS: 4
arm_linux_build: &arm_linux_build_executor
machine:
image: ubuntu-2004:2024.01.1
docker:
- image: cimg/base:current
resource_class: arm.large
environment:
CARGO_BUILD_JOBS: 8
arm_linux_test: &arm_linux_test_executor
machine:
image: ubuntu-2004:2024.01.1
docker:
- image: cimg/base:current
resource_class: arm.xlarge
environment:
CARGO_BUILD_JOBS: 8
Expand Down Expand Up @@ -82,6 +82,10 @@ parameters:
protoc_version:
type: string
default: "21.8"
# note the cmake version is only used for manual installs, not for installs from a package manager like apt or homebrew
cmake_version:
type: string
default: "3.31.1"
nightly:
type: boolean
default: false
Expand Down Expand Up @@ -233,9 +237,29 @@ commands:
command: |
if [[ ! -d "$HOME/.deb" ]]; then
mkdir $HOME/.deb
sudo apt-get --download-only -o Dir::Cache="$HOME/.deb" -o Dir::Cache::archives="$HOME/.deb" install libssl-dev libdw-dev
sudo apt-get update
sudo apt-get --download-only -o Dir::Cache="$HOME/.deb" -o Dir::Cache::archives="$HOME/.deb" install build-essential libssl-dev libdw-dev
fi
sudo dpkg -i $HOME/.deb/*.deb
- when:
condition:
or:
- equal: [ *windows_build_executor, << parameters.platform >> ]
- equal: [ *windows_test_executor, << parameters.platform >> ]
steps:
- run:
name: Install CMake
command: |
mkdir -p "$HOME/.local"
if [[ ! -f "$HOME/.local/bin/cmake" ]]; then
curl -L https://github.com/Kitware/CMake/releases/download/v<< pipeline.parameters.cmake_version >>/cmake-<< pipeline.parameters.cmake_version >>-windows-x86_64.zip --output cmake.zip
# The zip file has a root directory, so we put it somewhere else first before placing the files in .local
unzip cmake.zip -d /tmp > /dev/null
cp /tmp/cmake-<< pipeline.parameters.cmake_version >>-windows-x86_64/* -R "$HOME/.local"
fi
cmake --version
install_protoc:
parameters:
platform:
Expand Down Expand Up @@ -483,7 +507,11 @@ commands:
environment:
# Use the settings from the "ci" profile in nextest configuration.
NEXTEST_PROFILE: ci
command: xtask test --workspace --locked --features ci,hyper_header_limits
# Temporary disable lib backtrace since it crashing on MacOS
# TODO: remove this workaround once we update to Xcode >= 15.1.0
# See: https://github.com/apollographql/router/pull/5462
RUST_LIB_BACKTRACE: 0
command: xtask test --workspace --locked --features ci,snapshot
- run:
name: Delete large files from cache
command: |
Expand Down Expand Up @@ -696,10 +724,10 @@ jobs:
- run: cargo xtask release prepare nightly
- run:
command: >
cargo xtask dist --target aarch64-apple-darwin --features hyper_header_limits
cargo xtask dist --target aarch64-apple-darwin
- run:
command: >
cargo xtask dist --target x86_64-apple-darwin --features hyper_header_limits
cargo xtask dist --target x86_64-apple-darwin
- run:
command: >
mkdir -p artifacts
Expand Down Expand Up @@ -759,7 +787,7 @@ jobs:
- run: cargo xtask release prepare nightly
- run:
command: >
cargo xtask dist --features hyper_header_limits
cargo xtask dist
- run:
command: >
mkdir -p artifacts
Expand Down Expand Up @@ -902,7 +930,7 @@ jobs:
publish_github_release:
docker:
- image: cimg/base:stable
- image: cimg/base:current
resource_class: small
environment:
<<: *common_job_environment
Expand Down Expand Up @@ -1192,3 +1220,4 @@ workflows:
- secops-oidc
- github-orb
git-base-revision: <<#pipeline.git.base_revision>><<pipeline.git.base_revision>><</pipeline.git.base_revision >>
disabled-signatures: "rules.providers.semgrep.security.javascript.lang.security.detect-insecure-websocket"
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/docs/ @apollographql/docs
/.changesets/ @apollographql/docs
/apollo-federation/ @dariuszkuc @sachindshinde @goto-bus-stop @SimonSapin @lrlna @TylerBloom @duckki
/apollo-federation/src/sources/connect/json_selection @benjamn
/apollo-federation/src/sources/connect @apollographql/connectors
/apollo-router/ @apollographql/polaris @apollographql/atlas
/apollo-router/src/plugins/connectors @apollographql/connectors
/apollo-router-benchmarks/ @apollographql/polaris @apollographql/atlas
/apollo-router-scaffold/ @apollographql/polaris @apollographql/atlas
/examples/ @apollographql/polaris @apollographql/atlas
Expand Down
46 changes: 41 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,47 @@ 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).

# [2.0.0-preview.0] - 2024-10-01

Learn more about [migrating from 1.x to 2.0](https://www.apollographql.com/docs/graphos/reference/migration/from-router-v1).

## 🚀 Features

### Apollo Connectors Public Preview

[Apollo Connectors](https://go.apollo.dev/connectors) are a new declarative programming model for GraphQL, allowing you to plug your existing REST services directly into your graph.

```graphql
type Query {
posts(first: Int): [Post]
@connect(
http: { GET: "https://my.api/posts?limit={$args.first}" }
selection: "$.results { id title body }"
)
}
```

Apollo Connectors are available for Enterprise and free GraphOS Trial accounts. Get started with the [Connectors Quickstart](https://go.apollo.dev/connectors/quickstart) and visit the ["connectors" tag on the community forums](https://community.apollographql.com/tag/connectors) to leave feedback during the preview.

### Apollo operation usage reporting via OTLP

The router supports reporting operation usage metrics to GraphOS via OpenTelemetry Protocol (OTLP).

Prior to version 1.49.0 of the router, all GraphOS reporting was performed using a private tracing format. In v1.49.0, we introduced support for using OTEL to perform this reporting. In v1.x, this is controlled using the experimental_otlp_tracing_sampler flag, and it's disabled by default.

Now in v2.x, this flag is renamed to otlp_tracing_sampler, and it's enabled by default.

Learn more about configuring [usage reporting via OTLP](https://www.apollographql.com/docs/graphos/routing/graphos-reporting#usage-reporting-via-opentelemetry-protocol-otlp).

## 📃 Configuration

### Metrics reporting defaults

Default values of some GraphOS reporting metrics have been changed from v1.x to the following in v2.x:

* `telemetry.apollo.signature_normalization_algorithm` now defaults to `enhanced`. (In v1.x the default is `legacy`.)
* `telemetry.apollo.metrics_reference_mode` now defaults to `extended`. (In v1.x the default is `standard`.)

# [1.59.1] - 2025-01-08

## 🐛 Fixes
Expand Down Expand Up @@ -321,7 +362,6 @@ The deprecated metrics will continue to work in the 1.x release line.
By [@goto-bus-stop](https://github.com/goto-bus-stop) in https://github.com/apollographql/router/pull/6350



# [1.58.1] - 2024-12-05

> [!IMPORTANT]
Expand All @@ -344,8 +384,6 @@ The native query planner now correctly sets two experimental configuration optio

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



# [1.58.0] - 2024-11-27

> [!IMPORTANT]
Expand Down Expand Up @@ -652,8 +690,6 @@ This fixes an issue in progressive override where the override labels were not t

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



# [1.57.0] - 2024-10-22

> [!IMPORTANT]
Expand Down
Loading

0 comments on commit c389c8d

Please sign in to comment.