upcoming: [UIE-10178] - Use new hostname endpoint in Database Summary and Network tab#13413
Conversation
… `public_access`
| host: HostEndpoint; | ||
| } | ||
|
|
||
| export const ConnectionDetailsHostDisplay = ( |
There was a problem hiding this comment.
Extracted from ConnectionDetailsHostRows and made more generic
| const PRIVATE_PRIMARY = `private-${DEFAULT_PRIMARY}`; | ||
| const PRIVATE_STANDBY = `private-${DEFAULT_STANDBY}`; | ||
|
|
||
| describe('ConnectionDetailsHostRows2', () => { |
There was a problem hiding this comment.
This file is a copy of ConnectionDetailsHostRows.test.tsx with updates to support endpoints field and minor clean up
| /** | ||
| * This component is responsible for conditionally rendering the Private Host, Public Host, and Read-only Host rows that get displayed in | ||
| * the Connection Details tables that appear in the Database Summary and Networking tabs */ | ||
| export const ConnectionDetailsHostRows2 = ( |
There was a problem hiding this comment.
This file is a copy of ConnectionDetailsHostRows.tsx with updates to use host endpoints and some refactoring
| address: string; | ||
| port: number; | ||
| private_access: boolean; | ||
| public_access: boolean; |
There was a problem hiding this comment.
Went ahead and updated the private_access field to public_access since it was soft approved
| public_access: true, | ||
| subnet_id: 123, | ||
| vpc_id: 10, | ||
| }; |
There was a problem hiding this comment.
Can we move this up above the No VPC comment since it would just assign the VPC here? This seems like the default state we're using since we have it uncommented.
We could add a comment above it that says something like:
Mock a database cluster with a public VPC Configuration
There was a problem hiding this comment.
Ended up moving it to the bottom so that it overrides default state when uncommented
| }, | ||
| { flag: 'gecko2', label: 'Gecko' }, | ||
| { flag: 'generationalPlansv2', label: 'Generational compute plans' }, | ||
| { flag: 'hostnameEndpoints', label: 'Hostname Endpoints' }, |
There was a problem hiding this comment.
Can this new feature flag be mentioned in the description? Maybe under the change list and verification steps?
There was a problem hiding this comment.
It's mentioned under the change list and verification steps
Description 📝
Update host fields in Database Summary Connection Details and Networking tab to use new
host.endpointsdata instead of constructing the address ourselvesI created a new file
ConnectionDetailsHostRows2based off the old fileConnectionDetailsHostRowsso we could seamlessly toggle between old/new logic with a feature flag. After the API releases the hostname changes, we can easily delete the old logicChanges 🔄
host.endpointsif the Hostname Endpoints feature flag is onScope 🚢
Upon production release, changes in this PR will be visible to:
Preview 📷
How to test 🧪
Prerequisites
(How to setup test environment)
Verification steps
(How to verify changes)
makeMockDatabasefunction inserverHandlers.ts, comment/uncomment out some of the values to simulate No VPC (public only), VPC with no public access (private only), VPC with public access (private and public)Author Checklists
As an Author, to speed up the review process, I considered 🤔
👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support
As an Author, before moving this PR from Draft to Open, I confirmed ✅