Skip to content

chore: beta deployment for dynamic destination configuration#2278

Closed
saikumarrs wants to merge 2 commits into
developfrom
chore/deploy-dynamic-destination-configuration
Closed

chore: beta deployment for dynamic destination configuration#2278
saikumarrs wants to merge 2 commits into
developfrom
chore/deploy-dynamic-destination-configuration

Conversation

@saikumarrs

@saikumarrs saikumarrs commented Jun 5, 2025

Copy link
Copy Markdown
Member

PR Description

Please include a summary of the change along with the relevant motivation and context.

Linear task (optional)

Linear task link

Cross Browser Tests

Please confirm you have tested for the following browsers:

  • Chrome
  • Firefox
  • IE11

Sanity Suite

  • All sanity suite test cases pass locally

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

Summary by CodeRabbit

  • Bug Fixes
    • Improved destination selection by ensuring disabled destinations are filtered out earlier in the process.

@saikumarrs saikumarrs self-assigned this Jun 5, 2025
Copilot AI review requested due to automatic review settings June 5, 2025 16:17
@saikumarrs saikumarrs requested a review from a team as a code owner June 5, 2025 16:17
@coderabbitai

coderabbitai Bot commented Jun 5, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The change updates the logic in the device mode destinations module to ensure that disabled destinations are filtered out earlier in the selection process. It achieves this by applying the filterDisabledDestination utility to the list of supported destinations when no overrides are present.

Changes

File(s) Change Summary
packages/analytics-js-plugins/src/deviceModeDestinations/index.ts Added import and use of filterDisabledDestination to filter out disabled destinations earlier

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant DeviceModeDestinations

    Caller->>DeviceModeDestinations: Get destinations (with/without overrides)
    alt Overrides exist
        DeviceModeDestinations->>DeviceModeDestinations: Use overridden destinations
    else No overrides
        DeviceModeDestinations->>DeviceModeDestinations: Apply filterDisabledDestination to supported destinations
    end
    DeviceModeDestinations-->>Caller: Return filtered destination list
Loading

Possibly related PRs


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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • 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.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 5, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR alters the beta deployment workflow to bypass mergeability checks by replacing the original prDetails.mergeable and prDetails.mergeable_state conditions with hardcoded false.

  • Disabled the check for prDetails.mergeable === false
  • Disabled the check for prDetails.mergeable_state !== 'clean'
Comments suppressed due to low confidence (2)

.github/workflows/deploy-beta.yml:82

  • Replacing the mergeable check with if (false) disables conflict detection, allowing non-mergeable PRs to deploy. Restore the original if (prDetails.mergeable === false) condition.
