Skip to content

Conversation

@jankuca
Copy link
Member

@jankuca jankuca commented Nov 2, 2025

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced Snowflake integration configurations for Deepnote workspaces with partner identification support
  • Tests

    • Added test coverage for Snowflake integration partner identifier validation

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 2, 2025

📝 Walkthrough

Walkthrough

This change adds Snowflake partner identification to the Deepnote integration's environment variables provider. A new parameter snowflakePartnerIdentifier: 'Deepnote_Workspaces' is included in the getEnvironmentVariablesForIntegrations call, while preserving existing projectRootDirectory configuration. A corresponding unit test verifies that the resulting Snowflake integration URL contains the partner identifier as an application parameter.

Suggested reviewers

  • saltenasl
  • jamesbhobbs

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "feat: add snowflake partner identifier to connection URL" directly and accurately describes the main changes in the PR. The code addition includes the snowflakePartnerIdentifier: 'Deepnote_Workspaces' parameter to the integration call, and the test verifies this appears as an application parameter in the resulting URL. The title is specific, concise, and clearly conveys the primary intent without ambiguity.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Disabled knowledge base sources:

  • Linear 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 58c86b6 and 339ac00.

📒 Files selected for processing (2)
  • src/platform/notebooks/deepnote/sqlIntegrationEnvironmentVariablesProvider.ts (1 hunks)
  • src/platform/notebooks/deepnote/sqlIntegrationEnvironmentVariablesProvider.unit.test.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/!(*.node|*.web).ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Place shared cross-platform logic in common .ts files (not suffixed with .node or .web)

Files:

  • src/platform/notebooks/deepnote/sqlIntegrationEnvironmentVariablesProvider.unit.test.ts
  • src/platform/notebooks/deepnote/sqlIntegrationEnvironmentVariablesProvider.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Inject interfaces, not concrete classes
Avoid circular dependencies
Use l10n.t() for user-facing strings
Use typed error classes from src/platform/errors/ when throwing or handling errors
Use the ILogger service instead of console.log
Preserve error details while scrubbing PII in messages and telemetry
Include the Microsoft copyright header in source files
Prefer async/await and handle cancellation with CancellationToken

Files:

  • src/platform/notebooks/deepnote/sqlIntegrationEnvironmentVariablesProvider.unit.test.ts
  • src/platform/notebooks/deepnote/sqlIntegrationEnvironmentVariablesProvider.ts
**/*.unit.test.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Place unit tests in files matching *.unit.test.ts

Files:

  • src/platform/notebooks/deepnote/sqlIntegrationEnvironmentVariablesProvider.unit.test.ts
src/platform/**/*.ts

📄 CodeRabbit inference engine (.github/instructions/platform.instructions.md)

src/platform/**/*.ts: Use Inversify decorators for DI: annotate classes with @Injectable() and inject dependencies with @Inject(Token)
Use the centralized logger (import { logger } from '../platform/logging') instead of console.log for application logging

Files:

  • src/platform/notebooks/deepnote/sqlIntegrationEnvironmentVariablesProvider.unit.test.ts
  • src/platform/notebooks/deepnote/sqlIntegrationEnvironmentVariablesProvider.ts
**/*.{test,spec}.ts

📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)

In unit tests, when a mock is returned from a promise, ensure the mocked instance has an undefined then property to avoid hanging tests

Files:

  • src/platform/notebooks/deepnote/sqlIntegrationEnvironmentVariablesProvider.unit.test.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). (1)
  • GitHub Check: Build & Test
🔇 Additional comments (2)
src/platform/notebooks/deepnote/sqlIntegrationEnvironmentVariablesProvider.ts (1)

107-110: LGTM - Snowflake partner identifier added correctly.

The implementation properly passes the partner identifier to the library function. The test coverage verifies the URL includes the expected parameter.

src/platform/notebooks/deepnote/sqlIntegrationEnvironmentVariablesProvider.unit.test.ts (1)

363-408: LGTM - Test comprehensively verifies partner identifier.

The test properly validates that Snowflake URLs contain the application=Deepnote_Workspaces parameter. Mock setup and assertions are thorough.


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

@codecov
Copy link

codecov bot commented Nov 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73%. Comparing base (58c86b6) to head (339ac00).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #161   +/-   ##
=====================================
  Coverage     73%     73%           
=====================================
  Files        552     552           
  Lines      44264   44283   +19     
  Branches    5313    5313           
=====================================
+ Hits       32498   32517   +19     
  Misses     10003   10003           
  Partials    1763    1763           
Files with missing lines Coverage Δ
...note/sqlIntegrationEnvironmentVariablesProvider.ts 95% <ø> (ø)
...tegrationEnvironmentVariablesProvider.unit.test.ts 98% <100%> (+<1%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jankuca jankuca marked this pull request as ready for review November 2, 2025 17:44
@jankuca jankuca requested a review from a team as a code owner November 2, 2025 17:44
@jankuca jankuca enabled auto-merge (squash) November 2, 2025 17:44
@jankuca jankuca merged commit 4e02acf into main Nov 2, 2025
13 checks passed
@jankuca jankuca deleted the jk/snowflake-partner branch November 2, 2025 18:06
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.

3 participants