Closed
Bug 1430902
Opened 7 years ago
Closed 7 years ago
Handle invalid schemas
Categories
(Taskcluster :: Services, enhancement)
Taskcluster
Services
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: alexandra_, Assigned: alexandra_, Mentored)
Details
(Keywords: good-first-bug)
No description provided.
| Assignee | ||
Updated•7 years ago
|
Assignee: nobody → alesilva241
Comment 1•7 years ago
|
||
Specifically, the issue is that we allow users to upload invalid triggerSchemas, and then validate them later, causing failures. They should be validated on createHook/updateHook.
Alex, is it OK if I take this bug?
Flags: needinfo?(alesilva241)
Comment 2•7 years ago
|
||
| Assignee | ||
Comment 3•7 years ago
|
||
(In reply to Dustin J. Mitchell [:dustin] pronoun: he from comment #2)
> https://github.com/taskcluster/taskcluster-hooks/pull/76
I've pushed some changes and one doubt. I am not sure if context.payload can be used to validation.
Updated•7 years ago
|
Assignee: alesilva241 → dustin
Flags: needinfo?(alesilva241)
Comment 4•7 years ago
|
||
Commit pushed to master at https://github.com/taskcluster/taskcluster-hooks
https://github.com/taskcluster/taskcluster-hooks/commit/3c075bf2b8e06f02e2ebfdb43b17804420bcfca8
Merge pull request #76 from alexandrasp/schemaValidationErrors
handle invalid schemas - bug 1430902
Comment 5•7 years ago
|
||
OK, that's landed, but the result is
---
Error executing operation
Invalid Schema
---
which isn't too helpful. The AJV docs say that ajv.errors is set, so we can probably format that.
Comment 6•7 years ago
|
||
I think this will make a good first bug from here. The commit in comment 4 shows where this error is raised. What remains to do is to add some code to extract the errors from ajv.errors and include them in the message. You can find some examples of using ajv.errorsText in `src/v1.js` to help figure that out.
| Assignee | ||
Updated•7 years ago
|
Assignee: nobody → alesilva241
Comment 7•7 years ago
|
||
Commit pushed to master at https://github.com/taskcluster/taskcluster-hooks
https://github.com/taskcluster/taskcluster-hooks/commit/088fcce7a42f02bce1b19161ca1f20b814caf383
Merge pull request #110 from alexandrasp/extract-error-message-in-invalid-schema
Bug 1430902: Format a invalid error message
Comment 8•7 years ago
|
||
Nice work! And welcome back :)
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 9•7 years ago
|
||
(In reply to Dustin J. Mitchell [:dustin] pronoun: he from comment #8)
> Nice work! And welcome back :)
Thanks Dustin!! :) Happy to be back o/
Updated•6 years ago
|
Component: Hooks → Services
You need to log in
before you can comment on or make changes to this bug.
Description
•