Skip to content

Conversation

marcin-bazyl
Copy link
Collaborator

@marcin-bazyl marcin-bazyl commented Aug 13, 2025

COMPLETES #SPARK-702198

This pull request addresses

Reachability is waiting for results from all urls instead of just the first one for each protocol and cluster, while ClusterReachability class emits the resultReady event only once per protocol, so we never reach expected result count and instead resolve on the 3s timeout.

by making the following changes

changed the number of expected results

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios where tested

unit tests

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

I certified that

  • I have read and followed contributing guidelines

  • I discussed changes with code owners prior to submitting this pull request

  • I have not skipped any automated checks

  • All existing and new tests passed

  • I have updated the documentation accordingly


Make sure to have followed the contributing guidelines before submitting.

@marcin-bazyl marcin-bazyl requested review from a team as code owners August 13, 2025 13:36
Copy link
Contributor

coderabbitai bot commented Aug 13, 2025

📝 Walkthrough

Walkthrough

The reachability logic updates expected results counting to add 1 per cluster per protocol when at least one URL exists (otherwise 0), instead of summing all URLs. This applies to UDP for all clusters and TCP/XTLS for public clusters. Result accumulation remains unchanged. Tests were updated and expanded: import for ReachabilityResultsForBackend now comes from reachability.types, and new scenarios cover multiple URLs per protocol, clusters with zero URLs for certain protocols, configuration flags, timing, and metrics verification. No exported APIs changed beyond the type’s module relocation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~18 minutes

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@marcin-bazyl marcin-bazyl added the validated If the pull request is validated for automation. label Aug 13, 2025
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-4438.d3m3l2kee0btzx.amplifyapp.com

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: 1

🧹 Nitpick comments (2)
packages/@webex/plugin-meetings/test/unit/spec/reachability/index.ts (2)

838-937: Great coverage for multi-URL per protocol; validates first-result readiness

This scenario effectively proves the fix: readiness occurs after the first result per protocol across clusters, ignoring surplus URLs. The expected min/max/avg metrics also correctly derive from the first results.

Consider adding one more assertion that reachability:done is emitted exactly once (you already count it elsewhere), to make this case self-contained.


940-991: Solid edge-case: zero TCP URLs does not block readiness

Good validation that TCP is marked untested when no URLs exist and that readiness ignores that protocol. Metrics expectations for TCP being -1 across the board are correct.

As a complementary case, you might also add a VMN cluster with zero UDP URLs to ensure VMN readiness isn’t expected for that cluster (expectedResultsCount.videoMesh.udp += 0).

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d798015 and 9e0893d.

📒 Files selected for processing (2)
  • packages/@webex/plugin-meetings/src/reachability/index.ts (1 hunks)
  • packages/@webex/plugin-meetings/test/unit/spec/reachability/index.ts (2 hunks)
🔇 Additional comments (2)
packages/@webex/plugin-meetings/test/unit/spec/reachability/index.ts (2)

13-13: Import path update looks good

Using ReachabilityResultsForBackend from reachability.types reflects the type relocation and keeps the public API unchanged.


6-6: Import path stability

Importing Reachability from the directory path (index) is fine and consistent with the module structure.

@Shreyas281299
Copy link
Contributor

Shreyas281299 commented Sep 16, 2025

Can we please update the PR title, the commit message is too long and it is getting truncated in the PR title. Would be helpfull to have a complete title for the changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validated If the pull request is validated for automation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants