Add add_new_release and change_featured_versions functions

RESOLVED FIXED in 9

Status

Socorro
Database
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: adrian, Assigned: jberkus)

Tracking

unspecified
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

(Reporter)

Description

6 years ago
To manipulate products / versions in Postgres we will need those two functions to be added.
(Assignee)

Comment 1

6 years ago
spec:

add_new_release ( 
  product_name
  version
  release_channel
  build_id
  platform
  beta_number (optional)
  repository
)


change_featured_versions (
  product_name
  featured_versions ARRAY-OF-VERSION-STRINGS
)


Works for you?
(Reporter)

Comment 2

6 years ago
@Josh: Currently it is possible to change a lot of fields on a release row. I suppose that will also be a DBA-only action as well? Also, the current "add" function expects start and end dates, a throttle value and whether it is featured or not. Are we basically changing the way we handle products/versions and thus should change the UI consequently? 

If your answers are "yes" and "yes", then that spec looks good to me.
(Assignee)

Comment 3

6 years ago
Yes and Yes.

While it was possible in the past to change dates and throttle values, it was never safe to do so.  And in the recent past we've had a number of temporary data-loss issues associated with users changing these values unwisely.

The idea is that Camino and open source users should be able to add releases to releases-raw via a simple admin interface.  Editing these would be complex as, depending on the amount of time which has passed, it might be necessary to modify multiple pieces of data in other tables.  Thus add, but not edit.

For the featured versions, it's not necessary for users to modify the other release information in order to feature specific versions, and it would in fact be easier if they didn't have to do so.
(Assignee)

Comment 4

6 years ago
Code written.  Pull request: https://github.com/mozilla/socorro/pull/564

Documentation of new functions is here (bottom of page): https://github.com/jberkus/socorro/blob/master/docs/databaseadminfunctions.rst

Anything else you need?
(Assignee)

Updated

6 years ago
Target Milestone: 10 → 9
(Reporter)

Comment 5

6 years ago
@Josh: can you please confirm the type of data you expect? 

  product_name > string e.g. 'Firefox'
  version > string e.g. '14.0a1'
  release_channel > string in ['Release', 'Beta', 'Aurora', 'Nightly']
  build_id > int
  platform > string e.g. 'Windows NT', 'Mac OS X'... 
  beta_number > int?? (is this for rapid-betas? )
  repository > string e.g. 'mozilla-central'

When adding a new release from the UI, do we expect the user to know and provide all information listed here?

Comment 6

6 years ago
Should this be RESOLVED FIXED? or moved out?
(Reporter)

Comment 7

6 years ago
Fixed, I was waiting to make sure we didn't miss anything but it seems to be good. I'll file other bugs if need be.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Updated

6 years ago
Whiteboard: [qa-]

Updated

6 years ago
Whiteboard: [qa-] → [qa?]
(Reporter)

Updated

6 years ago
Whiteboard: [qa?] → [qa-]
You need to log in before you can comment on or make changes to this bug.