-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
correct linting errors for typelist/max_items schema attributes #13090
Conversation
# Conflicts: # aws/resource_aws_s3_bucket_test.go
aws/resource_aws_s3_bucket.go
Outdated
@@ -2191,33 +2186,38 @@ func resourceAwsS3BucketLifecycleUpdate(s3conn *s3.S3, d *schema.ResourceData) e | |||
} | |||
|
|||
// Expiration | |||
expiration := d.Get(fmt.Sprintf("lifecycle_rule.%d.expiration", i)).(*schema.Set).List() | |||
expiration := d.Get(fmt.Sprintf("lifecycle_rule.%d.expiration", i)).([]interface{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering if this is the correct way to get the expiration
value from the resource b/c I noticed if expiration is passed in as empty expiration {}
block for example in a TF config, the value of this expiration
variable is [ nil ]
, requiring the 2 if
checks below..while previously only 1 if
was needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value extracted here and in nc_expiration
at L2212 could also explain new test failure seen in TestAccAWSS3Bucket_LifecycleRule_Expiration_EmptyConfigurationBlock
...though following the logic, the error seems to makes sense to me as nothing in the rule
object will be populated in terms of an action
if one were to pass just the enabled
and id
params to lifecycle_rule
aws/resource_aws_s3_bucket.go
Outdated
} | ||
|
||
// NoncurrentVersionExpiration | ||
nc_expiration := d.Get(fmt.Sprintf("lifecycle_rule.%d.noncurrent_version_expiration", i)).(*schema.Set).List() | ||
nc_expiration := d.Get(fmt.Sprintf("lifecycle_rule.%d.noncurrent_version_expiration", i)).([]interface{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above
Not sure how @gdavison feels on the subject, but can you please split this up per resource or service? Some of these are going to be a lot harder to review/fix than others and also for some of these we can close out a laundry list of issues (e.g. |
sure thing! I was just starting to pull out 3 resources b/c of test failures and was thinking to myself I should of split things up more 😅 |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Closes #9956
Release note for CHANGELOG:
Output from acceptance testing: