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

Add support for Regional Managed Instance Groups Resize Request (Dynamic Workload Scheduler) #11968

Merged

Conversation

chayankumar999
Copy link
Contributor

@chayankumar999 chayankumar999 commented Oct 10, 2024

Added support for ResizeRequest feature for Regional Managed Instance Group in Beta.
Alternatively, added support for Regional ResizeRequest feature for R(IGM).

Release Note Template for Downstream PRs (will be copied)

`google_compute_region_resize_request`

@chayankumar999 chayankumar999 marked this pull request as draft October 10, 2024 14:10
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@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.

@github-actions github-actions bot requested a review from rileykarson October 10, 2024 14:11
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Oct 10, 2024
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/ResizeRequest.yaml Outdated Show resolved Hide resolved
@chayankumar999 chayankumar999 force-pushed the chayanr-resize-request branch 3 times, most recently from f2d613e to 44e414a Compare October 11, 2024 21:15
@chayankumar999 chayankumar999 marked this pull request as ready for review October 11, 2024 21:25
@chayankumar999
Copy link
Contributor Author

chayankumar999 commented Oct 11, 2024

Hey @rileykarson, the PR is ready for review now.

@askubis
Copy link
Member

askubis commented Oct 15, 2024

Approval from the service team.

Copy link
Member

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

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

Some early comments; gonna assign an alternate reviewer as I'm a little low on cycles rn

mmv1/products/compute/ResizeRequest.yaml Outdated Show resolved Hide resolved
@rileykarson rileykarson requested a review from melinath October 17, 2024 16:19
@github-actions github-actions bot requested a review from rileykarson October 17, 2024 22:10
@modular-magician modular-magician added service/compute-managed and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Oct 21, 2024
@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.

google provider: Diff ( 3 files changed, 503 insertions(+), 10 deletions(-))
google-beta provider: Diff ( 6 files changed, 1982 insertions(+), 12 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 129 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1037
Passed tests: 962
Skipped tests: 73
Affected tests: 2

Click here to see the affected service packages
  • compute

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeRegionResizeRequest_computeRmigResizeRequestExample
  • TestAccRegionInstanceGroupManager_distributionPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccRegionInstanceGroupManager_distributionPolicy [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Several tests terminated during RECORDING mode.

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

A few initial comments - there are a bunch of Output Only fields; could you remove the [output only] comment on all of them? It'll be autogenerated for the docs already.

Test are currently failing due to a panic: https://ff1c11903cd752508336bf6d605215431f828a82ad4e72cf7e38c07-apidata.googleusercontent.com/download/storage/v1/b/ci-vcr-logs/o/beta%2Frefs%2Fheads%2Fauto-pr-11968%2Fartifacts%2F63e7ee8b-e1ac-435a-b4e1-515071e61c7c%2Fbuild-log%2Frecording_test.log?jk=AdvOr8vj7bivIo1lQpYAx_gO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Nfi2nopAU3jzAzpLu5vkMJdMd3j9vQ6O_nfLQew-xoH4UG7H6S1T_ATikg9fpdMIHiJocPX0T3lNlJGEMN0llgD8g1T2Mg3r6NHko5SRHWujNjzsr7n8dSQmFcxorxfMyodc4pXR3RKH9oV7f9Nt9qh79EJojm-CPLNhpHwExjz0EcYE&isca=1

corresponds to https://github.com/modular-magician/terraform-provider-google-beta/compare/auto-pr-11968-old..auto-pr-11968#diff-bd02d3aad4ce2654aeda448a399435f6fd360e72c9c8ee839d44529ac7d8b160R1028

mmv1/products/compute/ResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/ResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
@github-actions github-actions bot requested a review from melinath October 24, 2024 15:56
@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 24, 2024
@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@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.

google provider: Diff ( 1 file changed, 491 insertions(+))
google-beta provider: Diff ( 4 files changed, 1976 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 129 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1041
Passed tests: 965
Skipped tests: 73
Affected tests: 3

Click here to see the affected service packages
  • compute

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeInstanceConfidentialInstanceConfigMain
  • TestAccComputeInstanceFromMachineImage_confidentialInstanceConfigMain
  • TestAccComputeResizeRequest_computeMigResizeRequestExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccComputeInstanceConfidentialInstanceConfigMain [Error message] [Debug log]
TestAccComputeInstanceFromMachineImage_confidentialInstanceConfigMain [Error message] [Debug log]
TestAccComputeResizeRequest_computeMigResizeRequestExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@chayankumar999
Copy link
Contributor Author

All the failing tests are unrelated, you can ignore them and proceed further review if needed.

Copy link

@rileykarson @melinath This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

The schema looks fine apart from a couple things noted below. +1 the current failing tests are unrelated.

It would also probably be a good idea to move the deletion logic into a pre_delete rather than a custom_delete - more details below.

mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
mmv1/products/compute/RegionResizeRequest.yaml Outdated Show resolved Hide resolved
# If a resize request is in the CREATING or ACCEPTED state, it must be canceled before it can be
# deleted. If a resize request is NOT in any of the mentioned state, it can be directly deleted.
custom_code:
custom_delete: 'templates/terraform/custom_delete/compute_rmig_resize_request_delete.go.tmpl'
Copy link
Member

Choose a reason for hiding this comment

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

I think this would probably be easier to implement / maintain if you do it as a pre_delete instead of overriding the entire delete method - if I understand correctly, you just need to call a specific method before deletion if the resource is in a specific state, and otherwise it should just need to follow the normal deletion flow. Does that seem reasonable?

@github-actions github-actions bot requested a review from melinath October 31, 2024 00:30
@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.

google provider: Diff ( 1 file changed, 489 insertions(+))
google-beta provider: Diff ( 4 files changed, 1972 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 129 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1055
Passed tests: 981
Skipped tests: 73
Affected tests: 1

Click here to see the affected service packages
  • compute

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeResizeRequest_computeMigResizeRequestExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccComputeResizeRequest_computeMigResizeRequestExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

Unless there's a strong objection or counterpoint, it would be great if you could switch to a pre-delete as described in #11968 (comment)

@chayankumar999
Copy link
Contributor Author

chayankumar999 commented Oct 31, 2024

Unless there's a strong objection or counterpoint, it would be great if you could switch to a pre-delete as described in #11968 (comment)

So far, I have no idea how it works (since this is my first PR with MMv1 resource). I am going through the docs to understand it and also looking at some example of pre-delete classes. Also maybe, for now we could use custom delete since it was used in the existing zonal resource. And later with the fix of of that bug that I mentioned earlier, we could try to move it to pre-delete for both resource after discussed with @askubis, since he has better context in terraform and the related dependency about the product. What do you think about that?

@github-actions github-actions bot requested a review from melinath October 31, 2024 16:47
@melinath
Copy link
Member

works for me!

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

LGTM

@melinath
Copy link
Member

Merging is currently on hold due to some CI changes, so I'll come back to this later to merge it

@chayankumar999
Copy link
Contributor Author

Merging is currently on hold due to some CI changes, so I'll come back to this later to merge it

Thanks a lot :)

@github-actions github-actions bot requested a review from melinath October 31, 2024 18:05
@melinath melinath merged commit 484b549 into GoogleCloudPlatform:main Nov 1, 2024
14 of 15 checks passed
niharika-98 pushed a commit to niharika-98/magic-modules that referenced this pull request Nov 1, 2024
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Nov 5, 2024
akshat-jindal-nit pushed a commit to akshat-jindal-nit/magic-modules that referenced this pull request Nov 18, 2024
amanMahendroo pushed a commit to amanMahendroo/magic-modules that referenced this pull request Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants