chore: log deprecation for unused DDP methods without a REST replacement#40657
chore: log deprecation for unused DDP methods without a REST replacement#40657ggazzo wants to merge 1 commit into
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #40657 +/- ##
========================================
Coverage 69.64% 69.65%
========================================
Files 3339 3339
Lines 123269 123295 +26
Branches 21993 21961 -32
========================================
+ Hits 85854 85881 +27
- Misses 34045 34057 +12
+ Partials 3370 3357 -13
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
9b19f90 to
57465b2
Compare
… replacement Audit cross-check against /v1/ routes found 33 more orphan methods that already have an equivalent REST endpoint. Adding the deprecation log ensures any runtime caller (server-side, SDKs, mobile) sees the warning before the method is removed in 9.0.0. Moved from #40657 (originally classified 'no REST replacement') after re-validating each entry against packages/rest-typings and apps/meteor/app/api/server/v1.
Adds methodDeprecationLogger.method('NAME', '9.0.0', []) inside each
Meteor.methods body for orphan DDP methods that genuinely lack a
REST equivalent. Methods covered (26 total in 21 files):
cloud:* (5 OAuth/registration internals), crowd_*, addSamlService,
addWebdavAccountByToken, botRequest, checkFederationConfiguration,
getRoomJoinCode (joinCode field not exposed via REST), getS3FileUrl,
joinDefaultChannels, loadLocale, messages/get (publication, not
method), OAuth.retrieveCredential (iframe-login), OEmbedCacheCleanup,
openRoom, push_test, removeSlackBridgeChannelLinks, resetIrcConnection,
restart_server, rocketchatSearch.suggest, saveAudioNotificationValue,
sendSMTPTestEmail.
Companion to #40654 which covers orphan methods with a REST replacement.
Refs: ARCH-2159
ff068a8 to
34fc11c
Compare
Summary
Adds
methodDeprecationLogger.method(name, '9.0.0', [])to every orphan Meteor (DDP) method that does not have a REST endpoint to migrate callers to. The log line warns external clients that the method will be removed in 9.0.0 without pointing at a substitute.Companion PR layout:
/v1/...).release-9.0.0.useEndpoint/sdk.rest.*.Used methods without a REST replacement are not in this PR. The deprecation logger throws under
TEST_MODE, so deprecating a live method breaks the test suite. Those methods either need a new REST endpoint first or stay registered until 9.0.0 cleanup.Scope
71 deprecation calls across 62 files. Each call sits above a
// @deprecatedJSDoc on the implementation so editors strike through the method name. Files already had their imports pruned and were not deleted (the implementations still ship — only the log line is new).Caveats
useMethod(value)(adminMethodActionInput.tsx) or the/v1/method.call/:methodREST proxy can look orphan but are still reachable. Their entries are on the skip list and not deprecated here.Test plan