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

Remove unused variable abort_incomplete_multipart_upload_days #92

Conversation

adamantike
Copy link
Contributor

@adamantike adamantike commented Jun 15, 2021

What

Remove variable abort_incomplete_multipart_upload_days.

Why

The abort_incomplete_multipart_upload_days variable isn't being used since the introduction of lifecycle_rules in #85.

Notes

closes #128

The `abort_incomplete_multipart_upload_days` variable isn't being used
since the introduction of `lifecycle_rules` in
cloudposse#85.
@adamantike adamantike requested review from a team as code owners June 15, 2021 02:36
@korenyoni
Copy link
Member

/test all

@Nuru
Copy link
Contributor

Nuru commented Jun 15, 2021

@korenyoni Note to use as a reviewer: I think I might let it slide in this particular instance, but as a rule, when we find out a variable is no longer being used due to a recent change, I would prefer to re-enable the variable rather than remove it. We want to preserve backward compatibility as much as is reasonable.

Also, Please look at combining this with, or at least aligning with, #77 and #90.

@adamantike We appreciate your contribution and I do not want to reward your contribution by asking you to do extra work, but if you can find a way to enable the variable in a way that does not produce "code smell" we would prefer to maintain that kind of backward compatibility. I have not reviewed this change or #85 enough to have fully thought through the second order effects, so maybe we don't need to restore the variable. That is why I am asking the reviewers to consider it.

Also, to the extent you are interested in the changes in #77 and #90, it would be nice to have them all combined in one PR with a consistent coding style and coherent variable structure, so feel free to enhance this PR to include those features.

@korenyoni
Copy link
Member

As another note, I'm noticing a lot of unused variables from prior to #85 in https://github.com/cloudposse/terraform-aws-s3-bucket/blob/master/examples/complete/variables.tf

@korenyoni
Copy link
Member

korenyoni commented Jun 15, 2021

@korenyoni Note to use as a reviewer: I think I might let it slide in this particular instance, but as a rule, when we find out a variable is no longer being used due to a recent change, I would prefer to re-enable the variable rather than remove it. We want to preserve backward compatibility as much as is reasonable.

@Nuru I agree, perhaps that's what we should have done in #85 and maybe deprecated the variables first before removing them outright. I think that at this point though, we're several versions past 0.35.0 (the automatically-drafted release following #85 ) so there's no point in attempting to restore this functionality. But I understand that this is more of a general note than a note for this particular case.

Copy link
Member

@korenyoni korenyoni left a comment

Choose a reason for hiding this comment

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

@adamantike sorry to make you do more work, but if we could take this opportunity to also remove unused variables following #85 in examples/complete

variable "standard_transition_days" {
type = number
default = 30
description = "Number of days to persist in the standard storage tier before moving to the infrequent access tier"
}
variable "glacier_transition_days" {
type = number
default = 60
description = "Number of days after which to move the data to the glacier storage tier"
}
variable "enable_glacier_transition" {
type = bool
default = true
description = "Enables the transition to AWS Glacier which can cause unnecessary costs for huge amount of small files"
}
variable "enable_standard_ia_transition" {
type = bool
default = false
description = "Enables the transition to STANDARD_IA"
}
variable "expiration_days" {
type = number
default = 90
description = "Number of days after which to expunge the objects"
}
and possibly any other variable that was missed, that would be best

@mergify
Copy link

mergify bot commented Jul 2, 2021

This pull request is now in conflict. Could you fix it @adamantike? 🙏

@korenyoni
Copy link
Member

korenyoni commented Jan 16, 2022

At this point in time we are on 0.45.0, which is even further away from 0.35.0 when this variable stopped being used. I'm just going to go ahead and proceed with this change without any attempt at backwards compatibility with anything prior to 0.35.0.

@Nuru I agree with you in principle, but in this particular case it's a lost cause (a difference of 10 minor versions).

aknysh
aknysh previously approved these changes Jan 16, 2022
Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

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

tis is already a part of variable "lifecycle_rules", we can delete it

@mergify mergify bot dismissed korenyoni’s stale review January 16, 2022 17:41

This Pull Request has been updated, so we're dismissing all reviews.

@korenyoni
Copy link
Member

/test all

@korenyoni korenyoni added the no-release Do not create a new release (wait for additional code changes) label Jan 16, 2022
@korenyoni korenyoni changed the title Remove unused variable abort_incomplete_multipart_upload_days Remove unused variable abort_incomplete_multipart_upload_days Jan 16, 2022
@korenyoni korenyoni merged commit 677c231 into cloudposse:master Jan 16, 2022
@korenyoni korenyoni added the bug 🐛 An issue with the system label Jan 16, 2022
@adamantike adamantike deleted the remove-abort_incomplete_multipart_upload_days branch January 16, 2022 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system no-release Do not create a new release (wait for additional code changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

abort_incomplete_multipart_upload_days is not used
4 participants