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

resource/aws_codebuild_project: Migrate Attributes From TypeSet to TypeList #6427

Closed
bflad opened this issue Nov 11, 2018 · 5 comments · Fixed by #13417
Closed

resource/aws_codebuild_project: Migrate Attributes From TypeSet to TypeList #6427

bflad opened this issue Nov 11, 2018 · 5 comments · Fixed by #13417
Labels
service/codebuild Issues and PRs that pertain to the codebuild service. technical-debt Addresses areas of the codebase that need refactoring or redesign.
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Nov 11, 2018

Details

There are quite a few bugs related to attribute handing (especially artifacts) caused by the Set hashing. We should convert the Type: schema.TypeSet and MaxItems: 1 attributes to schema.TypeList to simplify how they work in the resource and testing. We can do it before a major version upgrade if we don't consider the attribute references changing from source.#####.X to source.0.X a real breaking change.

References

After the above change, these can hopefully be easier to close with covering acceptance tests:

@bflad bflad added service/codebuild Issues and PRs that pertain to the codebuild service. technical-debt Addresses areas of the codebase that need refactoring or redesign. labels Nov 11, 2018
@bflad bflad added this to the v2.0.0 milestone Nov 11, 2018
@vibhuyadav
Copy link

I am assuming #6643 might also belong to this list. Correct me if I am wrong

@bflad bflad modified the milestones: v2.0.0, v3.0.0 Feb 27, 2019
bflad added a commit that referenced this issue Apr 4, 2019
…ariable removal

References:

* hashicorp/terraform#20505
* #6427

The `environment` configuration block `environment_variable` configuration block came up in our `Optional: true` and `Computed: true` discovery as potentially problematic in Terraform 0.12 when the ability to use attribute syntax to zero out the configuration will require special implementation. However, it appears the functionality will actually continue to work due to the `environment` configuration block `Set` function and how updates of it are implemented.

Here we still add the covering test for when the `environment` configuration block attribute is switched from `TypeSet` to `TypeList` during future simplification work. While it would probably be okay to just remove `Computed: true` now, we take the less risky approach of just leaving this as-is for now until that simplification work is completed.

Output from acceptance testing:

```
--- PASS: TestAccAWSCodeBuildProject_Environment_EnvironmentVariable (37.91s)
```
@bflad bflad removed this from the v3.0.0 milestone Jul 31, 2019
bflad added a commit that referenced this issue Jul 31, 2019
…List and verify updates

Reference: #755
Reference: #2050
Reference: #6214
Reference: #6427
Reference: #7582

Output from acceptance testing:

```
--- PASS: TestAccAWSCodeBuildProject_Artifacts_EncryptionDisabled (58.62s)
--- PASS: TestAccAWSCodeBuildProject_Artifacts_NamespaceType (52.17s)
--- PASS: TestAccAWSCodeBuildProject_Artifacts_OverrideArtifactName (51.88s)
--- PASS: TestAccAWSCodeBuildProject_Artifacts_Packaging (51.20s)
--- PASS: TestAccAWSCodeBuildProject_Artifacts_Path (52.22s)
--- PASS: TestAccAWSCodeBuildProject_BadgeEnabled (33.85s)
--- PASS: TestAccAWSCodeBuildProject_basic (24.98s)
--- PASS: TestAccAWSCodeBuildProject_BuildTimeout (42.62s)
--- PASS: TestAccAWSCodeBuildProject_Cache (70.42s)
--- PASS: TestAccAWSCodeBuildProject_Description (42.32s)
--- PASS: TestAccAWSCodeBuildProject_EncryptionKey (52.39s)
--- PASS: TestAccAWSCodeBuildProject_Environment_Certificate (36.50s)
--- PASS: TestAccAWSCodeBuildProject_Environment_EnvironmentVariable (55.37s)
--- PASS: TestAccAWSCodeBuildProject_Environment_EnvironmentVariable_Type (30.64s)
--- PASS: TestAccAWSCodeBuildProject_Environment_RegistryCredential (40.62s)
--- PASS: TestAccAWSCodeBuildProject_importBasic (34.69s)
--- PASS: TestAccAWSCodeBuildProject_LogsConfig_CloudWatchLogs (48.53s)
--- PASS: TestAccAWSCodeBuildProject_LogsConfig_S3Logs (72.76s)
--- PASS: TestAccAWSCodeBuildProject_SecondaryArtifacts (37.23s)
--- PASS: TestAccAWSCodeBuildProject_SecondarySources_CodeCommit (29.35s)
--- PASS: TestAccAWSCodeBuildProject_Source_Auth (30.83s)
--- PASS: TestAccAWSCodeBuildProject_Source_GitCloneDepth (40.18s)
--- PASS: TestAccAWSCodeBuildProject_Source_InsecureSSL (31.11s)
--- PASS: TestAccAWSCodeBuildProject_Source_ReportBuildStatus_Bitbucket (42.65s)
--- PASS: TestAccAWSCodeBuildProject_Source_ReportBuildStatus_GitHub (34.28s)
--- PASS: TestAccAWSCodeBuildProject_Source_ReportBuildStatus_GitHubEnterprise (43.13s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_Bitbucket (33.90s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_CodeCommit (34.04s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_CodePipeline (29.80s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_GitHubEnterprise (29.93s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_NoSource (33.38s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_NoSourceInvalid (12.23s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_S3 (36.44s)
--- PASS: TestAccAWSCodeBuildProject_Tags (43.37s)
--- PASS: TestAccAWSCodeBuildProject_VpcConfig (62.05s)
--- PASS: TestAccAWSCodeBuildProject_WindowsContainer (23.75s)
```
@DrFaust92
Copy link
Collaborator

@bflad, is this still relevant? does this relate to the environment block?

@anGie44
Copy link
Contributor

anGie44 commented May 28, 2020

The fix for this has been merged and will release with v2.64.0 of the Terraform AWS Provider, expected in this week's release.

@anGie44 anGie44 added this to the v2.64.0 milestone May 28, 2020
@ghost
Copy link

ghost commented May 29, 2020

This has been released in version 2.64.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Jun 27, 2020

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!

@ghost ghost locked and limited conversation to collaborators Jun 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/codebuild Issues and PRs that pertain to the codebuild service. technical-debt Addresses areas of the codebase that need refactoring or redesign.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants