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

Removed deprecated methods for [email protected] #6646

Open
wants to merge 22 commits into
base: dev
Choose a base branch
from

Conversation

lrlna
Copy link
Member

@lrlna lrlna commented Jan 24, 2025

The following deprecated fields are being removed:

  • services::router::Response::map()
  • router::event::schema::SchemaSource::File.delay field
  • router::event::configuration::Configuration::File.delay field
  • context::extensions::sync::ExtensionMutex::lock()
  • test_harness::TestHarness::build()
  • PluginInit::new()
  • PluginInit::try_new()

The following unsupported fields are being removed. Since they are "unsupported", I omitted them from the changeset and upgrade docs.

  • axum_factory::unsupported_set_axum_router_callback
  • PluginInit::unsupported_supergraph_schema
  • PluginInit::unsupported_subgraph_schema
  • Context::unsupported_executable_document

The following deprecated metrics are being removed:

  • apollo_require_authentication_failure_count
  • apollo_authentication_failure_count
  • apollo_authentication_success_count
  • apollo_router_deduplicated_subscriptions_total

Additionally, the callback of context::extensions::sync::ExtensionMutex 's .with_lock() function now receives &mut Extensions instead of a guard that dereferences to it. This makes a mut binding no longer necessary for the callback argument.

lrlna added 2 commits January 21, 2025 16:15
* remove services::router::Response's `.map()` function
* remove router::event::schema::SchemaSource::File's `delay` field
* remove router::event::configuration::Configuration::File's `delay` field
* remove context::extensions::sync::ExtensionMutex 's `.lock()` function

This comment has been minimized.

@router-perf
Copy link

router-perf bot commented Jan 24, 2025

CI performance tests

  • connectors-const - Connectors stress test that runs with a constant number of users
  • const - Basic stress test that runs with a constant number of users
  • demand-control-instrumented - A copy of the step test, but with demand control monitoring and metrics enabled
  • demand-control-uninstrumented - A copy of the step test, but with demand control monitoring enabled
  • enhanced-signature - Enhanced signature enabled
  • events - Stress test for events with a lot of users and deduplication ENABLED
  • events_big_cap_high_rate - Stress test for events with a lot of users, deduplication enabled and high rate event with a big queue capacity
  • events_big_cap_high_rate_callback - Stress test for events with a lot of users, deduplication enabled and high rate event with a big queue capacity using callback mode
  • events_callback - Stress test for events with a lot of users and deduplication ENABLED in callback mode
  • events_without_dedup - Stress test for events with a lot of users and deduplication DISABLED
  • events_without_dedup_callback - Stress test for events with a lot of users and deduplication DISABLED using callback mode
  • extended-reference-mode - Extended reference mode enabled
  • large-request - Stress test with a 1 MB request payload
  • no-tracing - Basic stress test, no tracing
  • reload - Reload test over a long period of time at a constant rate of users
  • step-jemalloc-tuning - Clone of the basic stress test for jemalloc tuning
  • step-local-metrics - Field stats that are generated from the router rather than FTV1
  • step-with-prometheus - A copy of the step test with the Prometheus metrics exporter enabled
  • step - Basic stress test that steps up the number of users over time
  • xlarge-request - Stress test with 10 MB request payload
  • xxlarge-request - Stress test with 100 MB request payload

@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented Jan 24, 2025

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 1 changed, 0 removed
* graphos/reference/migration/from-router-v1.mdx

Build ID: ed7c6f4af64579ce2edbc186

URL: https://www.apollographql.com/docs/deploy-preview/ed7c6f4af64579ce2edbc186

SimonSapin and others added 15 commits January 27, 2025 11:38
This is a less of a problem now that `.lock() -> ExtensionsGuard` is removed
and only `.with_lock(impl FnOnce(ExtensionsGuard))` remains:
the latter cannot keep the guard alive across `.await`

This check was flaky on CI when CPUs are busy with lots of tests running
in parallel.
Its only purpose left was to deref, so pass that reference directly instead
removes two unsupported methods in `PluginInit` interface:
* `unsupported_supergraph_schema`
* `unsupported_subgraph_schema`
…cument

Removes `unsupported_executable_document` from public implementation of `Context` and replaces it with an internal `pub(crate) executable_document`
The following deprecated metrics have been removed:
* apollo_router_deduplicated_subscriptions_total
* apollo_authentication_failure_count
* apollo_authentication_success_count
* apollo_require_authentication_failure_count
The following initialisation functions have been removed:
* PluginInit::new()
* PluginInit::try_new()
Comment on lines -272 to +270
pub fn unsupported_executable_document(&self) -> Option<Arc<Valid<ExecutableDocument>>> {
/// Read only access to the executable document for internal router plugins.
pub(crate) fn executable_document(&self) -> Option<Arc<Valid<ExecutableDocument>>> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As talked about during the huddle this morning, this was changed to a pub(crate) to let us continue using this for router's own demand control plugin.

Comment on lines -592 to -597
u64_counter!(
"apollo_authentication_failure_count",
"Number of requests with failed JWT authentication (deprecated)",
1,
kind = "JWT"
);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed several of these metrics that had deprecated notes. Let me know if this shouldn't happen.

@lrlna lrlna marked this pull request as ready for review January 27, 2025 12:55
@lrlna lrlna requested review from a team as code owners January 27, 2025 12:55
Copy link
Contributor

@garypen garypen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you may have done: https://apollographql.atlassian.net/browse/ROUTER-297 as well (although, I'm not totally sure).
Thanks for the diligent cleanup. Nice to see so much code being deleted...

@lrlna
Copy link
Member Author

lrlna commented Jan 27, 2025

I think you may have done: https://apollographql.atlassian.net/browse/ROUTER-297 as well (although, I'm not totally sure).

ooops didn't know there was a separate ticket for deprecated metrics. i don't know if i did actually remove the entire tracing macro system. @goto-bus-stop you are assigned to ROUTER-297, was there anything else that needed to be removed? should i just pause here and let you figure what needed to be done for that metrics layer clean up?

It's the PluginInit::new() method that no longer exists.
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.

5 participants