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

chore(storage): remove x-goog-api-client header merging from invoke #10514

Merged
merged 6 commits into from
Jul 10, 2024

Conversation

BrennaEpp
Copy link
Contributor

  • go version must still be included since uploads do not always include the version otherwise (other operations will see the value repeated, however)
  • xml still has to do the merging
  • grpc had a bug where the ctx from invoke was not being used so the header wouldn't always be sent

- go version must still be included since uploads do not always include the version otherwise (other operations will see the value repeated, however)
- xml still has to do the merging
- grpc had a bug where the ctx from invoke was not being used so the header wouldn't always be sent
@BrennaEpp BrennaEpp requested review from a team as code owners July 6, 2024 02:03
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Jul 6, 2024
Copy link
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

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

LGTM, just needs a test.

@@ -860,9 +860,21 @@ func (c *httpStorageClient) newRangeReaderXML(ctx context.Context, params *newRa
// Set custom headers passed in via the context. This is only required for XML;
// for gRPC & JSON this is handled in the GAPIC and Apiary layers respectively.
ctxHeaders := callctx.HeadersFromContext(ctx)

for k, vals := range ctxHeaders {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a test for this logic? Could either use a mock transport, or factor out the header logic into a separate func for easy testing.

@BrennaEpp BrennaEpp requested a review from tritone July 9, 2024 07:41
@BrennaEpp BrennaEpp added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 9, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 9, 2024
@BrennaEpp BrennaEpp merged commit c3e2618 into googleapis:main Jul 10, 2024
8 checks passed
@BrennaEpp BrennaEpp deleted the x-goog branch July 10, 2024 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants