-
Notifications
You must be signed in to change notification settings - Fork 134
Connections Pane: AWS Redshift Support #10639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
E2E Tests 🚀 |
There was a problem hiding this comment.
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 adds AWS Redshift support to the Connections Pane, allowing users to connect to and browse Redshift databases within Positron.
Key Changes:
- Implemented
RedshiftConnectionclass with support for listing databases, schemas, tables/views, and fields - Added comprehensive test coverage for Redshift connections following the established testing patterns
- Added
redshift_connectordependency to test requirements
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
extensions/positron-python/python_files/posit/positron/connections.py |
Adds RedshiftConnection class with methods for connection management, object listing, and data preview. Updates connection wrapping logic to recognize Redshift connections. |
extensions/positron-python/python_files/posit/positron/tests/test_connections.py |
Adds TestRedshiftConnectionsService class with comprehensive tests for connection registration, data containment checks, icon retrieval, object listing, field listing, and preview functionality. |
extensions/positron-python/python_files/posit/test-requirements.txt |
Adds redshift_connector as a test dependency. |
extensions/positron-python/python_files/posit/pinned-test-requirements.txt |
Pins redshift_connector to version 2.1.10 for Python versions < 3.14. |
extensions/positron-python/python_files/posit/positron/connections.py
Outdated
Show resolved
Hide resolved
extensions/positron-python/python_files/posit/positron/tests/test_connections.py
Outdated
Show resolved
Hide resolved
extensions/positron-python/python_files/posit/positron/tests/test_connections.py
Outdated
Show resolved
Hide resolved
extensions/positron-python/python_files/posit/positron/connections.py
Outdated
Show resolved
Hide resolved
extensions/positron-python/python_files/posit/positron/connections.py
Outdated
Show resolved
Hide resolved
extensions/positron-python/python_files/posit/positron/connections.py
Outdated
Show resolved
Hide resolved
5bf25e3 to
6a68d42
Compare
ff609c0 to
4bbca37
Compare
| try: | ||
| import redshift_connector | ||
|
|
||
| HAS_REDSHIFT = "REDSHIFT_HOST" in os.environ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a plan to have these running in CI (maybe in the nightlies or weekly or something) at some point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully, yes! But it will require a good amount of work setting up ephemeral infrastructure.
4bbca37 to
c7a489b
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Daniel Falbel <dfalbel@gmail.com>
c7a489b to
379cbf2
Compare
Addresses #10432
Release Notes
New Features
Bug Fixes
QA Notes
Creating a Redshift connection require some configuration, and there are possibly multiple different ways to setup authentication dependning on how the Redshift cluster is set.
The way that worked for me is:
The profile must have access to the Redshift cluster that you plan to use.
The easiest way to setup a Redshift Cluster is creating a Serverless Redshihft cluster.
Go to the AWS dashboard -> AWS Redshift -> Serverless Dashboard -> Create Workgroup
Follow the steps. Remember to use only public security groups if you want to be able to access it locally.
After creating the workgroup, you should be able to acess the query editor from the AWS console. Make sure you can make some queries from there.
You'll also be able to find the workgrourp endpoint in the workgroup dashboard. This is what is used for the connection string.
There may be easier or better ways for this, specially if setting CI jobs. See slack discussion.
A connection can be created by installing the redshift_connector:
The create a connection with:
@:connections