feat: add Insights Snowflake connectivity validation - #200
Merged
santhosh-apphelix-2u merged 8 commits intoJul 28, 2026
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
santhosh-apphelix-2u
force-pushed
the
lp-928-insights-snowflake-connectivity
branch
from
July 28, 2026 03:21
ad99eb2 to
2c1e3d0
Compare
naincy128
approved these changes
Jul 28, 2026
santhosh-apphelix-2u
marked this pull request as ready for review
July 28, 2026 09:47
There was a problem hiding this comment.
Pull request overview
Adds a Snowflake “connectivity-only” validation path for Insights analytics, intended for operational smoke-testing via a Django management command without altering existing Aurora-backed API endpoints.
Changes:
- Introduces default
INSIGHTS_SNOWFLAKEsettings in the Django base settings module. - Adds a small Snowflake helper module plus a
check_insights_snowflakemanagement command to validate connectivity using a read-only query. - Updates dependency lockfiles to include
snowflake-connector-pythonand related transitive dependencies, and adds unit tests covering the helper and command.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| requirements/base.in | Adds cryptography and snowflake-connector-python to base inputs for compilation. |
| requirements/base.txt | Updates compiled base dependency set to include Snowflake connector + transitive deps. |
| requirements/dev.txt | Updates compiled dev dependency set to include Snowflake connector + transitive deps. |
| requirements/doc.txt | Updates compiled docs dependency set to include Snowflake connector + transitive deps. |
| requirements/production.txt | Updates compiled production dependency set to include Snowflake connector + transitive deps. |
| requirements/test.txt | Updates compiled test dependency set to include Snowflake connector + transitive deps. |
| analyticsdataserver/settings/base.py | Adds default INSIGHTS_SNOWFLAKE configuration scaffold. |
| analytics_data_api/snowflake_client.py | Adds helper functions for config validation, private key conversion, connect, and validation queries. |
| analytics_data_api/tests/test_snowflake_client.py | Adds unit tests for the Snowflake helper module. |
| analytics_data_api/management/commands/check_insights_snowflake.py | Adds a management command to run the runtime connectivity check. |
| analytics_data_api/management/commands/tests/test_check_insights_snowflake.py | Adds tests for the management command output and error handling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+101
to
+104
| """Run a read-only Snowflake query and return all rows.""" | ||
| if not sql.lstrip().upper().startswith('SELECT '): | ||
| raise SnowflakeConfigurationError('Only SELECT queries are allowed for Insights Snowflake validation.') | ||
|
|
Comment on lines
+111
to
+115
| finally: | ||
| if cursor is not None: | ||
| cursor.close() | ||
| connection.close() | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a connection-only Snowflake validation path for Insights analytics in
edx-analytics-data-api.This PR does not change existing dashboard API behavior, API response contracts, Aurora query logic, or frontend routing. Existing Analytics API endpoints remain Aurora-backed.
Changes
INSIGHTS_SNOWFLAKEsettings.snowflake-connector-pythonand explicitcryptographydependencies.settings.INSIGHTS_SNOWFLAKEcheck_insights_snowflakeDjango management command for deployed runtime validation.