Closed
Bug 1134264
Opened 10 years ago
Closed 10 years ago
tc-base: Add $schema key to references (so we can distinguish type)
Categories
(Taskcluster :: General, defect)
Taskcluster
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jonasfj, Assigned: jonasfj)
References
Details
Attachments
(2 files)
Add a $schema key to all reference json file.
Ie. an apis.json file should have the following property:
$schema: "http://schemas.taskcluster.net/base/v1/api-reference.json"
This is useful for people to distinguish between exchange references and api references.
Also it'll be good as people looking at these will see that they have a schema.
So fewer people will write client libraries without reading the schemas for the references (and schemas == docs).
Assignee | ||
Comment 1•10 years ago
|
||
Please comment on the PR, and feel free to push the "merge" button. I think this is safe to roll out.
Comment 2•10 years ago
|
||
(In reply to Jonas Finnemann Jensen (:jonasfj) from comment #1)
> Created attachment 8567706 [details]
> Github PR
>
> Please comment on the PR, and feel free to push the "merge" button. I think
> this is safe to roll out.
Thanks Jonas! I added comments, looks good to me, just a couple of questions. I don't have permissions to merge, I'm afraid.
Thanks,
Pete
Comment 3•10 years ago
|
||
Comment on attachment 8567706 [details]
Github PR
Also see comments in PR.
Attachment #8567706 -
Flags: review?(pmoore) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Merged... I saw you added to taskcluster group this morning... so you should probably be able to hit merge buttons in the future :)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 5•10 years ago
|
||
We have some validation errors now with http://references.taskcluster.net/queue/v1/api.json, I think we need to update http://schemas.taskcluster.net/base/v1/api-reference.json - the errors we have are:
(root) : additional property "$schema" is not allowed
(root).version : must match one of the enum values ["0.2.0"], given 0
Probably this is just adding "0" as an allowed value, and adding a definition of the $schema property.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 6•10 years ago
|
||
Ahh, you are validating against published schema for references...
We just need to push update from tc-base...and probably add 0.2.0 as I removed it from that schema because we shouldn't use it going forward... And you seem to be actually validating these...
Updated•10 years ago
|
Assignee | ||
Comment 7•10 years ago
|
||
Action item after r+ and merge,
run ./bin/publish-schemas.js
Attachment #8580522 -
Flags: review?(pmoore)
Comment 8•10 years ago
|
||
I've responded in the PR - sorry for getting totally deep into this matter, maybe I am overthinking the problem...
If you disagree totally with what I put in the PR, we can just proceed as you suggested.
Comment 9•10 years ago
|
||
ok, let's proceed with as you have it! :)
There is one test failure I see: https://github.com/taskcluster/taskcluster-base/blob/master/test/pulsepublisher_test.js#L291 - I guess we'll also need to fix this.
The other test failures seemed to be timeouts, so I've manually retriggered to see if that fixes them...
Flags: needinfo?(jopsen)
Comment 10•10 years ago
|
||
Comment on attachment 8580522 [details]
github pr for maintain backwards compat
r+ with unit test fix. Thanks Jonas!
Attachment #8580522 -
Flags: review?(pmoore) → review+
Comment 11•10 years ago
|
||
Comment on attachment 8580522 [details]
github pr for maintain backwards compat
Merged: https://github.com/taskcluster/taskcluster-base/commit/18717f7762fede48cb5cbf385fef90595955d9d8
I had some problems publishing, I guess I need to set up a config file and some credentials...
pmoore@Elisandra:~/git/taskcluster-base master $ ./bin/publish-schemas.js
Failed to publish:
{ [TimeoutError: Missing credentials in config]
message: 'Missing credentials in config',
code: 'CredentialsError',
time: Sat Mar 28 2015 19:18:35 GMT+0100 (CET),
originalError:
{ message: 'Could not load credentials from any providers',
code: 'CredentialsError',
time: Sat Mar 28 2015 19:18:35 GMT+0100 (CET),
originalError:
{ message: 'Connection timed out after 1000ms',
code: 'TimeoutError',
time: Sat Mar 28 2015 19:18:35 GMT+0100 (CET) } } }
Comment 12•10 years ago
|
||
(In reply to Pete Moore [:pete][:pmoore] from comment #10)
> Comment on attachment 8580522 [details]
> github pr for maintain backwards compat
>
> r+ with unit test fix. Thanks Jonas!
BTW - my mistake - this was an intermittent failure on Travis, a rerun fixed it! Sorry for the noise...
Flags: needinfo?(jopsen)
Assignee | ||
Comment 13•10 years ago
|
||
@pmoore, I've published the new schemas from repository to:
http://schemas.taskcluster.net/base/v1/api-reference.json
IMO, we should eventually remove the "0.2.0", but we can keep around for now.
Until we have a better reference format we should just remain practical about this...
the number of reference consumers is still very limited, so I'm so afraid of breaking changes here :)
Status: REOPENED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Component: TaskCluster → General
Product: Testing → Taskcluster
Target Milestone: --- → mozilla41
Version: unspecified → Trunk
Comment 14•9 years ago
|
||
Resetting Version and Target Milestone that accidentally got changed...
Target Milestone: mozilla41 → ---
Version: Trunk → unspecified
You need to log in
before you can comment on or make changes to this bug.
Description
•