Closed Bug 1359446 Opened 7 years ago Closed 7 years ago

Replace "Releases" with "ProductVersions"

Categories

(Socorro :: Webapp, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: peterbe, Assigned: peterbe)

References

Details

The point of the Releases is to add those first products to bootstrap. 

Today, our cron job ftpscraper populates (via some magic) ultimately product versions. But if start with nothing, and don't have ftpscraper you need to create your first release some how. 

To avoid the topic of whether we care about people who don't do socorro like we do, the simplest solution is to keep the Releases admin feature but refactor all its underlying code to use the ProductVersions API instead. 

At the moment, we have ProductVersions.get and ProductVersions.post and we Releases.post
Let's make that ProductVersions.get, ProductVersions.post and ProductVersions.put ONLY. Then we no longer need the releases.py file and its only class. 

Let's keep the UI for now.
Assignee: nobody → peterbe
Adrian,
This is uglier than I thought. Releases.post() is about make a new release. It calls the stored procedure `add_new_release()`, makes an insert into `product_release_channels` and lastly executes `update_product_versions` [0].
The ProductVersions.post() however `add_new_product()` [1].

I thought this was simpler than that. 

What do you know, by heart I guess, about the difference between these two?

Like, in the admin interface, do you have to add the product first before you can add the release?

Can't we just merge these two into one? Who adds a product without adding a release??


[0] https://github.com/mozilla/socorro/blob/73ccfac3a02f548aa3e87b5cbe34905ca94e8a18/socorro/external/postgresql/releases.py#L49-L84
[1] https://github.com/mozilla/socorro/blob/73ccfac3a02f548aa3e87b5cbe34905ca94e8a18/socorro/external/postgresql/products.py#L135
Flags: needinfo?(adrian)
We chatted about this and decided it's not worth it.
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(adrian)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.