Improve ElasticSearch indexing of application version listings

VERIFIED FIXED in 2013-08-01

Status

Marketplace
API
P2
normal
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: chuck, Assigned: robhudson)

Tracking

2013-08-01
Points:
---

Details

(Reporter)

Description

5 years ago
Rob has some ideas for indexing application versions in the API. It is current served as such:

"current_version": "1.1",
"versions": {
  "1.0": "/api/v1/apps/versions/7012/",
  "1.1": "/api/v1/apps/versions/7930/"
}

But this requires a bit of a cheat in the mapping. To keep indexes smaller and searches faster, we should index like this:

"current_version": "1.1",
"versions": [{
  "version": "1.0",
  "resource_uri": "/api/v1/apps/versions/7012/"}, {
  "version": "1.1",
  "resource_uri": "/api/v1/apps/versions/7930/"
}]

And flatten on the way out.
(Assignee)

Updated

5 years ago
Assignee: nobody → robhudson.mozbugs
Priority: -- → P2
(Assignee)

Comment 1

5 years ago
https://github.com/mozilla/zamboni/commit/7456461
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2013-07-25

Comment 2

5 years ago
Can you please add some STRs to this bug or mark it as [qa-] ?
(Assignee)

Comment 3

5 years ago
I've changed the way we store versions in elasticsearch. If you could, please verify via the API that versions come out in the form:

"versions": {
  "1.0": "/api/v1/apps/versions/7012/",
  "1.1": "/api/v1/apps/versions/7930/"
}

1. Search for an app, watching the network panel.
2. Verify that the JSON result from the search API for a packaged app with multiple versions contains a "versions" attribute like the above.
We had to back this patch out because it broke our production push.  This needs to fail gracefully using an old version of the index before the new one exists.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 2013-07-25 → 2013-08-01
(Assignee)

Comment 6

5 years ago
(In reply to Wil Clouser [:clouserw] from comment #4)
> We had to back this patch out because it broke our production push.  This
> needs to fail gracefully using an old version of the index before the new
> one exists.

Roger that. I can pick this up again and ensure it doesn't break on top of old data.
(Assignee)

Comment 7

5 years ago
https://github.com/mozilla/zamboni/commit/a6e9242
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.