Closed Bug 1087500 Opened 11 years ago Closed 11 years ago

upgrade balrog's Flask stack

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bhearsum, Assigned: bhearsum)

References

Details

Attachments

(1 file)

While Peter was working on the new Balrog UI he discovered that our current Flask stack doesn't support form submissions as JSON blobs (which Angular depends on). The latest Flask-wtforms does, and this is probably a good opportunity to get up to date with other things as well. I've been working on this in https://github.com/bhearsum/balrog/tree/upgrade-flask-wtf, and I got tests passing with minimal effort. The biggest changes seem to be some config variables changing names. I still need to do a bunch of testing by hand.
This patch contains everything except the changes to vendor/. Surprisingly little needed to change here, but the highlights are: * Fix some add_url_rule calls not to duplicateview names -- this became an error at some point in Flask. * Fix a bunch of imports that moved. * s/TextField/StringField/, because the former is deprecated and spews a billion warnings when running tests. * Fix Rules.addRule to return just the rule id rather than a single item list containing the rule id (and fix a test that relied on this wacky behaviour). * s/CSRF_ENABLED/WTF_CSRF_ENABLED/g The vendor changes include new versions of Flask, Werkzeug, WTForms, Flask-WTF and itsdangerous (a library that newer versions of Flask depend on). In order to ensure clean installs, I deleted all old files from these before installing the new ones. You can see all of this in https://github.com/bhearsum/balrog/compare/upgrade-flask-wtf - though I'm not sure how useful it is. All tests pass, and I've tried all of the functionality I could think of locally - it all seems to work! Nonetheless, I want to point a staging master at it for some jobs for additional verification before going to prod.
Attachment #8509748 - Flags: review?
Comment on attachment 8509748 [details] [diff] [review] upgrade our flask stack Review of attachment 8509748 [details] [diff] [review]: ----------------------------------------------------------------- There's not much to review here. It it works it works. Much of the changes aren't really business logic. It's just the new ways of doing things. I haven't tested it locally yet but I trust you have. By the way, we really should have travis/jenkins tests on things like this automated.
(In reply to Peter Bengtsson [:peterbe] from comment #2) > Comment on attachment 8509748 [details] [diff] [review] > upgrade our flask stack > > Review of attachment 8509748 [details] [diff] [review]: > ----------------------------------------------------------------- > > There's not much to review here. It it works it works. Much of the changes > aren't really business logic. It's just the new ways of doing things. > > I haven't tested it locally yet but I trust you have. By the way, we really > should have travis/jenkins tests on things like this automated. We do have Balrog tests running, unfortunately on our private Jenkins instance. Balrog issues can cause tree closures and issues with release updates though, so I always like to do more verification around them.
Comment on attachment 8509748 [details] [diff] [review] upgrade our flask stack Massimo, are you comfortable reviewing this? See comment #1 for more details + how I plan to do additional testing.
Attachment #8509748 - Flags: review? → review?(mgervasini)
Comment on attachment 8509748 [details] [diff] [review] upgrade our flask stack Hi Ben, The code looks good to me, no issues on my local tests. Not a blocker, I have a warning from pyflakes: auslib/db.py:7: 'urlparse' imported but unused. Could you remove the urlparse import?
Attachment #8509748 - Flags: review?(mgervasini) → review+
Comment on attachment 8509748 [details] [diff] [review] upgrade our flask stack I pushed this. I'll be doing some more testing in dev today before asking for a push to prod.
Attachment #8509748 - Flags: checked-in+
Depends on: 1090954
OK, I did some resubmissions to balrog dev. They all worked, and I was able to get updates back after changing the rules. I filed bug 1090954 to get this pushed.
Working fine in production AFAICT. I saw some nightly repacks submit successfully, and I got updates for them!
Status: NEW → RESOLVED
Closed: 11 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: