Closed Bug 659102 Opened 14 years ago Closed 14 years ago

Make version foo independent from code pushes

Categories

(Input Graveyard :: Backend, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wenzel, Assigned: nigelb)

References

Details

(Whiteboard: [4.3.4])

We had to push Input 3 times over the last two working days just to update our version list. While this *should* be automated and all be pulled from product-details, Firefox has time and again had different versions than product-details makes us believe. Let's fix this in a way that a) works by default, most of the time (bug 658685, I think), and b) in case the logic fails, can be fixed through the admin interface rather than an IT-induced code push.
Depends on: 659103
Here's some notes that I've been sitting on: - fix extra versions - move versions into a table - set which versions are "visible" - the end - auto add things higher than lowest visible - cron job to auto-set visible things with a min threshold
Component: Input → Backend
Product: Webtools → Input
QA Contact: input → backend
Target Milestone: --- → 4.x
Version: Trunk → unspecified
Priority: -- → P1
Target Milestone: 4.x → 4.4
I'm picking this up for fixing. Also pasting in comments from :davedash on how to fix this. commit 1: It'll be a post_save signal on an opinion and that will log version and count to a table. e.g. if there's a no firefox 10.0, log "10.0, 1", if there is an entry, do "10.0, current number+1". Affiliates has some recent code that does something similar. commit 2: A pre_save signal on the version table. It says if the value is >1000, mark that version as active. We'll show active things in the dashboard. commit 3: Add this to the admin commit 4: A cron task that looks at all the active versions, and determines whether there's been > 1000 in the last 30 days. If there hasn't disable it. commit 5: A cron task also to process all the old opinions, to get us starting data. commit 6: Delete all the current versioning code to use this data.
Assignee: nobody → nigelbabu
Status: NEW → ASSIGNED
> commit 5: A cron task also to process all the old opinions, to get us > starting data. Here's an idea... and this may turn it into just two commits: We could populate this table by doing something like this: SELECT version, count(*) as c FROM opinions WHERE created > 30 days ago HAVING c > 1000 depending on how long that takes, we could just cron this at least daily - also create an admin task to call it manually.
(In reply to Dave Dash [:davedash] from comment #3) > WHERE created > 30 days ago Hm? What's the logic behind this? It'll only add versions that are older than 30 days? I think you mean: SELECT version, count(*) as c FROM opinions WHERE created < 30 days ago GROUP BY version HAVING c > 1000 right?
(In reply to Fred Wenzel [:wenzel] from comment #4) > Hm? What's the logic behind this? It'll only add versions that are older > than 30 days? Lol, as I hit submit, I realized I was wrong. You *do* want created > 30 days ago, but you'll probably still need the GROUP BY.
heh, for the record, the correct query is SELECT version, count(*) as c FROM feedback_opinion WHERE created > DATE_SUB(NOW(), INTERVAL 30 day) GROUP BY version HAVING c >= 1000;
Commit pushed to https://github.com/mozilla/input.mozilla.org https://github.com/mozilla/input.mozilla.org/commit/d619846fba9a3d649cb14b357b46ca3f0b9723f6 Merge pull request #29 from nigelbabu/version-foo-1 Making the version foo independent of code (Bug: 659102)
Commit pushed to https://github.com/mozilla/input.mozilla.org https://github.com/mozilla/input.mozilla.org/commit/99e469f89a5dd9e2ffe671e644f626865787c78a Merge pull request #33 from nigelbabu/version-foo-final Take data from VersionCount for select boxes, fix bug 659102
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Oops still need to automate default version via product details.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
QA, Please verify that the version listed in the drop downs for search are reasonable and make sense. Yours truly, Dave
Tracking the default version via bug 698043 and closing this one.
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
Whiteboard: [4.3.4]
Product: Input → Input Graveyard
You need to log in before you can comment on or make changes to this bug.