Skip to content

Conversation

@dpcollins-google
Copy link

This is the equivalent of googleapis/java-pubsublite#1360

@dpcollins-google dpcollins-google requested review from a team and shollyman as code owners March 14, 2023 15:19
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Mar 14, 2023
@codyoss codyoss changed the title feat: enable compression for pubsublite publish feat(pubsublite): enable compression for pubsublite publish Mar 14, 2023
@product-auto-label product-auto-label bot added the api: pubsublite Issues related to the Pub/Sub Lite API. label Mar 15, 2023
@tmdiep tmdiep self-requested a review March 17, 2023 11:52
configPollPeriod time.Duration

// Whether compression is disabled. Compression is enabled by default.
DisableCompression bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you change this to EnableCompression optional.Bool for consistency with EnableIdempotence in https://github.com/googleapis/google-cloud-go/pull/7390/files (not merged yet).

Also, if you haven't already, could you ensure the integration tests pass by running locally in the pscompat dir: go test -race -v. The presubmit checks run tests with -short, which skips the integration tests.

Also, looks like the unit tests need updating: https://source.cloud.google.com/results/invocations/6d293971-fecf-4018-bfc8-9d753e586309/targets/cloud-devrel%2Fclient-libraries%2Fgo%2Fgoogle-cloud-go%2Fpresubmit%2Flatest-version/log

Copy link
Contributor

Choose a reason for hiding this comment

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

I just merged the idempotence PR.

@tmdiep tmdiep changed the title feat(pubsublite): enable compression for pubsublite publish feat(pubsublite): Enable compression for publish Mar 17, 2023
pubClient, err := newPublisherClient(ctx, region, opts...)
var publishOpts = opts
if settings.EnableCompression {
publishOpts = append([]option.ClientOption{option.WithGRPCDialOption(grpc.WithDefaultCallOptions(grpc.UseCompressor("gzip")))}, opts...)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you use gzip.Name instead of the string. This also causes the gzip compressor to be registered.

@product-auto-label product-auto-label bot added the stale: old Pull request is old and needs attention. label Apr 14, 2023
@product-auto-label product-auto-label bot added stale: extraold Pull request is critically old and needs prioritization. and removed stale: old Pull request is old and needs attention. labels May 14, 2023
@codyoss
Copy link
Member

codyoss commented Apr 23, 2024

Is this still needed or should we close it?

@hongalex hongalex closed this May 22, 2024
@hongalex hongalex deleted the compress-psl branch May 22, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsublite Issues related to the Pub/Sub Lite API. size: s Pull request size is small. stale: extraold Pull request is critically old and needs prioritization.

4 participants