Skip to content

Remove IP validation for host of on-premise instance #9225

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

Merged
merged 2 commits into from
Oct 12, 2023

Conversation

jharshika
Copy link
Contributor

@jharshika jharshika commented Oct 11, 2023

According to API doc to setup a source representation instance, user can pass the IPv4 address and port for the external server, or the the DNS address for the external server. When user try to pass DNS address in terraform configuration file, they encounter Error: could not parse "host" to IP address.

In admin API, we don't have validation for host of on-premise instances. As of now it is validating that host contain the IP address in terraform. In order to be consistent with admin API and accept DNS address as well, removing the validation function for host.

Release Note Template for Downstream PRs (will be copied)

sql: removed host validation to support IP address and DNS address in host in `google_sql_source_representation_instance` resource

In admin API, we don't have validation for host of on-premise instances. Host can take the value of IP address or DNS address. As of now it is validating that host contain the IP address in terraform, in order to be consistent with admin API and accept DNS address as well, removing the validation function for host.
@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will require approval to run.

@SarahFrench, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Oct 11, 2023
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 1 file changed, 4 insertions(+), 5 deletions(-))
Terraform Beta: Diff ( 1 file changed, 4 insertions(+), 5 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3144
Passed tests 2823
Skipped tests: 316
Affected tests: 5

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccAlloydbInstance_clientConnectionConfig_update|TestAccAlloydbCluster_secondaryClusterMandatoryFields|TestAccAlloydbBackup_createBackupWithMandatoryFields|TestAccAlloydbCluster_secondaryClusterDefinedSecondaryConfigButMissingClusterTypeSecondary|TestAccAlloydbBackup_alloydbBackupFullExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccAlloydbInstance_clientConnectionConfig_update[Debug log]
TestAccAlloydbCluster_secondaryClusterMandatoryFields[Debug log]
TestAccAlloydbBackup_createBackupWithMandatoryFields[Debug log]
TestAccAlloydbCluster_secondaryClusterDefinedSecondaryConfigButMissingClusterTypeSecondary[Debug log]
TestAccAlloydbBackup_alloydbBackupFullExample[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

@jharshika jharshika marked this pull request as ready for review October 11, 2023 17:46
Copy link
Contributor

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

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

The reason for removing the validation makes sense to me, but I recommend improving the field's description before merging this change

@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Oct 12, 2023
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 2 files changed, 5 insertions(+), 6 deletions(-))
Terraform Beta: Diff ( 2 files changed, 5 insertions(+), 6 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3144
Passed tests 2824
Skipped tests: 315
Affected tests: 5

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccAlloydbBackup_createBackupWithMandatoryFields|TestAccAlloydbBackup_alloydbBackupFullExample|TestAccAlloydbCluster_secondaryClusterDefinedSecondaryConfigButMissingClusterTypeSecondary|TestAccAlloydbCluster_secondaryClusterMandatoryFields|TestAccCloudRunService_cloudRunServiceSqlExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccAlloydbBackup_createBackupWithMandatoryFields[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccAlloydbBackup_alloydbBackupFullExample[Error message] [Debug log]
TestAccAlloydbCluster_secondaryClusterDefinedSecondaryConfigButMissingClusterTypeSecondary[Error message] [Debug log]
TestAccAlloydbCluster_secondaryClusterMandatoryFields[Error message] [Debug log]
TestAccCloudRunService_cloudRunServiceSqlExample[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@SarahFrench
Copy link
Contributor

SarahFrench commented Oct 12, 2023

Note: Test failures are unrelated

The main branch is currently locked but I'll merge this PR once I'm able to.

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