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

tests: capture GRPC traffic also #1655

Merged
merged 3 commits into from
Jun 6, 2024

Conversation

justinsb
Copy link
Collaborator

  • tfprovider: support intercepting GRPC requests
  • tests: record grpc requests in our golden tests
  • tests: capture golden output for bigtabletable test

@justinsb justinsb force-pushed the capture_grpc branch 2 times, most recently from 712924c to 87c076f Compare April 29, 2024 16:25
Copy link
Collaborator

Choose a reason for hiding this comment

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

This probably needs to be called something else then, right? Like _grpc.golden.log ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

maybe ... the issue is that it's still http traffic, we're just decoding the GRPC requests. There are some http logs where we intermingle http and GRPC!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We could maybe rename _http.log to _requests.log or _gcp.log - it's really the log of non-kube requests/responses.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think keeping the name as it is should be good. From the testing level, it doesn't really matter where the resource comes from or talks to. We care more on the resource itself.

@justinsb
Copy link
Collaborator Author

/assign @yuwenma

This is on the path for reproducing a bigtable issue (#1780)

@justinsb justinsb added this to the 1.119 milestone May 13, 2024
@@ -32,6 +33,10 @@ func (s BigtableClientFactory) NewInstanceAdminClient(project string) (*bigtable
opts = append(opts, option.WithTokenSource(s.TokenSource), option.WithUserAgent(s.UserAgent))
opts = append(opts, s.gRPCLoggingOptions...)

if GRPCUnaryClientInterceptor != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this change from the upstream tf repo fetch or we manually added the logic?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added manually

@yuwenma
Copy link
Collaborator

yuwenma commented May 13, 2024

/lgtm
/approve

The fail test looks suspicious. Could you rerun?

@google-oss-prow google-oss-prow bot added the lgtm label May 13, 2024
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

justinsb added 2 commits June 6, 2024 09:58
We aim to construct a readable version of the GRPC requests.
This uses our new GRPC collection infrastructure.
@yuwenma
Copy link
Collaborator

yuwenma commented Jun 6, 2024

/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label Jun 6, 2024
@google-oss-prow google-oss-prow bot merged commit 040ef44 into GoogleCloudPlatform:master Jun 6, 2024
14 checks passed
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.

3 participants