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

d/aws_batch_job_definition #34663

Merged
merged 20 commits into from
Feb 19, 2024
Merged

d/aws_batch_job_definition #34663

merged 20 commits into from
Feb 19, 2024

Conversation

danquack
Copy link
Contributor

@danquack danquack commented Nov 30, 2023

Description

Creates a data source for batch_job_definition.

Relations

closes #28665

References

Output from Acceptance Testing

% make testacc TESTS="TestAccBatchJobDefinitionDataSource" PKG=batch                        
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/batch/... -v -count 1 -parallel 20 -run='TestAccBatchJobDefinitionDataSource'  -timeout 360m
=== RUN   TestAccBatchJobDefinitionDataSource_basicName
=== PAUSE TestAccBatchJobDefinitionDataSource_basicName
=== RUN   TestAccBatchJobDefinitionDataSource_basicARN
=== PAUSE TestAccBatchJobDefinitionDataSource_basicARN
=== RUN   TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties
=== PAUSE TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties
=== RUN   TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties
=== PAUSE TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties
=== CONT  TestAccBatchJobDefinitionDataSource_basicName
=== CONT  TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties
=== CONT  TestAccBatchJobDefinitionDataSource_basicARN
=== CONT  TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties
--- PASS: TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties (16.03s)
--- PASS: TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties (17.46s)
--- PASS: TestAccBatchJobDefinitionDataSource_basicName (26.61s)
--- PASS: TestAccBatchJobDefinitionDataSource_basicARN (26.78s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/batch	28.724s

Copy link

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/XL 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. client-connections Pertains to the AWS Client and service connections. generators Relates to code generators. labels Nov 30, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Nov 30, 2023
Copy link

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

@justinretzolk justinretzolk added new-data-source Introduces a new data source. and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 6, 2023
@danquack danquack marked this pull request as ready for review December 20, 2023 00:12
Copy link
Collaborator

@drewmullen drewmullen left a comment

Choose a reason for hiding this comment

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

1 requested change

internal/service/batch/job_definition_data_source.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@drewmullen drewmullen left a comment

Choose a reason for hiding this comment

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

LGTM!

make testacc TESTS="TestAccBatchJobDefinitionDataSource" PKG=batch  
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/batch/... -v -count 1 -parallel 20 -run='TestAccBatchJobDefinitionDataSource'  -timeout 360m
=== RUN   TestAccBatchJobDefinitionDataSource_basicName
=== PAUSE TestAccBatchJobDefinitionDataSource_basicName
=== RUN   TestAccBatchJobDefinitionDataSource_basicARN
=== PAUSE TestAccBatchJobDefinitionDataSource_basicARN
=== RUN   TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties
=== PAUSE TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties
=== RUN   TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties
=== PAUSE TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties
=== CONT  TestAccBatchJobDefinitionDataSource_basicName
=== CONT  TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties
=== CONT  TestAccBatchJobDefinitionDataSource_basicARN
=== CONT  TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties
--- PASS: TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties (41.02s)
--- PASS: TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties (42.70s)
--- PASS: TestAccBatchJobDefinitionDataSource_basicName (57.54s)
--- PASS: TestAccBatchJobDefinitionDataSource_basicARN (67.12s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/batch      69.494s

@ewbankkit ewbankkit self-assigned this Feb 15, 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 Feb 15, 2024
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccBatchJobDefinitionDataSource_' PKG=batch ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/batch/... -v -count 1 -parallel 2  -run=TestAccBatchJobDefinitionDataSource_ -timeout 360m
=== RUN   TestAccBatchJobDefinitionDataSource_basicName
=== PAUSE TestAccBatchJobDefinitionDataSource_basicName
=== RUN   TestAccBatchJobDefinitionDataSource_basicARN
=== PAUSE TestAccBatchJobDefinitionDataSource_basicARN
=== RUN   TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties
=== PAUSE TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties
=== RUN   TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties
=== PAUSE TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties
=== CONT  TestAccBatchJobDefinitionDataSource_basicName
=== CONT  TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties
--- PASS: TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties (17.97s)
=== CONT  TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties
--- PASS: TestAccBatchJobDefinitionDataSource_basicName (30.52s)
=== CONT  TestAccBatchJobDefinitionDataSource_basicARN
--- PASS: TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties (16.76s)
--- PASS: TestAccBatchJobDefinitionDataSource_basicARN (26.84s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/batch	68.476s

# Conflicts:
#	internal/service/batch/service_endpoints_gen_test.go
@ewbankkit
Copy link
Contributor

@danquack Thanks for the contribution 🎉 👏.

@danquack
Copy link
Contributor Author

I noticed you switched the data source from using Single Object -> List to work with autoflex. By switching to lists, should these tests also work without an index? One of the reasons I did object originally was for the purity of not having to do .0, but that may be something we want to do with the provider (#35813).

resource.TestCheckResourceAttr(dataSourceName, "eks_properties.pod_properties.containers.#", "1"),
resource.TestCheckResourceAttr(dataSourceName, "eks_properties.pod_properties.containers.0.image", "public.ecr.aws/amazonlinux/amazonlinux:1"),

Also, when I run the test command I am seeing some panics in the auto flexing. I see yours passed, but maybe it is something in my local development setup, just borked?

make testacc TESTARGS='-run=TestAccBatchJobDefinitionDataSource_' PKG=batch ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/batch/... -v -count 1 -parallel 2  -run=TestAccBatchJobDefinitionDataSource_ -timeout 360m
=== RUN   TestAccBatchJobDefinitionDataSource_basicName
=== PAUSE TestAccBatchJobDefinitionDataSource_basicName
=== RUN   TestAccBatchJobDefinitionDataSource_basicARN
=== PAUSE TestAccBatchJobDefinitionDataSource_basicARN
=== RUN   TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties
=== PAUSE TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties
=== RUN   TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties
=== PAUSE TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties
=== CONT  TestAccBatchJobDefinitionDataSource_basicName
=== CONT  TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties
=== NAME  TestAccBatchJobDefinitionDataSource_basicName
    job_definition_data_source_test.go:23: Step 1/2 error: Check failed: Check 3/3 error: data.aws_batch_job_definition.test: Attribute 'retry_strategy.attempts' not found
=== NAME  TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties
    job_definition_data_source_test.go:91: Step 1/1 error: Check failed: Check 1/3 error: data.aws_batch_job_definition.test: Attribute 'node_properties.main_node' not found
--- FAIL: TestAccBatchJobDefinitionDataSource_basicName (10.53s)
=== CONT  TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties
--- FAIL: TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties (10.59s)
=== CONT  TestAccBatchJobDefinitionDataSource_basicARN
panic: Value Conversion Error

An unexpected error was encountered trying to convert from struct value. This is always an error in the provider. Please report the following to the provider developer:

error retrieving field names from struct tags: [0].limits: can't use field name for both Limits and Requests
[0]

goroutine 10330 [running]:
github.com/hashicorp/terraform-provider-aws/internal/errs.Must[...](...)
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/errs/must.go:13
github.com/hashicorp/terraform-provider-aws/internal/errs/fwdiag.Must[...](...)
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/errs/fwdiag/must.go:17
github.com/hashicorp/terraform-provider-aws/internal/framework/types.newListNestedObjectValueOf[...]({0x113262c30, 0x14004633860}, {0x110558960, 0x14002d68de0})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/types/list_nested_objectof.go:236 +0x138
github.com/hashicorp/terraform-provider-aws/internal/framework/types.NewListNestedObjectValueOfSlice[...](...)
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/types/list_nested_objectof.go:228
github.com/hashicorp/terraform-provider-aws/internal/framework/types.NewListNestedObjectValueOfPtr[...](...)
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/types/list_nested_objectof.go:224
github.com/hashicorp/terraform-provider-aws/internal/framework/types.listNestedObjectTypeOf[...].ValueFromObjectPtr(0x1132e1280?, {0x113262c30?, 0x14004633860}, {0x110510600, 0x14002d4b180})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/types/list_nested_objectof.go:115 +0xd4
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlattener.structToNestedObject({}, {0x113262c30, 0x14004633860}, {0x11234ea20?, 0x14002d68b10?, 0x140036247e8?}, 0xc4?, {0x1295abcd8, 0x14004f47930}, {0x112d84860?, ...})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/auto_flatten.go:721 +0x22c
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlattener.struct_({}, {0x113262c30, 0x14004633860}, {0x11234ea20?, 0x14002d68b10?, 0x14004f47920?}, 0x68?, {0x113278ad8?, 0x14004f47930?}, {0x112d84860?, ...})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/auto_flatten.go:304 +0x20c
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlattener.ptr({}, {0x113262c30, 0x14004633860}, {0x1111436e0?, 0x1400b3b5ad0?, 0x1132d85e8?}, {0x113278ad8?, 0x14004f47930?}, {0x112d84860?, 0x1400b5f9bd8?, ...})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/auto_flatten.go:284 +0x3d4
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlattener.convert({}, {0x113262c30, 0x14004633860}, {0x1111436e0?, 0x1400b3b5ad0?, 0x1400acae780?}, {0x112d84860?, 0x1400b5f9bd8?, 0x102ee53a0?})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/auto_flatten.go:76 +0x250
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlexConvertStruct({0x113262c30, 0x14004633860}, {0x112d8f700?, 0x1400b3b5a70?}, {0x1105106c0?, 0x1400b5f9b00?}, {0x1130dea00, 0x11aff1940})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/autoflex.go:110 +0x2c4
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlattener.sliceOfStructNestedObjectCollection({}, {0x113262c30, 0x14004633860}, {0x1105614e0?, 0x1400d950f00?, 0x1121355c0?}, {0x1295abba8, 0x14004f478c0}, {0x112d84c80?, 0x14002cf4480?, ...})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/auto_flatten.go:762 +0x42c
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlattener.slice({}, {0x113262c30, 0x14004633860}, {0x1105614e0?, 0x1400d950f00?, 0x1132d85e8?}, {0x113278778?, 0x14004f478c0}, {0x112d84c80?, 0x14002cf4480?, ...})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/auto_flatten.go:489 +0x450
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlattener.convert({}, {0x113262c30, 0x14004633860}, {0x1105614e0?, 0x1400d950f00?, 0x1400acae648?}, {0x112d84c80?, 0x14002cf4480?, 0x102ee53a0?})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/auto_flatten.go:80 +0x2a4
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlexConvertStruct({0x113262c30, 0x14004633860}, {0x112bd4820?, 0x1400d950f00?}, {0x110510840?, 0x14002cf4480?}, {0x1130dea00, 0x11aff1940})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/autoflex.go:110 +0x2c4
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlattener.structToNestedObject({}, {0x113262c30, 0x14004633860}, {0x112bd4820?, 0x1400d950cc0?, 0x111b68800?}, 0x0?, {0x1295abb48, 0x14004f47830}, {0x112d854c0?, ...})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/auto_flatten.go:715 +0x190
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlattener.struct_({}, {0x113262c30, 0x14004633860}, {0x112bd4820?, 0x1400d950cc0?, 0x112d85360?}, 0xa9?, {0x1132780b8?, 0x14004f47830?}, {0x112d854c0?, ...})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/auto_flatten.go:304 +0x20c
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlattener.ptr({}, {0x113262c30, 0x14004633860}, {0x111143b00?, 0x14004f47730?, 0x1132d85e8?}, {0x1132780b8?, 0x14004f47830?}, {0x112d854c0?, 0x14006ee6de0?, ...})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/auto_flatten.go:284 +0x3d4
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlattener.convert({}, {0x113262c30, 0x14004633860}, {0x111143b00?, 0x14004f47730?, 0x1400acae510?}, {0x112d854c0?, 0x14006ee6de0?, 0x102ee53a0?})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/auto_flatten.go:76 +0x250
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlexConvertStruct({0x113262c30, 0x14004633860}, {0x11206bf20?, 0x14004f47730?}, {0x110510880?, 0x14006ee6de0?}, {0x1130dea00, 0x11aff1940})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/autoflex.go:110 +0x2c4
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlattener.structToNestedObject({}, {0x113262c30, 0x14004633860}, {0x11206bf20?, 0x14004f47570?, 0x14004f47701?}, 0x28?, {0x129479e90, 0x14004f47720}, {0x112d85620?, ...})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/auto_flatten.go:715 +0x190
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlattener.struct_({}, {0x113262c30, 0x14004633860}, {0x11206bf20?, 0x14004f47570?, 0x111b68800?}, 0x40?, {0x113277f98?, 0x14004f47720?}, {0x112d85620?, ...})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/auto_flatten.go:304 +0x20c
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlattener.ptr({}, {0x113262c30, 0x14004633860}, {0x111143c20?, 0x140072b2df8?, 0x0?}, {0x113277f98?, 0x14004f47720?}, {0x112d85620?, 0x14007644830?, ...})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/auto_flatten.go:284 +0x3d4
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlattener.convert({}, {0x113262c30, 0x14004633860}, {0x111143c20?, 0x140072b2df8?, 0x1400acae3c8?}, {0x112d85620?, 0x14007644830?, 0x102ee5300?})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/auto_flatten.go:76 +0x250
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlexConvertStruct({0x113262c30, 0x14004633860}, {0x111144160?, 0x140072b2dc0?}, {0x1105108c0?, 0x14007644800?}, {0x1130dea20, 0x11aff1940})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/autoflex.go:110 +0x2c4
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.autoFlexConvert({0x113262c30, 0x14004633860}, {0x111144160, 0x140072b2dc0}, {0x1105108c0, 0x14007644800}, {0x1130dea20?, 0x11aff1940?})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/autoflex.go:48 +0x1c8
github.com/hashicorp/terraform-provider-aws/internal/framework/flex.Flatten({0x113262c30, 0x14004633860}, {0x111144160, 0x140072b2dc0}, {0x1105108c0, 0x14007644800}, {0x0, 0x0, 0x1105108c0?})
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/framework/flex/auto_flatten.go:36 +0xb0
github.com/hashicorp/terraform-provider-aws/internal/service/batch.(*jobDefinitionDataSource).Read(0x14006d9fc30, {0x113262c30, 0x14004633860}, {{{{0x113292ea0, 0x14006fbb740}, {0x11138c440, 0x140041ff6b0}}, {0x1132a21d8, 0x14005a372c0}}, {{{0x0, ...}, ...}, ...}}, ...)
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/service/batch/job_definition_data_source.go:193 +0x5cc
github.com/hashicorp/terraform-provider-aws/internal/provider/fwprovider.(*wrappedDataSource).Read(0x14002d4a800, {0x113262c30?, 0x1400508b800?}, {{{{0x113292ea0, 0x14006fbb740}, {0x11138c440, 0x140041ff6b0}}, {0x1132a21d8, 0x14005a372c0}}, {{{0x0, ...}, ...}, ...}}, ...)
	/Users/danielquackenbush/code/aws/terraform-provider-aws/internal/provider/fwprovider/intercept.go:173 +0x100
github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ReadDataSource(0x14005190680, {0x113262c30, 0x1400508b800}, 0x1400508b830, 0x14003627608)
	/Users/danielquackenbush/go/pkg/mod/github.com/hashicorp/terraform-plugin-framework@v1.5.0/internal/fwserver/server_readdatasource.go:79 +0x394
github.com/hashicorp/terraform-plugin-framework/internal/proto5server.(*Server).ReadDataSource(0x14005190680, {0x113262c30?, 0x1400508b560?}, 0x140084d9240)
	/Users/danielquackenbush/go/pkg/mod/github.com/hashicorp/terraform-plugin-framework@v1.5.0/internal/proto5server/server_readdatasource.go:55 +0x31c
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ReadDataSource(0x113262c68?, {0x113262c30?, 0x1400508b290?}, 0x140084d9240)
	/Users/danielquackenbush/go/pkg/mod/github.com/hashicorp/terraform-plugin-mux@v0.14.0/tf5muxserver/mux_server_ReadDataSource.go:36 +0x18c
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadDataSource(0x1400b7d41e0, {0x113262c30?, 0x1400508aab0?}, 0x14001ff41e0)
	/Users/danielquackenbush/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.21.0/tfprotov5/tf5server/server.go:685 +0x344
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadDataSource_Handler({0x112e280e0?, 0x1400b7d41e0}, {0x113262c30, 0x1400508aab0}, 0x1400538f300, 0x0)
	/Users/danielquackenbush/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.21.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:572 +0x164
google.golang.org/grpc.(*Server).processUnaryRPC(0x1400652c000, {0x113262c30, 0x1400508aa20}, {0x113295740, 0x1400269b380}, 0x14002cf9680, 0x1400731ddd0, 0x11af99660, 0x0)
	/Users/danielquackenbush/go/pkg/mod/google.golang.org/grpc@v1.61.0/server.go:1385 +0xb8c
google.golang.org/grpc.(*Server).handleStream(0x1400652c000, {0x113295740, 0x1400269b380}, 0x14002cf9680)
	/Users/danielquackenbush/go/pkg/mod/google.golang.org/grpc@v1.61.0/server.go:1796 +0xc44
google.golang.org/grpc.(*Server).serveStreams.func2.1()
	/Users/danielquackenbush/go/pkg/mod/google.golang.org/grpc@v1.61.0/server.go:1029 +0x8c
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 9254
	/Users/danielquackenbush/go/pkg/mod/google.golang.org/grpc@v1.61.0/server.go:1040 +0x150
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/batch	20.710s
FAIL
make: *** [testacc] Error 1

@ewbankkit
Copy link
Contributor

ewbankkit commented Feb 19, 2024

@danquack We want to keep to stick to "list of objects" rather than just "objects" to maintain compatibility with data source written using Plugin SDK v2, plus we can share the "model" structures used for AutoFlEx with the corresponding resource when we (eventually) migrate it.
The tests should all pass if you the latest commits.

@ewbankkit
Copy link
Contributor

Actually, something seems to have gone awry with that last merge. They were working...

@ewbankkit
Copy link
Contributor

ewbankkit commented Feb 19, 2024

374458a fixes those final problems. Thanks for spotting that 👏.

% make testacc TESTARGS='-run=TestAccBatchJobDefinitionDataSource_' PKG=batch ACCTEST_PARALLELISM=2 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/batch/... -v -count 1 -parallel 2  -run=TestAccBatchJobDefinitionDataSource_ -timeout 360m
=== RUN   TestAccBatchJobDefinitionDataSource_basicName
=== PAUSE TestAccBatchJobDefinitionDataSource_basicName
=== RUN   TestAccBatchJobDefinitionDataSource_basicARN
=== PAUSE TestAccBatchJobDefinitionDataSource_basicARN
=== RUN   TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties
=== PAUSE TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties
=== RUN   TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties
=== PAUSE TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties
=== CONT  TestAccBatchJobDefinitionDataSource_basicName
=== CONT  TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties
--- PASS: TestAccBatchJobDefinitionDataSource_basicARN_NodeProperties (19.57s)
=== CONT  TestAccBatchJobDefinitionDataSource_basicARN
--- PASS: TestAccBatchJobDefinitionDataSource_basicName (34.06s)
=== CONT  TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties
--- PASS: TestAccBatchJobDefinitionDataSource_basicARN (34.60s)
--- PASS: TestAccBatchJobDefinitionDataSource_basicARN_EKSProperties (20.60s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/batch	68.058s

@ewbankkit ewbankkit merged commit 7ea9619 into hashicorp:main Feb 19, 2024
50 checks passed
@github-actions github-actions bot added this to the v5.38.0 milestone Feb 19, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Feb 23, 2024
Copy link

This functionality has been released in v5.38.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

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 Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
client-connections Pertains to the AWS Client and service connections. documentation Introduces or discusses updates to documentation. generators Relates to code generators. new-data-source Introduces a new data source. 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
Development

Successfully merging this pull request may close these issues.

[New Data Source]: aws_batch_job_definition
4 participants