Closed
Bug 1294451
Opened 9 years ago
Closed 6 years ago
use compression in balrog client tools
Categories
(Release Engineering :: General, defect)
Release Engineering
General
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: bhearsum, Assigned: nikshepsvn, Mentored)
Details
(Whiteboard: [lang=python][good first bug])
Attachments
(1 file)
The Balrog server supports gzip compression in POST/PUT bodies, so there's no reason not to use compression in the clients...
Updated•8 years ago
|
Component: Tools → General
| Reporter | ||
Updated•8 years ago
|
Mentor: bhearsum
Whiteboard: [lang=python][good first bug]
Comment 1•8 years ago
|
||
I'd like to take up this bug, but I'll need a little more guidance as to how to go about it.
Thanks!
Flags: needinfo?(bhearsum)
| Reporter | ||
Comment 2•8 years ago
|
||
(In reply to Vedant Chakravadhanula(:vedantc98) from comment #1)
> I'd like to take up this bug, but I'll need a little more guidance as to how
> to go about it.
> Thanks!
Sorry, somebody else is already working on it actually!
Assignee: nobody → viniciuscosta0197
Flags: needinfo?(bhearsum)
| Assignee | ||
Comment 3•7 years ago
|
||
would love to work on this if someone can tell me how to start off
Flags: needinfo?(bhearsum)
| Reporter | ||
Comment 4•7 years ago
|
||
(In reply to nikshepsvn from comment #3)
> would love to work on this if someone can tell me how to start off
The goal here is to change the Balrog client library (located at https://github.com/mozilla/balrog/blob/b97d1c70ba4489976333ab9b96bcaacbfc41c944/client/balrogclient/api.py) to compress requests sent to the server. To do this, you'll need to compress the body of the request and set the Content-Encoding header correctly (per https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding).
To make sure things work correctly, I'd suggest running the development environment (http://mozilla-balrog.readthedocs.io/en/latest/contribute.html#contributing-to-balrog), and making a test request like this both before and after your changes:
$ PYTHONPATH=client python
>>> from balrogclient.api import Release
>>> release = Release("Firefox-mozilla-central-nightly-latest", api_root="http://localhost:8080/api")
>>> release_data = release.get_data()[0]
>>> release.update_release("Firefox", "sha512", json.dumps(release_data))
<Response [200]>
Assignee: viniciuscosta0197 → nikshepsvn
Flags: needinfo?(bhearsum)
Comment 5•7 years ago
|
||
Hi,
May I know if the issue is still open. If yes, I would like to take it up.
Thanks.
Flags: needinfo?(bhearsum)
| Assignee | ||
Comment 6•7 years ago
|
||
hey there, I forgot about this bug and will continue working on it!
| Assignee | ||
Comment 7•7 years ago
|
||
should be done in the next few days.
| Assignee | ||
Comment 8•7 years ago
|
||
https://github.com/mozilla/balrog/pull/652 - PR for fix
| Assignee | ||
Comment 9•7 years ago
|
||
Attachment #8988730 -
Flags: review?(nthomas)
Comment 10•7 years ago
|
||
Note to myself - this code is used in balrog scriptworkers via balrogscript [1], which have a clone of the hg tools repo [2] so they can import [3] balrog.submitter.cli [4], which in turn imports [5] balrogclient from lib/python/vendor/ [6]. This is all done with python 2.7.
A deploy is a tools landing like https://hg.mozilla.org/build/tools/rev/d2da1f514d5e to update balrog client, then manually pull the tools repo on the N workers (probably doing a single one as a canary first).
[1] https://github.com/mozilla-releng/balrogscript
[2] https://github.com/mozilla-releng/build-puppet/blob/master/modules/balrog_scriptworker/manifests/init.pp#L80
[3] https://github.com/mozilla-releng/balrogscript/blob/master/balrogscript/script.py#L24
[4] https://hg.mozilla.org/build/tools/file/default/lib/python/balrog/submitter/cli.py
[5] https://hg.mozilla.org/build/tools/file/default/lib/python/balrog/submitter/api.py#l6
[6] https://hg.mozilla.org/build/tools/file/default/lib/python/vendor/balrogclient-0.0.4
Comment 11•7 years ago
|
||
(In reply to rajalakshmi.v15 from comment #5)
> May I know if the issue is still open. If yes, I would like to take it up.
Sorry, it's already being worked on.
Flags: needinfo?(bhearsum)
Comment 12•7 years ago
|
||
Comment on attachment 8988730 [details] [review]
PR link
Please see my comments on Github.
Attachment #8988730 -
Flags: review?(nthomas) → review-
| Reporter | ||
Comment 13•6 years ago
|
||
I'm closing this because:
a) It turns out the Balrog server doesn't support compression already
but mostly because
b) The requests are pretty small already, and adding the overhead of decompression to the server handling them is not worth it.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•