Skip to content

Conversation

@lucas-a-pelegrino
Copy link
Contributor

@lucas-a-pelegrino lucas-a-pelegrino commented Oct 13, 2025

Proposed changes (including videos or screenshots)

This PR adds a deprecation warning for livechat:setupConnection.

Issue(s)

CORE-1407

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Chores
    • Added deprecation warnings for the livechat:setupConnection method/action; invoking it now logs a clear deprecation notice about upcoming removal. No functional behavior changed.
    • Prepared a patch release to ensure the deprecation notice is propagated across relevant components.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Oct 13, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Oct 13, 2025

🦋 Changeset detected

Latest commit: 40974a8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 42 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/federation-service Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 13, 2025

Walkthrough

Adds deprecation warnings for the livechat:setupConnection method in Meteor and DDP Streamer code paths and introduces a changeset patch for @rocket.chat/meteor and @rocket.chat/ddp-streamer. No public API signatures changed and runtime behavior remains unchanged beyond logging.

Changes

Cohort / File(s) Change summary
Deprecation logging for livechat:setupConnection
apps/meteor/app/livechat/server/methods/setUpConnection.ts, ee/apps/ddp-streamer/src/configureServer.ts
Emits a deprecation warning when livechat:setupConnection is invoked: uses methodDeprecationLogger in the Meteor method and console.warn in the DDP Streamer path. No changes to connection/token handling or exported signatures.
Release metadata (changeset)
.changeset/chilled-chicken-drop.md
Adds a patch changeset for @rocket.chat/meteor and @rocket.chat/ddp-streamer noting the deprecation of livechat:setupConnection.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant C as Client
  participant M as Meteor Method<br/>livechat:setupConnection
  participant L as Deprecation Logger
  participant D as DDP Streamer Server

  C->>M: call livechat:setupConnection(params)
  M->>L: log deprecation (methodDeprecationLogger)
  Note right of L: Deprecation recorded
  M->>D: continue existing setup/token handling
  D-->>M: result (behavior unchanged)
  M-->>C: response
  Note over D: Also emits `console.warn` on invocation
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • KevLehman
  • scuciatto
  • sampaiodiego

Poem

A rabbit taps the server log with tiny, eager paws,
“This call’s retiring soon,” I say, and nudge the code because—
Warnings soft as carrot dawn, no changes to the run;
A patch, a hop, a printed note—deprecation’s gently done. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly and concisely summarizes the primary change, which is adding a deprecation warning for the livechat:setupConnection method. It's specific, mentions the exact API name, and follows the conventional commit style without unrelated noise.
Linked Issues Check ✅ Passed The changes implement the requested deprecation warning for the livechat:setupConnection API as specified in CORE-1407 by logging a deprecation notice in both the Meteor method and the DDP streamer configuration. All modifications align with the coding objective of deprecating this method without altering other behavior. No required functionality appears missing or incomplete.
Out of Scope Changes Check ✅ Passed All modifications are directly related to adding deprecation warnings for livechat:setupConnection as defined in the linked issue. There are no unrelated code changes or files modified beyond the intended deprecation logic and changelog entry. The PR does not introduce any features or fixes outside the deprecation scope.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/v7/CORE-1407

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0380d9b and 1755915.

📒 Files selected for processing (1)
  • apps/meteor/app/livechat/server/methods/setUpConnection.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/meteor/app/livechat/server/methods/setUpConnection.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@lucas-a-pelegrino lucas-a-pelegrino changed the title chore: adds deprecation warning on livechat:setupConnection chore: adds deprecation warning on livechat:setupConnection Oct 13, 2025
@codecov
Copy link

codecov bot commented Oct 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.59%. Comparing base (f8150c1) to head (40974a8).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37218      +/-   ##
===========================================
+ Coverage    67.58%   67.59%   +0.01%     
===========================================
  Files         3295     3295              
  Lines       112648   112648              
  Branches     20455    20480      +25     
===========================================
+ Hits         76137    76150      +13     
+ Misses       33841    33824      -17     
- Partials      2670     2674       +4     
Flag Coverage Δ
e2e 57.33% <ø> (+<0.01%) ⬆️
unit 71.63% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lucas-a-pelegrino lucas-a-pelegrino marked this pull request as ready for review October 15, 2025 17:09
@lucas-a-pelegrino lucas-a-pelegrino requested a review from a team as a code owner October 15, 2025 17:09
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
ee/apps/ddp-streamer/src/configureServer.ts (1)

142-142: Inconsistent deprecation mechanism and version format.

While the method name is correct here, there are inconsistencies with the Meteor implementation:

  1. Version format: This uses v8.0.0 while the Meteor file uses 8.0.0 (without the 'v' prefix).
  2. Deprecation mechanism: This uses console.warn while the Meteor file uses methodDeprecationLogger, which provides structured logging.

Consider aligning both for consistency.

Apply this diff to align with the Meteor implementation:

-		console.warn('Warning: Method livechat:setUpConnection is deprecated and will be removed on v8.0.0');
+		console.warn('Warning: Method livechat:setUpConnection is deprecated and will be removed in 8.0.0');

Alternatively, if structured logging is available in this context, consider using it instead of console.warn to match the Meteor implementation.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7ac146b and 0380d9b.

📒 Files selected for processing (3)
  • .changeset/chilled-chicken-drop.md (1 hunks)
  • apps/meteor/app/livechat/server/methods/setUpConnection.ts (2 hunks)
  • ee/apps/ddp-streamer/src/configureServer.ts (1 hunks)
🔇 Additional comments (1)
apps/meteor/app/livechat/server/methods/setUpConnection.ts (1)

6-6: LGTM!

The import of methodDeprecationLogger is appropriate for structured deprecation warnings.

@lucas-a-pelegrino lucas-a-pelegrino added this to the 7.11.0 milestone Oct 15, 2025
@lucas-a-pelegrino lucas-a-pelegrino added stat: ready to merge PR tested and approved waiting for merge stat: QA assured Means it has been tested and approved by a company insider labels Oct 15, 2025
@kodiakhq kodiakhq bot merged commit a62792a into develop Oct 15, 2025
75 of 88 checks passed
@kodiakhq kodiakhq bot deleted the chore/v7/CORE-1407 branch October 15, 2025 22:42
antm-rp pushed a commit to antm-rp/Rocket.Chat that referenced this pull request Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants