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

test: fix TestAcquire/bigquery/resourceid-userspecifiedresourceid #3171

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

jingyih
Copy link
Collaborator

@jingyih jingyih commented Nov 13, 2024

Add back the projectRef, which was likely removed unintentionally in a previous PR #2814.

Fixes #3170

Copy link
Collaborator

@yuwenma yuwenma left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Thank you for the fix! @xiaoweim Could you investigate why the presubmit cannot catch this? (I think porjectRef is required)

Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yuwenma

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 98733eb into GoogleCloudPlatform:master Nov 13, 2024
18 checks passed
@jingyih
Copy link
Collaborator Author

jingyih commented Nov 13, 2024

Thank you for the fix! @xiaoweim Could you investigate why the presubmit cannot catch this? (I think porjectRef is required)

I think the "container_annotation_handler" webhook currently adds projectRef for this resource.

I took a closer look, TestAcquire has a different test flow than other dynamic integration e2e tests (e.g. the most common test TestCreateNoChangeUpdateDelete). In TestAcquire, the test performs a TF get (direct controller for this resource is not enabled by default yet) before the webhooks get a chance to add projectRef to the resource. Therefore causing the error.

@yuwenma
Copy link
Collaborator

yuwenma commented Nov 14, 2024

Thank you for the fix! @xiaoweim Could you investigate why the presubmit cannot catch this? (I think porjectRef is required)

I think the "container_annotation_handler" webhook currently adds projectRef for this resource.

I took a closer look, TestAcquire has a different test flow than other dynamic integration e2e tests (e.g. the most common test TestCreateNoChangeUpdateDelete). In TestAcquire, the test performs a TF get (direct controller for this resource is not enabled by default yet) before the webhooks get a chance to add projectRef to the resource. Therefore causing the error.

Thank you for the investigation, @jingyih! Add @maqiuyujoyce to the thread, this is something the dynamic test can improve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failure TestAcquire/bigquery/resourceid-userspecifiedresourceid
2 participants