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

Fixes LifecycleRules Conditions not being set issue. #10717

Merged

Conversation

kautikdk
Copy link
Member

@kautikdk kautikdk commented May 16, 2024

Fixes hashicorp/terraform-provider-google#17990

Release Note Template for Downstream PRs (will be copied)

storage: fixed a bug where `google_storage_bucket.lifecycle_rule.condition` block fields  `days_since_noncurrent_time` and `days_since_custom_time`  and `num_newer_versions` were not working for 0 value. You can now send these by including a corresponding field such as `send_days_since_noncurrent_time_if_zero` in your configuration that is set to true.

@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 ( 2 files changed, 98 insertions(+), 15 deletions(-))
google-beta provider: Diff ( 2 files changed, 98 insertions(+), 15 deletions(-))

@kautikdk
Copy link
Member Author

For tests, We can not actually check value from the cloud infra because of the empty value limitation in go language. I have added all the virtual fields to cover no permadiff happing in any case and field modification is not causing state inconsistency.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 93
Passed tests: 86
Skipped tests: 6
Affected tests: 1

Click here to see the affected service packages
  • storage

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
TestAccStorageBucket_lifecycleRulesVirtualFields

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

$\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

@NickElliot NickElliot self-requested a review May 16, 2024 16:13
@kautikdk kautikdk marked this pull request as ready for review May 19, 2024 11:22
Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

LGTM -- I'm not certain we should mark this as "fixing" the issue, as we still want to update the behavior for the age condition down the line during the major release. May be appropriate to open a new ticket for that seperately, or keep the current one open.

@kautikdk
Copy link
Member Author

Well, We can do it either ways. I think with this PR merged and with the no_age field, Users can set lifecycle rule conditions as they want without any problem. So we can mark this one as fixed and open new ticket for changing age behavior. That's my opinion on this but I am also okay with keeping this ticket open.

@NickElliot
Copy link
Contributor

sounds good to me!

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

Ah sorry, these need to be included in the docs at mmv1/third_party/terraform/website/docs/r/storage_bucket.html.markdown

@github-actions github-actions bot requested a review from NickElliot May 23, 2024 17:16
@kautikdk
Copy link
Member Author

Oops, I forgot to add these new fields in the markdown file.
Added in the new commit.

@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, 107 insertions(+), 18 deletions(-))
google-beta provider: Diff ( 3 files changed, 107 insertions(+), 18 deletions(-))

@NickElliot NickElliot merged commit 4dd153f into GoogleCloudPlatform:main May 23, 2024
11 of 12 checks passed
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 94
Passed tests: 88
Skipped tests: 6
Affected tests: 0

Click here to see the affected service packages
  • storage

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants