Closed Bug 1079639 Opened 10 years ago Closed 10 years ago

Create a tool to submit modifications to blobs

Categories

(Release Engineering Graveyard :: Applications: Balrog (backend), defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nthomas, Assigned: nthomas)

Details

Attachments

(1 file)

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.
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)
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!
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?
Attachment #8501494 - Flags: review? → review?(bhearsum)
Attachment #8501494 - Flags: review?(bhearsum) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: Release Engineering → Release Engineering Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: