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(Cloud Databases): marshal blank string for latest PITR time #4718

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

alexhemard
Copy link
Collaborator

@alexhemard alexhemard commented Jul 26, 2023

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #4651

The documentation suggests using a blank string for point_in_time_recovery_time, but theomitempty option tag will not encode a blank string into JSON.

  • change point_in_time_recovery_time to a pointer, add nil / blank string checking
  • add documentation on how to use the latest point in time recovery time

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccIBMDatabaseInstancePostgresPITR'
...
PASS: TestAccIBMDatabaseInstancePostgresPITR (1043.19s)

@alexhemard alexhemard force-pushed the latest-pitr-fix branch 2 times, most recently from 8b9fb64 to 32cffed Compare July 27, 2023 11:22
@alexhemard alexhemard marked this pull request as ready for review July 27, 2023 11:23
BackupID string `json:"backup-id,omitempty"`
RemoteLeaderID string `json:"remote_leader_id,omitempty"`
PITRDeploymentID string `json:"point_in_time_recovery_deployment_id,omitempty"`
PITRTimeStamp *string `json:"point_in_time_recovery_time,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would this break backward compatibility?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the struct that gets marshaled into JSON and is not a change to the schema

Copy link
Collaborator

Choose a reason for hiding this comment

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

Cool 👍

@obai-1 obai-1 merged commit 35c0061 into IBM-Cloud:master Jul 27, 2023
2 checks passed
Ak-sky added a commit to Ak-sky/terraform-provider-ibm that referenced this pull request Aug 2, 2023
benbuchanan pushed a commit to benbuchanan/terraform-provider-ibm that referenced this pull request Aug 17, 2023
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.

Postgresql point in time recovery to latest point in time recovery time
2 participants