Closed
Bug 1440800
Opened 8 years ago
Closed 7 years ago
Verify that *exactly* the expected context items are passed to api.setup
Categories
(Taskcluster :: Services, enhancement)
Taskcluster
Services
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dustin, Assigned: kritisingh1.ks, Mentored)
Details
taskcluster-lib-api allows declaring expected context items. It doesn't *require* that they be declared, though. So in many cases we forget. We should be more strict about that. Also, in lots of places there's a comment somewhere in `api.js` that lists some of the context items we want, and then the `new Api(..)` has a *different* set of context items that are required. That should all get unified.
| Reporter | ||
Comment 1•8 years ago
|
||
The `contexts` attribute to an API is described here;
https://github.com/taskcluster/taskcluster-lib-api#declaring-apis
The setup method is described here:
https://github.com/taskcluster/taskcluster-lib-api#api-server-setup
The first part of this bug is to check that the `context` properties for those two things match.
Once that's done, and a new version of taskcluster-lib-api is released, we will need to upgrade each of the Taskcluster services to use the new version, fixing up any discrepancies in the context they provide (and also adding comments about the context elements).
Assignee: dustin → nobody
Mentor: dustin
| Assignee | ||
Comment 2•8 years ago
|
||
I would like to take this up. May I ? I won't delay the PR this time. Thanks.
| Assignee | ||
Comment 4•8 years ago
|
||
:dustin what I understand from this is that I need to add a method in api.js which will check that the list of context items declared while declaring the API is the same as that passed in api.setup. Leave some comments to let me know if I am thinking correct or not. Thanks a lot.
| Reporter | ||
Comment 5•8 years ago
|
||
I don't know if you will need to add a method, but yes -- api.js is the file to patch.
| Assignee | ||
Comment 6•8 years ago
|
||
:dustin here is the PR : https://github.com/taskcluster/taskcluster-lib-api/pull/84
Although I am not very confident if I have done it correct at all. Sincere apologies for that. Please review and let me know further changes.
| Reporter | ||
Comment 7•8 years ago
|
||
That will be version 8.0.0 of this library. Do you want to try upgrading, say, taskcluster-secrets or taskcluster-hooks to use this version? The patch to upgrade will be simple, but we'll need to make sure that the tests all pass once that's done.
| Assignee | ||
Comment 8•8 years ago
|
||
Yeah I will upgrade those repos. There are only two, namely secrets and hooks, right?
| Reporter | ||
Comment 9•8 years ago
|
||
There are a bunch, but that's a good place to start and see what issues we encounter :)
| Reporter | ||
Comment 10•8 years ago
|
||
We've gotten just about all of these -- I think notify and queue are still waiting for review. Nice work modifying each of those services!
| Assignee | ||
Comment 11•8 years ago
|
||
Hi Dustin, is there any other taskcluster repo that needs an upgrade? If yes please let me know. Thanks :)
| Reporter | ||
Comment 12•8 years ago
|
||
Nope, I think you did everything :)
| Reporter | ||
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Component: Platform and Services → Services
You need to log in
before you can comment on or make changes to this bug.
Description
•