On Wed, Dec 2, 2015, at 09:52 AM, Benjamin Smedberg wrote: > In order to correlate telemetry data, I need a time series of all > mozilla-central nightly builds (with version and buildid). It's > important that when there are multiple nightlies on a given date, that I > get all of them.
You should be able to list the namespaces under the nightly.<date> index, like: ``` $ curl -X POST https://index.taskcluster.net/v1/namespaces/gecko.v2.mozilla-central.nightly.2015.12.02.revision { "namespaces": [ { "namespace": "gecko.v2.mozilla-central.nightly.2015.12.02.revision.470f4f8c2b2d6f82e56e161a4b05262c85f55b59", "name": "470f4f8c2b2d6f82e56e161a4b05262c85f55b59", "expires": "2016-12-01T00:00:00.000Z" } ] } ``` It's a POST because it allows you to pass a parameter for pagination of results, but all the parameters are optional. That should give you a list of all the changesets that were published as nightlies for that date and then you can drill down to find individual builds. > I'd also like to enhance that dashboard to construct regression range > links between particular builds. How would I go from a channel+buildid > (recorded in telemetry) to a revision number? Would that be for example > deconstructing the buildid and putting it back into the form > gecko.v2.mozilla-central.pushdate.YYYY.MM.DD/BUILDID/firefox/ and then > reconstructing the "linux32-opt" path from the other telemetry data? Is buildid really all you have in telemetry? If you have a changeset then you can use "gecko.v2.mozilla-central.nightly.revision.<rev>.firefox.<buildtype>", like: ``` $ curl https://index.taskcluster.net/v1/task/gecko.v2.mozilla-central.nightly.revision.0010c0cb259e28faf764949df54687e3a21a2d0a.firefox.win32-opt { "namespace": "gecko.v2.mozilla-central.nightly.revision.0010c0cb259e28faf764949df54687e3a21a2d0a.firefox.win32-opt", "taskId": "O8opLQBnRhaJcSQ8sibuSQ", "rank": 1443818500, "data": {}, "expires": "2016-10-02T14:28:03.535Z" } ``` > > I'd like to recreate > http://bsmedberg.github.io/firefox-regression-range-finder/ using > something other than FTP scraping. How would I go from a known > build/revision to the previous/next nightly/aurora/beta build? > > I'm feeling a bit stupid about the actual API: how does one go from a > "browse" URL such as > https://tools.taskcluster.net/index/artifacts/#gecko.v2.mozilla-central.nightly.2015.11.27.latest.firefox.win64-opt/gecko.v2.mozilla-central.nightly.2015.11.27.latest.firefox.win64-opt > > to a machine-readable API URL? I imagine that tools like mozregression > have similar needs. I fully agree that this is underdocumented! On that browse page, the string in the text box is the index namespace, which you can send to the index API's findTask[1] to get tasks out. For your example URL there, that'd be: ``` $ curl https://index.taskcluster.net/v1/task/gecko.v2.mozilla-central.nightly.2015.11.27.latest.firefox.win64-opt { "namespace": "gecko.v2.mozilla-central.nightly.2015.11.27.latest.firefox.win64-opt", "taskId": "B3EdfRvWSBmgw9pVuGWQ_w", "rank": 1448618936, "data": {}, "expires": "2016-11-26T16:33:17.089Z" } ``` Once you have a taskId you can call listArtifacts[2] / getArtifact[3] on the Queue to get its artifacts. I have some Python code[4] that uses the Python taskcluster client[5] to do that if you're interested to see a working example. > > Can taskcluster directly provide version number/buildid/revision of a > particular nightly, would I have to fetch one of the artifacts like > buildprops.json or buildbut_properties.json to get that data? Looking > through buildprops, it has the buildid and revision but not the version > number. If I wanted to get this data for a whole range of builds, would > I have to fetch each file individually or is there a list/batch API? Are > either buildprops.json or buildbut_properties.json documented/stable > formats? The index API docs say "Indexed Data, when a task is located in the index you will get the taskId and an additional user-defined JSON blob that was indexed with task. You can use this to store additional information you would like to get additional from the index.", so we could indeed store arbitrary data in there, but I don't think we're doing that currently. -Ted 1. http://docs.taskcluster.net/services/index/#findTask 2. http://docs.taskcluster.net/queue/api-docs/#listArtifacts 3. http://docs.taskcluster.net/queue/api-docs/#getArtifact 4. https://github.com/luser/breakpad-taskcluster/blob/master/build-in-tc.py#L101 5. https://pypi.python.org/pypi/taskcluster _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform