-
Notifications
You must be signed in to change notification settings - Fork 275
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
release: v0.16.0 #1566
release: v0.16.0 #1566
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes we have pattern like By [...](...) in URL_OF_THE_PR
what's the good way ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 @mention
s 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. 😭 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial comments before I circle back later. Looking good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to run step 7 of the release checklist (helm-docs) to make sure the various helm documents are updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of suggested grammatical nits, but hopefully easy to accept/tweak. Thanks for running this, @Geal!
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with the proviso that we could still do what @abernix suggested and modify the helm version to be the same as the appVersion. It might upset some helm users, but I doubt it will.
#1566 Co-authored-by: Jesse Rosenberger <git@jro.cc> Co-authored-by: Gary Pennington <gary@apollographql.com>
❗ BREAKING ❗
Remove QueryPlannerService (PR #1552)
This service was redundant, since anything done as part of the
QueryPlannerService
could be done either at theSupergraphService
or at theExecutionService
level.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_deduplication
configuration option is renamed todeduplicate_variables
.query_deduplication
configuration option is renamed todeduplicate_query
.By @garypen
Put
query_plan_options
in private and wrapQueryPlanContent
in an opaque type (PR #1486)QueryPlanOptions::query_plan_options
is no longer available in public.By @bnjjj in #1486
Removed
delay_interval
in 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::Mock
in 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_clone
call 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
→SchemaSource
SchemaKind::String(String)
→SchemaSource::Static { schema_sdl: String }
ConfigurationKind
→ConfigurationSource
ConfigurationKind::Instance
→ConfigurationSource::Static
ShutdownKind
→ShutdownSource
ApolloRouter
→RouterHttpServer
In the
apollo_router::plugin::Plugin
trait:router_service
→supergraph_service
In the
apollo_router::services
module, to new public sub-modules:SupergraphRequest
→supergraph::Request
SupergraphResponse
→supergraph::Response
ExecutionRequest
→execution::Request
ExecutionResponse
→execution::Response
SubgraphRequest
→subgraph::Request
SubgraphResponse
→subgraph::Response
For convenience, these new sub-modules each contain type aliases
base on their respective
Request
andResponse
types.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::serve
method and its return typeRouterHandle
were removed,their functionality merged into
RouterHttpServer
(formerlyApolloRouter
).The builder for
RouterHttpServer
now ends with astart
method instead ofbuild
.This method immediatly starts the server in a new Tokio task.
By @SimonSapin
router_builder_fn
replaced byshutdown
in theExecutable
builder (PR #1487)The builder for
apollo_router::Executable
had arouter_builder_fn
methodallowing 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
ShutdownSource
parameter,so
router_builder_fn
was replaced with a newshutdown
method 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
buildstructor
crateto 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
graphql
module.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::graphql
then use qualified paths such as
graphql::Request
.This can help disambiguate when multiple types share a name.
By @SimonSapin
RouterRequest::fake_builder
defaults toContent-Type: application/json
(PR #1487)apollo_router::services::RouterRequest
has a builder for creating a “fake” request during tests.When no
Content-Type
header 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-Type
header,this default can be removed from a
RouterRequest
after building it:By @SimonSapin
Plugins return a service for custom endpoints (Issue #1481)
Rust plugins can implement the
Plugin::custom_endpoint
trait methodto handle some non-GraphQL HTTP requests.
Previously, the return type of this method was
Option<apollo_router::plugin::Handler>
,where a
Handler
could be created with:Handler
has been removed from the public API, now plugins return aBoxService
directly instead.Additionally, the type for HTTP request and response bodies was changed
from
bytes::Bytes
tohyper::Body
(which is more flexible, for example can be streamed).Changes needed if using custom enpoints are:
Handler::new(service)
withservice
use
hyper::body::to_bytes
or
hyper::body::aggregate
.Body
can 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
shutdown
forRouterHttpServer
handle (PR #1487)If you explicitly create a
RouterHttpServer
handle,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
shutdown
async method can be called explicitlyto obtain a
Result
: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_response
method is now available for the router service and executionservice in Rhai. When using the
@defer
directive, we get the data in a serie of graphqlresponses. The first one is available with the
map_response
method, 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
@defer
directive if it was activated in the configuration file.By @Geal in #1557
Support the incremental response field (PR #1551)
Recent changes in the
@defer
specification now mandate that the deferred responses are transmittedas an array in the new
incremental
field 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.html
file 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