-
Notifications
You must be signed in to change notification settings - Fork 10
Question: Latest Nightly Appbuildid? Hitting 504 gateway timeouts #431
Comments
The query looks correct though... You can try with ElasticSearch, it's a lot faster. It would be something like that I guess: echo '{
"aggs": {
"build_ids": {
"terms": {
"field": "build.id",
"size": 5,
"order": {
"_term": "desc"
}
}
}
},
"query": {
"bool": {
"filter": [{
"term": {
"target.channel": "nightly"
}
}, {
"term": {
"source.product": "firefox"
}
}, {
"term": {
"target.locale": "en-US"
}
}]
}
},
"size": 0
}' | http POST https://buildhub.prod.mozaws.net/v1/buckets/build-hub/collections/releases/search | \
jq -r '.aggregations.build_ids.buckets[] | .key'
20180426100055
20180425220031
20180425100122
20180424220100
20180424100107 |
@leplatrem Yet another fancy ES trick we should add to the non-existent Cookbook :) |
I don't entirely agree with non-existent :) http://buildhub.readthedocs.io/en/latest/api.html#example-queries |
🤯 <-- mind blown |
The 504 Gateway Timeouts are probably due to Kinto/kinto#1507 which gives me heart to really work on that PR. @Osmose Are you "satisfied" with that fancy ES query to get the information you needed? I don't think we should close this issue until we've confirmed that that ES query is awesome and it goes into the documentation for the next time a question like this comes up. |
It looks like it is; I was planning to close this after I had actually implemented it in my project. I'll let ya'll know soon, thank you! |
Got this implemented, can confirm it works as expected. Thanks again! (I'll leave this open for peterbe's aforementioned doc changes) |
I'm trying to use BuildHub to get the appBuildId of the latest Nightly build. I came up with this query:
https://buildhub.prod.mozaws.net/v1/buckets/build-hub/collections/releases/records?_limit=5&source.product=firefox&target.locale=en-US&target.channel=nightly
But whenever I try to hit it I get a 504 gateway timeout error. If I remove the
&target.channel=nightly
bit it returns in a few seconds with results from Beta. I also haven't figured out how to order the results to ensure I'm getting the latest appBuildId.Any help is appreciated!
The text was updated successfully, but these errors were encountered: