Closed Bug 703040 Opened 13 years ago Closed 8 years ago

improve blob validation on balrog server

Categories

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

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bhearsum, Assigned: bhearsum)

References

Details

(Whiteboard: [updates])

Attachments

(4 files)

bug 693593 implements basic validation of blobs by checking that only valid keys exist. We should do better than that and check that required keys exist, and maybe some value checking, too. Sprung out of https://bugzilla.mozilla.org/show_bug.cgi?id=693593#c6.
Priority: -- → P3
Priority: P3 → --
This seems pretty low priority in the face of the other Balrog tasks I could be working on.
Priority: -- → P3
This seems pretty low priority in the face of the other Balrog tasks I could be working on.
Assignee: bhearsum → nobody
Component: Release Engineering → Release Engineering: Automation (General)
QA Contact: release → catlee
Whiteboard: [updates]
https://github.com/halst/schema could be really useful for this
Product: mozilla.org → Release Engineering
mass component change
Component: General Automation → Balrog: Backend
bug 1022649 might get us this for free
A related thing is that it would be good to warn or stop a user from pointing a rule at a blob that isn't fully formed.
Thinking about this a bit more...we really need to decide how far down this rabbit hole we want to go. Some things are pretty obvious, eg: name is always required, but it gets more complex when you get into the AppRelease blobs, which have 2 ways of specifying fileUrls. If we want to be sure those blobs are always in a state where they can be safely pointed at by a rule, our validation would have to include looking for one (at least one? only one?) of those ways. Such a thing could cause issues with the way we submit release data right now, too (we stream in the build-specific information, and submit the release-wide stuff later).
I'm actively working on an initial version of this in https://github.com/mozilla/balrog/pull/42/files
Assignee: nobody → bhearsum
PR has more details. I'm not planning on landing this until bug 1238944 is ready because both it and this need a config update, and I'd rather batch those together.
Attachment #8707904 - Flags: review?(rail)
Comment on attachment 8707904 [details] [review]
implement blob validation with jsonschemas

The PR looks straight forward to me: a lot of code deletions (\o/) and a lot of new schemas. I went through the code changes and skimmed/randomly checked schemas. All look good to me. SOO MUCH BETTER NOW!
Attachment #8707904 - Flags: review?(rail) → review+
Commit pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/98b963f067c094b622bd7a671554a2456b9aa2c6
Merge pull request #42 from bhearsum/jsonschema

bug 703040: improve blob validation on balrog server. r=rail
Comment on attachment 8707904 [details] [review]
implement blob validation with jsonschemas

I merged this, but I'll be doing some more testing in dev before heading to production. Will also be waiting for https://bugzilla.mozilla.org/show_bug.cgi?id=1238944, because it also requires a config update.
Attachment #8707904 - Flags: checked-in+
Had to push https://github.com/mozilla/balrog/commit/0e7f95ec857540953df416f1f5ca08e2f079378b to import jsonschema into the vendor lib. Didn't catch this locally because local testing in now Docker-based.
Depends on: 1240794
Attachment #8710672 - Flags: review?(rail)
Comment on attachment 8710672 [details] [review]
jsonschema for desupport blobs

lgtm
Attachment #8710672 - Flags: review?(rail) → review+
Attachment #8710672 - Flags: checked-in+
Attachment #8711736 - Flags: review?(rail)
Attachment #8711737 - Flags: review?(rail) → review+
Attachment #8711737 - Flags: checked-in+
Attachment #8711736 - Flags: review?(rail) → review+
Commit pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/20b0421a136ff3dd8a7bd8e80dcb46befdb0c1e9
Merge pull request #49 from bhearsum/validation-error

bug 703040: Improve blob validation errors. r=rail
Attachment #8711736 - Flags: checked-in+
This went to production today, and I re-verified it there.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Commit pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/e2b212c510f174319c3d6855d4b5ebd07fc8ed51
[balrog-ui] Merge pull request #16 from bhearsum/improved-blob-error

bug 703040: Show a list of blob validation errors rather than a single string
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: