Skip to content
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

fix: only add PSC ipType if PSC is enabled #388

Merged
merged 11 commits into from
Sep 25, 2024
Merged

Conversation

jackwotherspoon
Copy link
Collaborator

@jackwotherspoon jackwotherspoon commented Sep 23, 2024

With CAS-based instances being supported soon and also using dnsName,
we can no longer rely on the presence of dnsName in the connectSettings
API as identifying that PSC is enabled on an instance.

Instead we should check pscEnabled from the response as source of truth.

Check if pscEnabled is True before setting PSC ip type.

Moving parseIPAddresses into private method on SQLAdminFetcher

@jackwotherspoon jackwotherspoon self-assigned this Sep 23, 2024
@jackwotherspoon jackwotherspoon requested a review from a team as a code owner September 23, 2024 13:53
Copy link
Collaborator

@hessjcg hessjcg left a comment

Choose a reason for hiding this comment

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

Add new testcases for the new logic. Don't replace the existing testcases in test/sqladmin-fetcher-ts.

I'm curious about why you decided to inline the logic from parseIpAddresses() into the SqlAdminFetcher and get rid of the unit tests.

src/sqladmin-fetcher.ts Outdated Show resolved Hide resolved
test/ip-addresses.ts Show resolved Hide resolved
test/sqladmin-fetcher.ts Show resolved Hide resolved
test/sqladmin-fetcher.ts Show resolved Hide resolved
Copy link
Collaborator

@hessjcg hessjcg left a comment

Choose a reason for hiding this comment

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

LGTM

@jackwotherspoon jackwotherspoon merged commit 28905c9 into main Sep 25, 2024
22 checks passed
@jackwotherspoon jackwotherspoon deleted the psc-enabled branch September 25, 2024 17:34
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.

2 participants