Repository navigation
Conversation
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 412c28f: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. @slevenick VCR tests complete for 412c28f! |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 024c430: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode 🟢 All tests passed in Replaying mode! No Recording was needed. View the replaying VCR build log @slevenick VCR tests complete for 024c430! |
|
@modular-magician reassign-reviewer |
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @rileykarson, 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. |
| // with leaf schedule fields so PATCH does not cover the OUTPUT_ONLY rotation.managedRotationStatus | ||
| // subfield on CLOUD_SQL_DB_CREDENTIALS secrets (which Secret Manager rejects with 400 | ||
| // INVALID_ARGUMENT). Using per-subfield masks also allows updating rotation_period without | ||
| // re-validating next_rotation_time. |
There was a problem hiding this comment.
This is just an API bug, right? Frustrating that we need to sling a bunch of custom code for it.
| } | ||
| } | ||
|
|
||
| func TestExpandSecretManagerRegionalSecretRotationUpdateMask(t *testing.T) { |
There was a problem hiding this comment.
Ehh, I largely don't think this test is interesting enough to justify itself.
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ -}} | ||
| type secretManagerRegionalSecretManagedRotationResourceDiff interface { |
There was a problem hiding this comment.
Do we have a common type we could use instead?
| } | ||
|
|
||
| func secretManagerRegionalSecretManagedRotationCustomizeDiffFunc(diff secretManagerRegionalSecretManagedRotationResourceDiff) error { | ||
| if diff.Id() == "" { |
There was a problem hiding this comment.
Was there a util function that names what I think we're doing- checking if this is create?
| if diff.HasChange("secret_id") || diff.HasChange("location") || diff.HasChange("project") { | ||
| return nil | ||
| } |
There was a problem hiding this comment.
Aren't these immutable? When do they trigger?
| return dst | ||
| } | ||
|
|
||
| func TestSecretManagerRegionalSecretManagedRotationCustomizeDiff(t *testing.T) { |
There was a problem hiding this comment.
There's enough modification needed just to write this unit test that I don't personally feel it's very convincing of anything at runtime.
| CheckDestroy: testAccCheckSecretManagerRegionalRegionalSecretDestroyProducer(t), | ||
| Steps: []resource.TestStep{ | ||
| { | ||
| Config: testAccSecretManagerRegionalSecret_cloudSqlNoRotation(context), |
| }) | ||
| } | ||
|
|
||
| func TestAccSecretManagerRegionalRegionalSecret_cloudSqlRotationUpdate(t *testing.T) { |
Expand
rotationupdateMask paths to leaf schedule fields (rotation.nextRotationTimeandrotation.rotationPeriod) ongoogle_secret_manager_regional_secretso Day-2 schedule updates onCLOUD_SQL_DB_CREDENTIALSsecrets do not include the output-onlyrotation.managedRotationStatussubfield. Also add a plan-timeCustomizeDiffguard ongoogle_secret_manager_regional_secret_managed_rotationthat rejects in-placecloud_sql_single_user_credentialsedits on the same secret before Terraform removes state and fails trying to re-enable managed rotation.Fixes b/590858660