Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

gzip compression for data (post and responses) #732

Merged
merged 13 commits into from
Apr 10, 2020

Conversation

KEClaytor
Copy link
Contributor

Hello, I have enabled gzip content encoding in this branch. I have tested it against my own influx application and it seems to work. However, I am unsure how to properly do the tests.

I have included some tests, however, they do not actually track integration with the influxdb application. For instance, the tests pass when I use zlib do do the compression, even though that does not work in my application. Can you advise where / how to do proper implementation tests?

If you would like to incorporate it into the main branch, I would certainly find it useful and others may as well (see: #718).

@KEClaytor
Copy link
Contributor Author

Okay, figured out zlib so that it's compatible with python 2.7.
Local tests seem to pass, but I'm not testing against a range of influxdb versions (only 1.7).
I basically duplicated all server tests but enabled gzip=True.
There are no tests for influxdb08 - are they needed?

@KEClaytor KEClaytor changed the title gzip compression working in my influx stack. Needs proper tests. gzip compression for data (post and responses) Aug 1, 2019
@KEClaytor
Copy link
Contributor Author

Interestingly I noticed that the zlib compressed data wasn't actually being added to InfluxDB. Switching back to gzip and manually ensuring that data is posted.

@KEClaytor KEClaytor requested a review from xginn8 October 9, 2019 14:19
@f0rtung
Copy link

f0rtung commented Oct 18, 2019

Is there anyone alive?
@aviau @sebito91 @xginn8

@cgiraldo
Copy link

Any chance to see this PR merged?

@sebito91 sebito91 self-assigned this Apr 8, 2020
Copy link
Contributor

@sebito91 sebito91 left a comment

Choose a reason for hiding this comment

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

LGTM, many thanks for the PR @KEClaytor !!!

@sebito91 sebito91 merged commit c858a46 into influxdata:master Apr 10, 2020
ocworld pushed a commit to AhnLab-OSS/influxdb-python that referenced this pull request Apr 13, 2020
* gzip compression working in my influx stack. Needs proper tests.

* Also gzip data from server, slightly more straightforward data handling.

* Adding in test cases.

* Switching back to zlib with gzip headers.

* flake8 compatibility

* Move parameter into correct position.

per review

* Switching back to gzip for the headers.

* Fixing python 2.7 compatability with gzip.

* flake8 compatibility.

* flake8 testing

Co-authored-by: Kevin Claytor <kevin.e.claytor.civ@mail.mil>
Co-authored-by: Sebastian Borza <sebito91@gmail.com>
@cgiraldo cgiraldo mentioned this pull request Apr 16, 2020
2 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants