Skip to content
This repository was archived by the owner on Aug 28, 2019. It is now read-only.

Commit 89fa057

Browse files
committed
Regenerated library to pick up latest schema changes
1 parent 41f0640 commit 89fa057

File tree

3 files changed

+131
-101
lines changed

3 files changed

+131
-101
lines changed

codegenerator/model/model-data.txt

Lines changed: 66 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -4653,54 +4653,57 @@ Version = '0'
46534653
Schema = 'http://schemas.taskcluster.net/base/v1/api-reference.json#'
46544654
Title = 'Task Index API Documentation'
46554655
Description = 'The task index, typically available at `index.taskcluster.net`, is
4656-
responsible for indexing tasks. In order to ensure that tasks can be
4657-
located by recency and/or arbitrary strings. Common use-cases includes
4656+
responsible for indexing tasks. The service ensures that tasks can be
4657+
located by recency and/or arbitrary strings. Common use-cases include:
46584658

46594659
* Locate tasks by git or mercurial `<revision>`, or
46604660
* Locate latest task from given `<branch>`, such as a release.
46614661

4662-
**Index hierarchy**, tasks are indexed in a dot `.` separated hierarchy
4663-
called a namespace. For example a task could be indexed in
4664-
`<revision>.linux-64.release-build`. In this case the following
4662+
**Index hierarchy**, tasks are indexed in a dot (`.`) separated hierarchy
4663+
called a namespace. For example a task could be indexed with the index path
4664+
`some-app.<revision>.linux-64.release-build`. In this case the following
46654665
namespaces is created.
46664666

4667-
1. `<revision>`, and,
4668-
2. `<revision>.linux-64`
4667+
1. `some-app`,
4668+
1. `some-app.<revision>`, and,
4669+
2. `some-app.<revision>.linux-64`
46694670

4670-
The inside the namespace `<revision>` you can find the namespace
4671-
`<revision>.linux-64` inside which you can find the indexed task
4672-
`<revision>.linux-64.release-build`. In this example you'll be able to
4673-
find build for a given revision.
4671+
Inside the namespace `some-app.<revision>` you can find the namespace
4672+
`some-app.<revision>.linux-64` inside which you can find the indexed task
4673+
`some-app.<revision>.linux-64.release-build`. This is an example of indexing
4674+
builds for a given platform and revision.
46744675

46754676
**Task Rank**, when a task is indexed, it is assigned a `rank` (defaults
46764677
to `0`). If another task is already indexed in the same namespace with
4677-
the same lower or equal `rank`, the task will be overwritten. For example
4678-
consider a task indexed as `mozilla-central.linux-64.release-build`, in
4679-
this case on might choose to use a unix timestamp or mercurial revision
4678+
lower or equal `rank`, the index for that task will be overwritten. For example
4679+
consider index path `mozilla-central.linux-64.release-build`. In
4680+
this case one might choose to use a UNIX timestamp or mercurial revision
46804681
number as `rank`. This way the latest completed linux 64 bit release
46814682
build is always available at `mozilla-central.linux-64.release-build`.
46824683

4683-
**Indexed Data**, when a task is located in the index you will get the
4684-
`taskId` and an additional user-defined JSON blob that was indexed with
4685-
task. You can use this to store additional information you would like to
4686-
get additional from the index.
4684+
Note that this does mean index paths are not immutable: the same path may
4685+
point to a different task now than it did a moment ago.
4686+
4687+
**Indexed Data**, when a task is retrieved from the index the result includes
4688+
a `taskId` and an additional user-defined JSON blob that was indexed with
4689+
the task.
46874690

46884691
**Entry Expiration**, all indexed entries must have an expiration date.
46894692
Typically this defaults to one year, if not specified. If you are
46904693
indexing tasks to make it easy to find artifacts, consider using the
4691-
expiration date that the artifacts is assigned.
4694+
artifact's expiration date.
46924695

46934696
**Valid Characters**, all keys in a namespace `<key1>.<key2>` must be
46944697
in the form `/[a-zA-Z0-9_!~*'()%-]+/`. Observe that this is URL-safe and
46954698
that if you strictly want to put another character you can URL encode it.
46964699

