Skip to content

Follow-up to gzip encoding of request body

Warren Gifford requested to merge mrn/fix-gzip-addition into main

Created by: mrnugget

This is a follow-up to https://github.com/sourcegraph/src-cli/pull/336 and addresses this comment https://github.com/sourcegraph/src-cli/pull/336#discussion_r503788437 and the broken build (see https://github.com/sourcegraph/src-cli/pull/336#issuecomment-707605116) by

  • making gzip compression for GraphQL requests an opt-in feature of the api.Client (vs. trying to encode every request)
  • making the gzip: bool flag a property of the api.Request struct to fix the data race
  • pulling the version/feature-flag check out of the api.Client and moving it into the campaigns.Service where it's used to determine whether gzip compression should be used or not
  • adding back the the unit tests that came with the original implementation of the sourcegraphVersionCheck function
  • reusing the existing GraphQL-request logic in campaigns.Service to query the version
  • adding a changelog

Merge request reports

Loading