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

chore(deps): update ghcr.io/apollographql/router docker tag to v1.40.0 #700

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 15, 2024

Mend Renovate

This PR contains the following updates:

Package Update Change
ghcr.io/apollographql/router minor v1.39.1 -> v1.40.0

Release Notes

apollographql/router (ghcr.io/apollographql/router)

v1.40.0

Compare Source

🚀 Features

GraphOS entity caching (Issue #​4478)

⚠️ This is a preview for an Enterprise feature of the Apollo Router. It requires an organization with a GraphOS Enterprise plan.

If your organization doesn't currently have an Enterprise plan, you can test out this functionality by signing up for a free Enterprise trial.

The Apollo Router can now cache fine-grained subgraph responses at the entity level, which are reusable between requests.

Caching federated GraphQL responses can be done at the HTTP level, but it's inefficient because a lot of data can be shared between different requests. The Apollo Router now contains an entity cache that works at the subgraph level: it caches subgraph responses, splits them by entities, and reuses entities across subgraph requests.
Along with reducing the cache size, the router's entity cache brings more flexibility in how and what to cache. It allows the router to store different parts of a response with different expiration dates, and link the cache with the authorization context to avoid serving stale, unauthorized data.

As a preview feature, it's subject to our Preview launch stage expectations. It doesn't support cache invalidation. We're making it available to test and gather feedback.

By @​Geal in https://github.com/apollographql/router/pull/4195

Graduate distributed query plan caching from experimental (Issue #​4575)

[Distributed query plan caching] (https://www.apollographql.com/docs/router/configuration/distributed-caching#distributed-query-plan-caching) has been validated in production deployments and is now a fully supported, non-experimental Enterprise feature of the Apollo Router.

To migrate your router configuration, replace supergraph.query_planning.experimental_cache with supergraph.query_planning.cache.

This release also adds improvements to the distributed cache:
1. The . separator is replaced with : in the Redis cache key to align with conventions.
2. The cache key length is reduced.
3. A federation version is added to the cache key to prevent confusion when routers with different federation versions (and potentially different ways to generate a query plan) target the same cache.
4. Cache insertion is moved to a parallel task. Once the query plan is created, this allows a request to be processed immediately instead of waiting for cache insertion to finish. This improvement has also been applied to the APQ cache.

By @​Geal in https://github.com/apollographql/router/pull/4583

Replace selector to extract body elements from subgraph responses via JSONPath (Issue #​4443)

The subgraph_response_body selector has been deprecated and replaced with selectors for a response body's constituent elements: subgraph_response_data and subgraph_response_errors.

When configuring subgraph_response_data and subgraph_response_errors, both use a JSONPath expression to fetch data or errors from a subgraph response.

An example configuration:

telemetry:
  instrumentation:
    spans:
      subgraph:
        attributes:
          "my_attribute":
            subgraph_response_data: "$.productName"
            subgraph_response_errors: "$.[0].message"

By @​bnjjj in https://github.com/apollographql/router/pull/4579

Add a .remove method for headers in Rhai

The router supports a new .remove method that enables users to remove headers in a Rhai script.

For example:

fn supergraph_service(service) {
    print("registering callbacks for operation timing");

    const request_callback = Fn("process_request");
    service.map_request(request_callback);

    const response_callback = Fn("process_response");
    service.map_response(response_callback);
}

fn process_request(request) {
    request.context["request_start"] = Router.APOLLO_START.elapsed;
}

fn process_response(response) {
    response.headers.remove("x-custom-header")
}

By @​lrlna in https://github.com/apollographql/router/pull/4632

Helm update to allow a list of gateways to VirtualService (Issue #​4464)

Configuration of the router's Helm chart has been updated to allow multiple gateways. This enables configuration of multiple gateways in an Istio VirtualService.

The previous configuration for a single virtualservice.gatewayName has been deprecated in favor of a configuration for an array of virtualservice.gatewayNames.

By @​marcantoine-bibeau in https://github.com/apollographql/router/pull/4520

Configure logging format automatically based on terminal (Issue #​4369)

You can configure the logging output format when running with an interactive shell.

If both format and tty_format are configured, then the format used depends on how the router is run:

  • If running with an interactive shell, then tty_format takes precedence.
  • If running with a non-interactive shell, then format takes precedence.

You can explicitly set the format in router.yaml with telemetry.exporters.logging.stdout.tty_format:

telemetry:
  exporters:
     logging:
       stdout:
         enabled: true
         format: json
         tty_format: text

By @​bnjjj in https://github.com/apollographql/router/pull/4567

Add configurable histogram buckets per metric (Issue #​4543)

The router supports overriding instrument settings for metrics with OpenTelemetry views. You can use views to override default histogram buckets.

Configure views with the views option. For example:

telemetry:
  exporters:
    metrics:
      common:
        service_name: apollo-router
        views:
          - name: apollo_router_http_request_duration_seconds # Instrument name you want to edit. You can use wildcard in names. If you want to target all instruments just use '*'
            unit: "ms" # (Optional) override the unit
            description: "my new description of this metric" # (Optional) override the description
            aggregation: # (Optional)
              histogram:
                buckets: # Override default buckets configured for this histogram
                - 1
                - 2
                - 3
                - 4
                - 5
            allowed_attribute_keys: # (Optional) Keep only listed attributes on the metric
            - status

By @​bnjjj in https://github.com/apollographql/router/pull/4572

🐛 Fixes

Fix active_session_count when future is dropped (Issue #​4601)

Fixes an issue where apollo_router_session_count_active would increase indefinitely due
to the request future getting dropped before a counter could be decremented.

By @​xuorig in https://github.com/apollographql/router/pull/4619


Configuration

📅 Schedule: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot enabled auto-merge (rebase) February 15, 2024 00:53
@renovate renovate bot merged commit 137fedb into main Feb 15, 2024
6 checks passed
@renovate renovate bot deleted the renovate/apollo-graphql-packages branch February 15, 2024 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants