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

aws_batch_job_queue add compute_environment_order and deprecate compute_environments #34750

Merged
merged 16 commits into from
Mar 5, 2024

Conversation

drewmullen
Copy link
Collaborator

@drewmullen drewmullen commented Dec 5, 2023

Description

  • compute_environments (CEs) and compute_environment_order (CEOs) are mutually exclusive
  • In order to preserve schema migration, compute_environments must stay as the "default" or it will cause breaking changes when a users schema is migrated from CEs in state without requiring them to update their HCL to use CEOs.
  • Because import requires CEs it is impossible to migrate to CEOs parameter :/ You must have done the initial Create with it

Relations

Closes #34760
Closes #19247
Closes #20764

Does not close or resolve #34794 however, migration does appear to work as expected

References

Output from Acceptance Testing

$ make testacc TESTS=TestAccBatchJobQueue_ PKG=batch
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/batch/... -v -count 1 -parallel 20 -run='TestAccBatchJobQueue_'  -timeout 360m
=== RUN   TestAccBatchJobQueue_basic
=== PAUSE TestAccBatchJobQueue_basic
=== RUN   TestAccBatchJobQueue_basicCEO
=== PAUSE TestAccBatchJobQueue_basicCEO
=== RUN   TestAccBatchJobQueue_disappears
=== PAUSE TestAccBatchJobQueue_disappears
=== RUN   TestAccBatchJobQueue_disappearsCEO
=== PAUSE TestAccBatchJobQueue_disappearsCEO
=== RUN   TestAccBatchJobQueue_MigrateFromPluginSDK
=== PAUSE TestAccBatchJobQueue_MigrateFromPluginSDK
=== RUN   TestAccBatchJobQueue_ComputeEnvironments_multiple
=== PAUSE TestAccBatchJobQueue_ComputeEnvironments_multiple
=== RUN   TestAccBatchJobQueue_ComputeEnvironmentOrder_multiple
=== PAUSE TestAccBatchJobQueue_ComputeEnvironmentOrder_multiple
=== RUN   TestAccBatchJobQueue_ComputeEnvironments_externalOrderUpdate
=== PAUSE TestAccBatchJobQueue_ComputeEnvironments_externalOrderUpdate
=== RUN   TestAccBatchJobQueue_priority
=== PAUSE TestAccBatchJobQueue_priority
=== RUN   TestAccBatchJobQueue_schedulingPolicy
=== PAUSE TestAccBatchJobQueue_schedulingPolicy
=== RUN   TestAccBatchJobQueue_state
=== PAUSE TestAccBatchJobQueue_state
=== RUN   TestAccBatchJobQueue_tags
=== PAUSE TestAccBatchJobQueue_tags
=== CONT  TestAccBatchJobQueue_basic
=== CONT  TestAccBatchJobQueue_ComputeEnvironmentOrder_multiple
=== CONT  TestAccBatchJobQueue_disappearsCEO
=== CONT  TestAccBatchJobQueue_disappears
=== CONT  TestAccBatchJobQueue_tags
=== CONT  TestAccBatchJobQueue_priority
=== CONT  TestAccBatchJobQueue_MigrateFromPluginSDK
=== CONT  TestAccBatchJobQueue_schedulingPolicy
=== CONT  TestAccBatchJobQueue_ComputeEnvironments_multiple
=== CONT  TestAccBatchJobQueue_state
=== CONT  TestAccBatchJobQueue_ComputeEnvironments_externalOrderUpdate
=== CONT  TestAccBatchJobQueue_basicCEO
=== NAME  TestAccBatchJobQueue_MigrateFromPluginSDK
    testing_new.go:80: Error retrieving state, there may be dangling resources: exit status 1
        Failed to marshal state to json: schema version 0 for aws_batch_job_queue.test in state does not match version 1 from the provider
--- FAIL: TestAccBatchJobQueue_MigrateFromPluginSDK (225.20s)
--- PASS: TestAccBatchJobQueue_disappearsCEO (533.22s)
--- PASS: TestAccBatchJobQueue_disappears (533.37s)
--- PASS: TestAccBatchJobQueue_basic (542.01s)
--- PASS: TestAccBatchJobQueue_ComputeEnvironments_externalOrderUpdate (543.04s)
--- PASS: TestAccBatchJobQueue_basicCEO (547.48s)
--- PASS: TestAccBatchJobQueue_priority (705.88s)
--- PASS: TestAccBatchJobQueue_state (716.18s)
--- PASS: TestAccBatchJobQueue_ComputeEnvironmentOrder_multiple (767.04s)
--- PASS: TestAccBatchJobQueue_schedulingPolicy (770.29s)
--- PASS: TestAccBatchJobQueue_ComputeEnvironments_multiple (778.00s)
--- PASS: TestAccBatchJobQueue_tags (801.21s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/batch      803.366s
FAIL
make: *** [testacc] Error 1

Copy link

github-actions bot commented Dec 5, 2023

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/batch Issues and PRs that pertain to the batch service. and removed size/L Managed by automation to categorize the size of a PR. labels Dec 5, 2023
@terraform-aws-provider terraform-aws-provider bot added needs-triage Waiting for first response or review from a maintainer. external-maintainer Contribution from a trusted external contributor. labels Dec 5, 2023
@drewmullen drewmullen removed the needs-triage Waiting for first response or review from a maintainer. label Dec 6, 2023
@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Dec 6, 2023
@drewmullen drewmullen changed the title [WIP] aws_batch_job_queue add compute_environment_order and deprecate compute_environments aws_batch_job_queue add compute_environment_order and deprecate compute_environments Dec 12, 2023
@drewmullen drewmullen marked this pull request as ready for review December 12, 2023 21:21
@drewmullen drewmullen force-pushed the f-batch_job_queue-ceo-noexpand branch 3 times, most recently from 51b7fb6 to 34c67e9 Compare December 13, 2023 13:41
internal/service/batch/job_queue_schema.go Outdated Show resolved Hide resolved
internal/service/batch/job_queue.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@AdamTylerLynch AdamTylerLynch left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@nithinvenugopal
Copy link

@danquack @drewmullen any update on this?

@drewmullen
Copy link
Collaborator Author

@nithinvenugopal just waiting for it to be merged and released. Not up to me /shrug

@gdavison gdavison self-assigned this Mar 5, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Mar 5, 2024
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

Looks good! 🚀

--- FAIL: TestAccBatchJobQueue_MigrateFromPluginSDK (56.11s)
--- PASS: TestAccBatchJobQueue_disappears (96.94s)
--- PASS: TestAccBatchJobQueue_disappearsCEO (100.21s)
--- PASS: TestAccBatchJobQueue_basic (101.46s)
--- PASS: TestAccBatchJobQueue_ComputeEnvironments_externalOrderUpdate (109.78s)
--- PASS: TestAccBatchJobQueue_basicCEO (110.14s)
--- PASS: TestAccBatchJobQueue_tags (115.58s)
--- PASS: TestAccBatchJobQueue_priority (148.34s)
--- PASS: TestAccBatchJobQueue_schedulingPolicy (148.96s)
--- PASS: TestAccBatchJobQueue_state (148.96s)
--- PASS: TestAccBatchJobQueue_ComputeEnvironments_multiple (151.33s)
--- PASS: TestAccBatchJobQueue_ComputeEnvironmentOrder_multiple (166.04s)

TestAccBatchJobQueue_MigrateFromPluginSDK is a pre-existing failure

@gdavison gdavison force-pushed the f-batch_job_queue-ceo-noexpand branch from 2f2eea6 to 70825ba Compare March 5, 2024 20:17
@gdavison gdavison merged commit 3e4117e into hashicorp:main Mar 5, 2024
43 checks passed
@github-actions github-actions bot added this to the v5.40.0 milestone Mar 5, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Mar 7, 2024
Copy link

github-actions bot commented Mar 7, 2024

This functionality has been released in v5.40.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. Thank you!

Copy link

github-actions bot commented Apr 7, 2024

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. external-maintainer Contribution from a trusted external contributor. service/batch Issues and PRs that pertain to the batch service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
6 participants