46974700
**Indexing Routes**, tasks can be indexed using the API below, but the
4698-
most common way to index tasks is adding a custom route on the following
4699-
form `index.<namespace>`. In-order to add this route to a task you'll
4700-
need the following scope `queue:route:index.<namespace>`. When a task has
4701-
this route, it'll be indexed when the task is **completed successfully**.
4701+
most common way to index tasks is adding a custom route to `task.routes` of the
4702+
form `index.<namespace>`. In order to add this route to a task you'll
4703+
need the scope `queue:route:index.<namespace>`. When a task has
4704+
this route, it will be indexed when the task is **completed successfully**.
47024705
The task will be indexed with `rank`, `data` and `expires` as specified
4703-
in `task.extra.index`, see example below:
4706+
in `task.extra.index`. See the example below:
47044707

47054708
```js
47064709
{
@@ -4718,7 +4721,7 @@ in `task.extra.index`, see example below:
47184721
// rank <= 4000 (defaults to zero)
47194722
rank: 4000,
47204723

4721-
// Specify when the entries expires (Defaults to 1 year)
4724+
// Specify when the entries expire (Defaults to 1 year)
47224725
expires: new Date().toJSON(),
47234726

47244727
// A little informal data to store along with taskId
@@ -4736,26 +4739,26 @@ in `task.extra.index`, see example below:
47364739
```
47374740