if (false) {

.github/workflows/deploy-beta.yml:89

  • Replacing the clean-state check with if (false) bypasses the requirement that the PR state be 'clean', risking deployments of unapproved or failing PRs. Restore if (prDetails.mergeable_state !== 'clean').
if (false) {

@codecov

codecov Bot commented Jun 5, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.09%. Comparing base (6fed4f6) to head (38c2b0d).
Report is 38 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2278   +/-   ##
========================================
  Coverage    62.09%   62.09%           
========================================
  Files          479      479           
  Lines        16621    16621           
  Branches      3284     3280    -4     
========================================
  Hits         10321    10321           
- Misses        5092     5099    +7     
+ Partials      1208     1201    -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@github-actions

github-actions Bot commented Jun 5, 2025

Copy link
Copy Markdown

size-limit report 📦

Name Size Delta Limit check
Common - No bundling 18.03 KB 0 B (0% 🟢) 19 KB (✅)
Cookies Utils - Legacy - NPM (ESM) 1.54 KB 0 B (0% 🟢) 2 KB (✅)
Cookies Utils - Legacy - NPM (CJS) 1.74 KB 0 B (0% 🟢) 2 KB (✅)
Cookies Utils - Legacy - NPM (UMD) 1.52 KB 0 B (0% 🟢) 2 KB (✅)
Cookies Utils - Modern - NPM (ESM) 1.16 KB 0 B (0% 🟢) 1.5 KB (✅)
Cookies Utils - Modern - NPM (CJS) 1.39 KB 0 B (0% 🟢) 1.5 KB (✅)
Cookies Utils - Modern - NPM (UMD) 1.15 KB 0 B (0% 🟢) 1.5 KB (✅)
Core - Legacy - NPM (ESM) 47.98 KB 0 B (0% 🟢) 48.5 KB (✅)
Core - Legacy - NPM (CJS) 48.29 KB 0 B (0% 🟢) 48.5 KB (✅)
Core - Legacy - NPM (UMD) 47.98 KB 0 B (0% 🟢) 48.5 KB (✅)
Core - Legacy - CDN 48.11 KB 0 B (0% 🟢) 48.5 KB (✅)
Core - Modern - NPM (ESM) 26.99 KB 0 B (0% 🟢) 27.5 KB (✅)
Core - Modern - NPM (CJS) 27.17 KB 0 B (0% 🟢) 27.5 KB (✅)
Core - Modern - NPM (UMD) 27.02 KB 0 B (0% 🟢) 27.5 KB (✅)
Core - Modern - CDN 27.22 KB 0 B (0% 🟢) 27.5 KB (✅)
Core (Bundled) - Legacy - NPM (ESM) 47.98 KB 0 B (0% 🟢) 48.5 KB (✅)
Core (Bundled) - Legacy - NPM (CJS) 48.28 KB 0 B (0% 🟢) 48.5 KB (✅)
Core (Bundled) - Legacy - NPM (UMD) 47.98 KB 0 B (0% 🟢) 48.5 KB (✅)
Core (Bundled) - Modern - NPM (ESM) 39.58 KB 0 B (0% 🟢) 40 KB (✅)
Core (Bundled) - Modern - NPM (CJS) 39.79 KB 0 B (0% 🟢) 40 KB (✅)
Core (Bundled) - Modern - NPM (UMD) 39.64 KB 0 B (0% 🟢) 40 KB (✅)
Core (Content Script) - Legacy - NPM (ESM) 47.97 KB 0 B (0% 🟢) 48.5 KB (✅)
Core (Content Script) - Legacy - NPM (CJS) 48.23 KB 0 B (0% 🟢) 48.5 KB (✅)
Core (Content Script) - Legacy - NPM (UMD) 47.97 KB 0 B (0% 🟢) 48.5 KB (✅)
Core (Content Script) - Modern - NPM (ESM) 39.46 KB 0 B (0% 🟢) 39.5 KB (✅)
Core (Content Script) - Modern - NPM (CJS) 39.74 KB 0 B (0% 🟢) 40 KB (✅)
Core (Content Script) - Modern - NPM (UMD) 39.47 KB 0 B (0% 🟢) 40 KB (✅)
Core (v1.1) - NPM (ESM) 29.85 KB 0 B (0% 🟢) 32 KB (✅)
Core (v1.1) - NPM (CJS) 30.04 KB 0 B (0% 🟢) 32 KB (✅)
Core (v1.1) - NPM (UMD) 29.81 KB 0 B (0% 🟢) 32 KB (✅)
Core (Content Script - v1.1) - NPM (ESM) 29.32 KB 0 B (0% 🟢) 30.5 KB (✅)
Core (Content Script - v1.1) - NPM (CJS) 29.54 KB 0 B (0% 🟢) 30.5 KB (✅)
Core (Content Script - v1.1) - NPM (UMD) 29.38 KB 0 B (0% 🟢) 30.5 KB (✅)
Core (v1.1) - Legacy - CDN 31.79 KB 0 B (0% 🟢) 32.5 KB (✅)
Core (v1.1) - Modern - CDN 29.74 KB 0 B (0% 🟢) 32 KB (✅)
All Integrations - Legacy - CDN 96.29 KB 0 B (0% 🟢) 97 KB (✅)
All Integrations - Modern - CDN 90.98 KB 0 B (0% 🟢) 93.5 KB (✅)
Service Worker - Legacy - NPM (ESM) 29.91 KB 0 B (0% 🟢) 31 KB (✅)
Service Worker - Legacy - NPM (CJS) 30.17 KB 0 B (0% 🟢) 31 KB (✅)
Service Worker - Legacy - NPM (UMD) 30 KB 0 B (0% 🟢) 31 KB (✅)
Service Worker - Modern - NPM (ESM) 25.6 KB 0 B (0% 🟢) 26 KB (✅)
Service Worker - Modern - NPM (CJS) 25.82 KB 0 B (0% 🟢) 26.5 KB (✅)
Service Worker - Modern - NPM (UMD) 25.61 KB 0 B (0% 🟢) 26 KB (✅)
Load Snippet 765 B 0 B (0% 🟢) 1 KB (✅)
Plugins Module Federation Mapping - Legacy - CDN 332 B 0 B (0% 🟢) 512 B (✅)
Plugins Module Federation Mapping - Modern - CDN 331 B 0 B (0% 🟢) 512 B (✅)
Plugins - Legacy - CDN 14.25 KB 0 B (0% 🟢) 14.5 KB (✅)
Plugins - Modern - CDN 5.66 KB 0 B (0% 🟢) 6 KB (✅)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/analytics-js-plugins/src/deviceModeDestinations/index.ts (1)

57-64: Early filtering is correct but please verify naming and duplication.

Applying filterDisabledDestination before any consent / load-only filtering closes the loophole where destinations with enabled: false could still be loaded, so the behavioural change is 👍.

Two minor follow-ups to consider:

- : filterDisabledDestination(configSupportedDestinations);
+ : filterDisabledDestination(configSupportedDestinations);
  1. The helper’s singular name (filterDisabledDestination) is slightly misleading because it processes an array. Renaming to filterDisabledDestinations would better communicate intent.

  2. We now filter disabled destinations twice: here and later through filterDestinations, which already checks integration settings. If filterDisabledDestination and filterDestinations share logic, consolidating them would avoid duplicate iterations and reduce cognitive load.

Neither point is blocking, but addressing them would tighten the API surface.

Please confirm that filterDestinations does not already exclude enabled: false destinations to prevent redundant work.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6fed4f6 and 38c2b0d.

⛔ Files ignored due to path filters (1)
  • .github/workflows/deploy-beta.yml is excluded by !**/*.yml
📒 Files selected for processing (1)
  • packages/analytics-js-plugins/src/deviceModeDestinations/index.ts (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Security and code quality checks
  • GitHub Check: Unit Tests and Lint
  • GitHub Check: Bundle size checks
🔇 Additional comments (1)
packages/analytics-js-plugins/src/deviceModeDestinations/index.ts (1)

16-17: Import looks good – no further action.

filterDisabledDestination is now explicitly imported alongside the other helpers and is used below, so there are no dead-code or tree-shaking concerns here.

@sonarqubecloud

Copy link
Copy Markdown

@saikumarrs

Copy link
Copy Markdown
Member Author

The feature has been released to production so this is not required anymore.

@saikumarrs saikumarrs closed this Jun 16, 2025
@saikumarrs saikumarrs deleted the chore/deploy-dynamic-destination-configuration branch July 21, 2025 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants