Create a tool to submit modifications to blobs

RESOLVED FIXED

Status

Release Engineering
Balrog: Backend
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: nthomas, Assigned: nthomas)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
In lieu of being able to edit on the server, lets make it easier to submit just the bit of json you want to change.
(Assignee)

Comment 1

3 years ago
Created attachment 8501494 [details] [diff] [review]
[tools] balrog-tweaker.py

What do you think of this Ben ? It helped me out with adding another entry to ftpFilenames (for the partial from 33.0b9). Not so wild about how it gets the product, but the api doesn't return in a GET.
Attachment #8501494 - Flags: feedback?(bhearsum)
(Assignee)

Comment 2

3 years ago
Called like this
 python scripts/updates/balrog-tweaker.py --json json -b 'Firefox-33.0-build1' --api-root 'https://aus4-admin.mozilla.org'  --credentials-file cred -u 'nthomas@mozilla.com' -v

so you need to set up the credentials file and the json beforehand.
Comment on attachment 8501494 [details] [diff] [review]
[tools] balrog-tweaker.py

Review of attachment 8501494 [details] [diff] [review]:
-----------------------------------------------------------------

(In reply to Nick Thomas [:nthomas] from comment #1)
> Created attachment 8501494 [details] [diff] [review]
> [tools] balrog-tweaker.py
> 
> What do you think of this Ben ? It helped me out with adding another entry
> to ftpFilenames (for the partial from 33.0b9). Not so wild about how it gets
> the product, but the api doesn't return in a GET.

One option, of course, is to have the api return the product. If you don't want to go to that trouble (I don't blame you), you could always require it on the command line - that's probably better than guessing.

This looks great overall though!
Attachment #8501494 - Flags: feedback?(bhearsum) → feedback+
I tried this out today and discovered that it doesn't work with the edge where you need to remove a key. In my case, I had Thunderbird-12.0-build1 as schema 2, and wanted to convert it to schema 1. This failed because displayVersion/platformVersion/appVersion were all in the blob still. I ended up hacking up your code to remove them in BlobTweaker.run() after the update. This still failed, because the server has the same bug (or feature, depending how you look at it): https://github.com/mozilla/balrog/blob/master/auslib/admin/views/releases.py#L262

I still think this work is totally valid and helpful, but I thought it was worth noting!
(Assignee)

Comment 5

3 years ago
Comment on attachment 8501494 [details] [diff] [review]
[tools] balrog-tweaker.py

Hmm, that's a bit of a pain. I guess we'd need PUT to not complain if a release already exists, or something.

Upgrading to an r? because I don't have anything to add to this.
Attachment #8501494 - Flags: review?
(Assignee)

Updated

3 years ago
Attachment #8501494 - Flags: review? → review?(bhearsum)
Attachment #8501494 - Flags: review?(bhearsum) → review+
(Assignee)

Comment 6

3 years ago
Comment on attachment 8501494 [details] [diff] [review]
[tools] balrog-tweaker.py

https://hg.mozilla.org/build/tools/rev/be3dbae13e9f
Attachment #8501494 - Flags: checked-in+
(Assignee)

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Assignee)

Comment 7

3 years ago
Quick docs - https://wiki.mozilla.org/Balrog/Scripts
You need to log in before you can comment on or make changes to this bug.