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

fix(app): #2645 Fixed data source label selection #2660

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Klopklopi
Copy link

@Klopklopi Klopklopi commented Dec 30, 2024

Fix label selection

Description

Fixed the missing implementation of selection with label in the datasource. Before it was only getting the pods with the name attribute, now it can select with labels.

Acceptance tests

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS="-run ^TestAccKubernetesDataSourcePodV1"              
==> Checking that code complies with gofmt requirements...
go vet ./...
TF_ACC=1 go test "/Users/hugojoubert/development/hashicorp/terraform-provider-kubernetes/kubernetes" -v -vet=off -run ^TestAccKubernetesDataSourcePodV1 -parallel 8 -timeout 3h
=== RUN   TestAccKubernetesDataSourcePodV1_basic
=== PAUSE TestAccKubernetesDataSourcePodV1_basic
=== RUN   TestAccKubernetesDataSourcePodV1_not_found
=== PAUSE TestAccKubernetesDataSourcePodV1_not_found
=== RUN   TestAccKubernetesDataSourcePodV1_readWithLabel
=== PAUSE TestAccKubernetesDataSourcePodV1_readWithLabel
=== CONT  TestAccKubernetesDataSourcePodV1_basic
=== CONT  TestAccKubernetesDataSourcePodV1_readWithLabel
=== CONT  TestAccKubernetesDataSourcePodV1_not_found
--- PASS: TestAccKubernetesDataSourcePodV1_not_found (3.26s)
--- PASS: TestAccKubernetesDataSourcePodV1_readWithLabel (9.87s)
--- PASS: TestAccKubernetesDataSourcePodV1_basic (9.93s)
PASS
ok      github.com/hashicorp/terraform-provider-kubernetes/kubernetes   11.450s

Release Note

Release note for CHANGELOG:

`data_source_kubernetes_pod_v1` : Fixed name required problem and label selection issue

References

Close Issue : #2645

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Fixed the missing implementation of selection with label in the datasource. Before it was only getting the pods with the name attribute, now it can select with labels
Copy link

hashicorp-cla-app bot commented Dec 30, 2024

CLA assistant check
All committers have signed the CLA.

Based on the issue description, the name in the metadata nested resource was mandatory, which is not the intended behaviour. Added test to verify if the label selection is working as intended and that the name attribute is not required every time.
@github-actions github-actions bot added size/M and removed size/S labels Dec 31, 2024
@Klopklopi Klopklopi marked this pull request as ready for review December 31, 2024 10:41
@Klopklopi Klopklopi requested a review from a team as a code owner December 31, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant