Conversation
CHANGELOG.md
Outdated
|
|
||
| This service was redundant, since anything done as part of the `QueryPlannerService` could be done either at the `SupergraphService` or at the `ExecutionService` level. | ||
|
|
||
| By [@o0Ignition0o](https://github.com/o0Ignition0o) |
There was a problem hiding this comment.
Sometimes we have pattern like By [...](...) in URL_OF_THE_PR what's the good way ?
There was a problem hiding this comment.
I thought it was there to show the list of contributors in the release page, but the last time it worked was for 0.14?
@abernix any context on that?
There was a problem hiding this comment.
I suggested the in URL_OF_THE_PR on a lot of the requests below. Unfortunately, to make the contributors list work, this format has to be edited manually searched and replaced be real @mentions when copying and pasting the contents into the GitHub release. So yet another thing to automate.
(The other side of the coin is that, frustratingly, bare @mentions don't work in the CHANGELOG.md itself, which is why the link format is nice so it's clickable — and to keep track of the authors. 😭 )
abernix
left a comment
There was a problem hiding this comment.
Some initial comments before I circle back later. Looking good!
garypen
left a comment
There was a problem hiding this comment.
Need to run step 7 of the release checklist (helm-docs) to make sure the various helm documents are updated.
Co-authored-by: Jesse Rosenberger <git@jro.cc> Co-authored-by: Gary Pennington <gary@apollographql.com>
Co-authored-by: Jesse Rosenberger <git@jro.cc>
|
That's fine. I imagine it was run as part of the merge when changes were made. |
❗ BREAKING ❗
Remove QueryPlannerService (PR #1552)
This service was redundant, since anything done as part of the
QueryPlannerServicecould be done either at theSupergraphServiceor at theExecutionServicelevel.By @o0Ignition0o
Rename map_future_with_context to map_future_with_request_data (PR #1547)
The function is not very well named since it's in fact used to extract any data from a request for use in a future. This rename makes it clear.
By @garypen
Rename traffic shaping deduplication options (PR #1540)
In the traffic shaping module:
variables_deduplicationconfiguration option is renamed todeduplicate_variables.query_deduplicationconfiguration option is renamed todeduplicate_query.By @garypen
Put
query_plan_optionsin private and wrapQueryPlanContentin an opaque type (PR #1486)QueryPlanOptions::query_plan_optionsis no longer available in public.By @bnjjj in #1486
Removed
delay_intervalin telemetry configuration. (PR #1498)It was doing nothing.
By @SimonSapin
Remove telemetry configuration hot reloading (PR #1463)
Configuration hot reloading is not very useful for telemetry, and is the
source of regular bugs that are hard to fix.
This removes the support for configuration reloading entirely. Now, the
router will reject a configuration reload with an error log if the
telemetry configuration changed.
It is now possible to create a subscriber and pass it explicitely to the telemetry plugin
when creating it. It will then be modified to integrate the telemetry plugin's layer.
By @geal in #1463
Reorder query planner execution (PR #1484)
Query planning is deterministic, it only depends on the query, operation name and query planning
options. As such, we can cache the result of the entire process.
This changes the pipeline to apply query planner plugins between the cache and the bridge planner,
so those plugins will only be called once on the same query. If changes must be done per query,
they should happen in a supergraph service.
By @Geal in #1464
Remove Buffer from Mock*Service (PR #1440
This removes the usage of
tower_test::mock::Mockin mocked services because it isolated the service in a taskso panics triggered by mockall were not transmitted up to the unit test that should catch it.
This rewrites the mocked services API to remove the
build()method, and make them clonable if needed,using an
expect_clonecall with mockall.By @Geal in #1440
Some items were renamed or moved (PR #1487 PR #1534 PR #1555 PR #1563)
At the crate root:
SchemaKind→SchemaSourceSchemaKind::String(String)→SchemaSource::Static { schema_sdl: String }ConfigurationKind→ConfigurationSourceConfigurationKind::Instance→ConfigurationSource::StaticShutdownKind→ShutdownSourceApolloRouter→RouterHttpServerIn the
apollo_router::plugin::Plugintrait:router_service→supergraph_serviceIn the
apollo_router::servicesmodule, to new public sub-modules:SupergraphRequest→supergraph::RequestSupergraphResponse→supergraph::ResponseExecutionRequest→execution::RequestExecutionResponse→execution::ResponseSubgraphRequest→subgraph::RequestSubgraphResponse→subgraph::ResponseFor convenience, these new sub-modules each contain type aliases
base on their respective
RequestandResponsetypes.Migration example:
By @SimonSapin
Some items were removed from the public API (PR #1487 PR #1535)
If you used some of them and don’t find a replacement,
please file an issue
with details about the use case.
By @SimonSapin
Router startup API changes (PR #1487)
The
RouterHttpServer::servemethod and its return typeRouterHandlewere removed,their functionality merged into
RouterHttpServer(formerlyApolloRouter).The builder for
RouterHttpServernow ends with astartmethod instead ofbuild.This method immediatly starts the server in a new Tokio task.
RouterHttpServer::builder() .configuration(configuration) .schema(schema) - .build() - .serve() + .start() .awaitBy @SimonSapin
router_builder_fnreplaced byshutdownin theExecutablebuilder (PR #1487)The builder for
apollo_router::Executablehad arouter_builder_fnmethodallowing to specify how a
RouterHttpServer(previouslyApolloRouter) was to be createdwith a provided configuration and schema.
The only possible variation there was specifying when the server should shut down
with a
ShutdownSourceparameter,so
router_builder_fnwas replaced with a newshutdownmethod that takes that.By @SimonSapin
Removed constructors when there is a public builder (PR #1487)
Many types in the Router API can be constructed with the builder pattern.
We use the
buildstructorcrateto auto-generate builder boilerplate based on the parameters of a constructor.
These constructors have been made private so that users must go through the builder instead,
which will allow us to add parameters in the future without a breaking API change.
If you were using one of these constructors, the migration generally looks like this:
By @SimonSapin
Removed deprecated type aliases (PR #1487)
A few versions ago, some types were moved from the crate root to a new
graphqlmodule.To help the transition, type aliases were left at the old location with a deprecation warning.
These aliases are now removed, remaining imports must be changed to the new location:
Alternatively, import the module with
use apollo_router::graphqlthen use qualified paths such as
graphql::Request.This can help disambiguate when multiple types share a name.
By @SimonSapin
RouterRequest::fake_builderdefaults toContent-Type: application/json(PR #1487)apollo_router::services::RouterRequesthas a builder for creating a “fake” request during tests.When no
Content-Typeheader is specified, this builder will now default toapplication/json.This will help tests where a request goes through mandatory plugins including CSRF protection.
which makes the request be accepted by CSRF protection.
If a test requires a request specifically without a
Content-Typeheader,this default can be removed from a
RouterRequestafter building it:By @SimonSapin
Plugins return a service for custom endpoints (Issue #1481)
Rust plugins can implement the
Plugin::custom_endpointtrait methodto handle some non-GraphQL HTTP requests.
Previously, the return type of this method was
Option<apollo_router::plugin::Handler>,where a
Handlercould be created with:Handlerhas been removed from the public API, now plugins return aBoxServicedirectly instead.Additionally, the type for HTTP request and response bodies was changed
from
bytes::Bytestohyper::Body(which is more flexible, for example can be streamed).Changes needed if using custom enpoints are:
Handler::new(service)withserviceuse
hyper::body::to_bytesor
hyper::body::aggregate.Bodycan be created through conversion traits from various types.For example:
"string".into()By @SimonSapin
🚀 Features
rhai logging functions now accept Dynamic parameters (PR #1521)
Prior to this change, rhai logging functions worked with string parameters. This change means that any valid rhai object
may now be passed as a logging parameter.
By @garypen
Reduce initial memory footprint by lazily populating introspection query cache (#1517)
In an early alpha release of the Router, we only executed certain "known" introspection queries because of prior technical constraints that prohibited us from doing something more flexible. Because the set of introspection queries was "known", it made sense to cache them.
As of #802, this special-casing is (thankfully) no longer necessary and we no longer need to know (and constrain!) the introspection queries that the Router supports.
We could have kept caching those "known" queries, however we were finding that the resulting cache size was quite large and making the Router's minimum memory footprint larger than need be since we were caching many introspection results which the Router instance would never encounter.
This change removes the cache entirely and allows introspection queries served by the Router to merely be lazily calculated and cached on-demand, thereby reducing the initial memory footprint. Disabling introspection entirely will prevent any use of this cache since no introspection will be possible.
By @o0Ignition0o
Expose query plan in extensions for GraphQL response (experimental) (PR #1470)
Expose query plan in extensions for GraphQL response. Only experimental for now, no documentation available.
By @bnjjj in #1470
Add support of global rate limit and timeout. PR #1347
Additions to the traffic shaping plugin:
By @bnjjj in #1347
Explicit
shutdownforRouterHttpServerhandle (PR #1487)If you explicitly create a
RouterHttpServerhandle,dropping it while the server is running instructs the server shut down gracefuly.
However with the handle dropped, there is no way to wait for shutdown to end
or check that it went without error.
Instead, the new
shutdownasync method can be called explicitlyto obtain a
Result:use RouterHttpServer; let server = RouterHttpServer::builder().schema("schema").start(); // … -drop(server); +server.shutdown().await.unwrap();By @SimonSapin
Added
apollo_router::TestHarness(PR #1487)This is a builder for the part of an Apollo Router that handles GraphQL requests,
as a
tower::Service.This allows tests, benchmarks, etc
to manipulate request and response objects in memory without going over the network.
See the API documentation for an example. (It can be built with
cargo doc --open.)By @SimonSapin
Remove telemetry configuration hot reloading (PR #1501)
The
map_deferred_responsemethod is now available for the router service and executionservice in Rhai. When using the
@deferdirective, we get the data in a serie of graphqlresponses. The first one is available with the
map_responsemethod, where the HTTP headersand the response body can be modified. The following responses are available through
map_deferred_response, which only has access to the response body.By @geal in #1501
🐛 Fixes
Variables validation: return a 400 if variables validation fails (#1403)
Failure to validate variables against a query and a schema will now return an HTTP 400.
By @o0Ignition0o
Expose query plan: move the behavior to the execution_service (#1541)
There isn't much use for QueryPlanner plugins. Most of the logic done there can be done in
execution_service. Moreover users could get inconsistent plugin behavior because it depends on whether the QueryPlanner cache hits or not.By @o0Ignition0o
Include usage reporting data in the context even when the query plan has been cached (#1559)
Include usage reporting data in the context even when the query plan has been cached when calling
CachingQueryPlanner.By @bnjjj in #1559
Accept SIGTERM as shutdown signal (PR #1497)
This will make containers stop faster as they will not have to wait until a SIGKILL to stop the router.
By @Geal in #1497
Set the response path for deferred responses (PR #1529)
Some GraphQL clients rely on the response path to find out which
fragment created a deferred response, and generate code that checks the
type of the value at that path.
Previously the router was generating a value that starts at the root
for every deferred response. Now it checks the path returned by the query
plan execution and creates a response for each value that matches that
path.
In particular, for deferred fragments on an ojbect inside an array, it
will create a separate response for each element of the array.
By @Geal in #1529
Activate defer support in introspection (PR #1557)
Introspection queries will now see the
@deferdirective if it was activated in the configuration file.By @Geal in #1557
Support the incremental response field (PR #1551)
Recent changes in the
@deferspecification now mandate that the deferred responses are transmittedas an array in the new
incrementalfield of the JSON response.By @Geal in #1551
🛠 Maintenance
Display licenses.html diff in CI if the check failed (#1524)
The CI check that ensures that the
license.htmlfile is up to date now displays what has changed when the file is out of sync.By @o0Ignition0o
🚀 Features
Helm: Rhai script and Istio virtualservice support (#1478)
You can now pass a Rhai script file to the helm chart.
You can also provide an Istio VirtualService configuration, as well as custom Egress rules.
Head over to the helm chart default values to get started.
By @o0Ignition0o
📚 Documentation
Clarify path parameter usage (PR #1473)
Add an inline example of path parameter usage to the section of the docs explaining that you cannot specify a wildcard in the middle of a path.
By @EverlastingBugstopper in #1473