47384741
**Remark**, when indexing tasks using custom routes, it's also possible
4739-
to listen for messages about these tasks. Which is quite convenient, for
4740-
example one could bind to `route.index.mozilla-central.*.release-build`,
4742+
to listen for messages about these tasks. For
4743+
example one could bind to `route.index.some-app.*.release-build`,
47414744
and pick up all messages about release builds. Hence, it is a
47424745
good idea to document task index hierarchies, as these make up extension
47434746
points in their own.'
47444747
Base URL = 'https://index.taskcluster.net/v1'
47454748
Entry 0 =
47464749
Entry Type = 'function'
47474750
Entry Method = 'get'
4748-
Entry Route = '/task/<namespace>'
4749-
Entry Args = '[namespace]'
4751+
Entry Route = '/task/<indexPath>'
4752+
Entry Args = '[indexPath]'
47504753
Entry Query = '[]'
47514754
Entry Name = 'findTask'
47524755
Entry Stability = 'stable'
47534756
Entry Scopes = '[]'
47544757
Entry Input = ''
47554758
Entry Output = 'http://schemas.taskcluster.net/index/v1/indexed-task-response.json#'
47564759
Entry Title = 'Find Indexed Task'
4757-
Entry Description = 'Find task by namespace, if no task existing for the given namespace, this
4758-
API end-point respond `404`.'
4760+
Entry Description = 'Find a task by index path, returning the highest-rank task with that path. If no
4761+
task exists for the given path, this API end-point will respond with a 404 status.'
47594762
Entry 1 =
47604763
Entry Type = 'function'
47614764
Entry Method = 'post'
@@ -4768,14 +4771,13 @@ Entry 1 =
47684771
Entry Input = 'http://schemas.taskcluster.net/index/v1/list-namespaces-request.json#'
47694772
Entry Output = 'http://schemas.taskcluster.net/index/v1/list-namespaces-response.json#'
47704773
Entry Title = 'List Namespaces'
4771-
Entry Description = 'List the namespaces immediately under a given namespace. This end-point
4772-
list up to 1000 namespaces. If more namespaces are present a
4774+
Entry Description = 'List the namespaces immediately under a given namespace.
4775+
4776+
This endpoint
4777+
lists up to 1000 namespaces. If more namespaces are present, a
47734778
`continuationToken` will be returned, which can be given in the next
47744779
request. For the initial request, the payload should be an empty JSON
4775-
object.
4776-
4777-
**Remark**, this end-point is designed for humans browsing for tasks, not
4778-
services, as that makes little sense.'
4780+
object.'
47794781
Entry 2 =
47804782
Entry Type = 'function'
47814783
Entry Method = 'post'
@@ -4788,8 +4790,10 @@ Entry 2 =
47884790
Entry Input = 'http://schemas.taskcluster.net/index/v1/list-tasks-request.json#'
47894791
Entry Output = 'http://schemas.taskcluster.net/index/v1/list-tasks-response.json#'
47904792
Entry Title = 'List Tasks'
4791-
Entry Description = 'List the tasks immediately under a given namespace. This end-point
4792-
list up to 1000 tasks. If more tasks are present a
4793+
Entry Description = 'List the tasks immediately under a given namespace.
4794+
4795+
This endpoint
4796+
lists up to 1000 tasks. If more tasks are present, a
47934797
`continuationToken` will be returned, which can be given in the next
47944798
request. For the initial request, the payload should be an empty JSON
47954799
object.
@@ -4808,23 +4812,37 @@ Entry 3 =
48084812
Entry Input = 'http://schemas.taskcluster.net/index/v1/insert-task-request.json#'
48094813
Entry Output = 'http://schemas.taskcluster.net/index/v1/indexed-task-response.json#'
48104814
Entry Title = 'Insert Task into Index'
4811-
Entry Description = 'Insert a task into the index. Please see the introduction above, for how
4812-
to index successfully completed tasks automatically, using custom routes.'
4815+
Entry Description = 'Insert a task into the index. If the new rank is less than the existing rank
4816+
at the given index path, the task is not indexed but the response is still 200 OK.
4817+
4818+
Please see the introduction above for information
4819+
about indexing successfully completed tasks automatically using custom routes.'
48134820
Entry 4 =
48144821
Entry Type = 'function'
48154822
Entry Method = 'get'
4816-
Entry Route = '/task/<namespace>/artifacts/<name>'
4817-
Entry Args = '[namespace name]'
4823+
Entry Route = '/task/<indexPath>/artifacts/<name>'
4824+
Entry Args = '[indexPath name]'
48184825
Entry Query = '[]'
48194826
Entry Name = 'findArtifactFromTask'
48204827
Entry Stability = 'stable'
48214828
Entry Scopes = '[[queue:get-artifact:<name>]]'
48224829
Entry Input = ''
48234830
Entry Output = ''
48244831
Entry Title = 'Get Artifact From Indexed Task'
4825-
Entry Description = 'Find task by namespace and redirect to artifact with given `name`,
4826-
if no task existing for the given namespace, this API end-point respond
4827-
`404`.'
4832+
Entry Description = 'Find a task by index path and redirect to the artifact on the most recent
4833+
run with the given `name`.
4834+
4835+
Note that multiple calls to this endpoint may return artifacts from differen tasks
4836+
if a new task is inserted into the index between calls. Avoid using this method as
4837+
a stable link to multiple, connected files if the index path does not contain a
4838+
unique identifier. For example, the following two links may return unrelated files:
4839+
* https://index.taskcluster.net/task/some-app.win64.latest.installer/artifacts/public/installer.exe`
4840+
* https://index.taskcluster.net/task/some-app.win64.latest.installer/artifacts/public/debug-symbols.zip`
4841+
4842+
This problem be remedied by including the revision in the index path or by bundling both
4843+
installer and debug symbols into a single artifact.
4844+
4845+
If no task exists for the given index path, this API end-point responds with 404.'
48284846
Entry 5 =
48294847
Entry Type = 'function'
48304848
Entry Method = 'get'
@@ -5124,8 +5142,7 @@ Properties
51245142
TypeName = 'Expiration'
51255143
SourceURL = 'http://schemas.taskcluster.net/index/v1/list-tasks-response.json#/properties/tasks/items/properties/expires'
51265144
Property 'namespace' =
5127-
Description = 'Namespace of the indexed task, used to find the indexed task in the
5128-
index.
5145+
Description = 'Index path of the task.
51295146
'
51305147
MaxLength = '255'
51315148
Title = 'Namespace'
@@ -5143,9 +5160,7 @@ Properties
51435160
TypeName = 'Rank'
51445161
SourceURL = 'http://schemas.taskcluster.net/index/v1/list-tasks-response.json#/properties/tasks/items/properties/rank'
51455162
Property 'taskId' =
5146-
Description = 'Unique task identifier, this is UUID encoded as
5147-
[URL-safe base64](http://tools.ietf.org/html/rfc4648#section-5) and
5148-
stripped of `=` padding.
5163+
Description = 'Unique task identifier for the task currently indexed at `namespace`.
51495164
'
51505165
Pattern = '^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$'
51515166
Title = 'Task Identifier'

0 commit comments

Comments
 (0)