rubrik-sdk-for-python icon indicating copy to clipboard operation
rubrik-sdk-for-python copied to clipboard

Sql tz fix

Open jakeheut opened this issue 4 years ago • 0 comments

Description

This pull request addresses issues regarding _validate_sql_recovery_point and _date_time_conversion:

  • SQL recoveries don't allow seconds when specifying time, causing a failure every time an export has a non-zero value for seconds. This pull request adds seconds to _validate_sql_recovery_point and _date_time_conversion to work for SQL functions without breaking vSphere functionality.
  • _validate_sql_recovery_point converts for time zone unnecessarily when specifying "latest" which breaks automation if run on a different time zone then the Rubrik Cluster.

Related Issue

SQL export seconds issue: https://github.com/rubrikinc/rubrik-sdk-for-python/issues/274 Time zone Issue: https://github.com/rubrikinc/rubrik-sdk-for-python/issues/278

Motivation and Context

This change fixes sql_db_export during these 2 scenarios:

  1. The function is ran from a client on a different time zone then the Rubrik Cluster.
  2. The export targeted has a non-zero second for time.

How Has This Been Tested?

This has been tested on a Rubrik Cluster running 5.3.2-p3-19174.

The following functions have been tested due to being modified directly or having a sub-function modified:

  • sql_instant_recovery
  • get_sql_db_files
  • vsphere_live_mount
  • vsphere_instant_recovery

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

Go over all the following points, and put an x in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help!

  • [x] My code follows the code style of this project.
  • [x] My change requires a change to the documentation.
  • [x] I have updated the documentation accordingly.
  • [x] I have read the CONTRIBUTION document.
  • [x] I have updated the CHANGELOG file accordingly for the version that this merge modifies.
  • [ ] I have added tests to cover my changes.
  • [x] All new and existing tests passed.

jakeheut avatar Sep 09 '21 21:09 jakeheut