Closed Bug 810411 Opened 12 years ago Closed 11 years ago

autofill/suggestions in release kickoff app

Categories

(Release Engineering :: Release Automation: Other, defect, P3)

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bhearsum, Assigned: bhearsum)

Details

(Whiteboard: [shipit])

Attachments

(4 files, 3 obsolete files)

It would be great for the release kickoff app to suggest version numbers, branch names, etc. based off of the current data it has.
No longer blocks: 763929
Whiteboard: [kickoff]
Even something as simple as grayed out sample data in each field would be great. The kind that disappears when you click into the field.
Assignee: nobody → bhearsum
Tooltips not shown in the screenshot, but here's what the placeholders look like: https://people.mozilla.com/~bhearsum/sattap/69144557.png

Unfortunately, there's no way to have newlines in placeholder text.
Attachment #696745 - Flags: review?(rail)
OK, I think I've come up with an idea to do autofill on Version, Build Number, Branch, and Partials. I'd like to get some feedback on it before I look at implementation. Here's the details:

For version, we'll suggest the "next" version for all of the releases from the past N weeks (N=7 probably), unless that version exists. For example, if versions from the past N weeks are: 16.0, 10.0.7esr, 17.0b1, 17.0b2, and 17.0b3 we'll ask for the "next" versions for each of those and get back:
- 16.0.1 and 17.0 (from 16.0)
- 10.0.8esr (from 10.0.7esr)
- 17.0b2 and 18.0b1 (from 17.0b1)
- 17.0b3 and 18.0b1 (from 17.0b2)
- 17.0b4 and 18.0b1 (from 17.0b3)

The duplicate 18.0b1's will be tossed away, as will 17.0b2 and 17.0b3 - leaving us with: 16.0.1, 17.0, 10.0.8esr, 17.0b4, and 18.0b1 as version number suggestions.

After a version number is entered, build number can be automatically filled out by looking for that version in the list of releases. If it already exists, use the next build number (making sure to look at the highest current build number, in case we've skipped one).

Branch suggestions will be very simple -- any branch we've seen in the past N weeks will be suggested.

Partial version suggestion will be done by looking for the last N releases (N=4 probably) that match the branch. Only one suggestion for version number will be given (so you won't have 17.0b3build1 and 17.0b3build2). The user will be able to click on the suggestions to have them appended to the field. This might be done with a short list of checkboxes.

I don't think any of the other fields make sense to autofill. Revisions (be they mozilla, comm, or l10n) cannot be guessed. Currently, we could assume that the dashboard check should only be done for betas, but I'm not sure how long that will hold true for. I could be swayed to turn the dashboard check off by default for finals and esrs if others feel strongly.

Coop, Armen - I know you two both requested this. What do you think of this plan?
Flags: needinfo?(coop)
Flags: needinfo?(armenzg)
Attachment #696745 - Flags: review?(rail) → review+
This sounds like a fine plan. Thanks bhearsum for checking with us!
Flags: needinfo?(armenzg)
(In reply to Ben Hearsum [:bhearsum] from comment #3) 
> Partial version suggestion will be done by looking for the last N releases
> (N=4 probably) that match the branch. Only one suggestion for version number
> will be given (so you won't have 17.0b3build1 and 17.0b3build2). The user
> will be able to click on the suggestions to have them appended to the field.
> This might be done with a short list of checkboxes.

Will the suggestions for partial versions update once the version is selected above?

Everything else makes sense to me.
Flags: needinfo?(coop)
(In reply to Chris Cooper [:coop] from comment #5)
> (In reply to Ben Hearsum [:bhearsum] from comment #3) 
> > Partial version suggestion will be done by looking for the last N releases
> > (N=4 probably) that match the branch. Only one suggestion for version number
> > will be given (so you won't have 17.0b3build1 and 17.0b3build2). The user
> > will be able to click on the suggestions to have them appended to the field.
> > This might be done with a short list of checkboxes.
> 
> Will the suggestions for partial versions update once the version is
> selected above?

I wasn't planning to re-populate upon selection because we don't generally do more than 3 partials for a release. Is that OK?
Attached patch add submittedAt column (obsolete) — Splinter Review
This patch is the main prerequisite for implementing suggestions - we need to keep track of submission time so we can do queries like 'releases from the past N weeks'.

Nothing too complicated here, the biggest thing of note is after much futzing around I figured out that keeping dates in UTC until they're ready to be displayed is the easiest thing to do. I'm not happy with the usage of Javascript just to do conversion to the user's local timezone...but there's no way to do that conversion on the server side.
Attachment #706552 - Flags: review?(rail)
Attachment #706583 - Flags: review?(rail)
Attachment #706552 - Attachment is obsolete: true
Attachment #706552 - Flags: review?(rail)
Attachment #706583 - Flags: review?(rail) → review+
Comment on attachment 706583 [details] [diff] [review]
same patch w/ --binary

I pushed this and upgraded the db. We should see a "Submitted At" column here in a bit: https://ship-it-dev.allizom.org/releases.html
Attachment #706583 - Flags: checked-in+
This implements the idea described in comment #3. It doesn't quite get us 100% there for partials (there's a comment in the code about that), but I think it's good enough for now.

Coop, I know you've done some JS stuff with slavealloc recently, so I'm hoping you can tell me if my JS is terrible or not. I'm....far from an expert. If you're not comfortable reviewing any part of this rail or catlee probably can.
Attachment #707785 - Flags: review?(coop)
Attachment #707787 - Flags: review?(coop)
Comment on attachment 707785 [details] [diff] [review]
implement suggestions for versions, build numbers, branches, and partials

Review of attachment 707785 [details] [diff] [review]:
-----------------------------------------------------------------

::: kickoff/static/suggestions.js
@@ +102,5 @@
> +    }
> +}
> +
> +// Helper methods for the partials' autocomplete.
> +function split(val) {

Generally not a fan of overriding built-in methods. Is this used in enough places to warrant it vs. just using val.split() where required?

::: kickoff/test/base.py
@@ +35,5 @@
> +                              l10nChangesets='lk mn', dashboardCheck=False,
> +                              mozillaRelbranch='BAR',
> +                              submittedAt=datetime(2005, 1, 2, 2, 3, 3, 5))
> +            db.session.add(r)
> +            r = FirefoxRelease(partials='0,1', promptWaitTime=5,

Should we be doing be doing multiple test releases for Firefox and Thunderbird with different params too?

::: kickoff/test/views/base.py
@@ -36,5 @@
> -                              branch='a', mozillaRevision='abc',
> -                              l10nChangesets='lk mn', dashboardCheck=False,
> -                              mozillaRelbranch='BAR')
> -            db.session.add(r)
> -            r = FirefoxRelease(partials='0,1', promptWaitTime=5,

Same question as before re: doing multiple test releases for Firefox and Thunderbird.
Attachment #707785 - Flags: review?(coop) → review+
Attachment #707787 - Flags: review?(coop) → review+
(In reply to Chris Cooper [:coop] from comment #13)
> Comment on attachment 707785 [details] [diff] [review]
> implement suggestions for versions, build numbers, branches, and partials
> 
> Review of attachment 707785 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: kickoff/static/suggestions.js
> @@ +102,5 @@
> > +    }
> > +}
> > +
> > +// Helper methods for the partials' autocomplete.
> > +function split(val) {
> 
> Generally not a fan of overriding built-in methods. Is this used in enough
> places to warrant it vs. just using val.split() where required?

To be honest, this is stuff I copy/pasted from jquery ui tutorials. I'll see if I can use .split() instead.

> ::: kickoff/test/base.py
> @@ +35,5 @@
> > +                              l10nChangesets='lk mn', dashboardCheck=False,
> > +                              mozillaRelbranch='BAR',
> > +                              submittedAt=datetime(2005, 1, 2, 2, 3, 3, 5))
> > +            db.session.add(r)
> > +            r = FirefoxRelease(partials='0,1', promptWaitTime=5,
> 
> Should we be doing be doing multiple test releases for Firefox and
> Thunderbird with different params too?
> ::: kickoff/test/views/base.py
> @@ -36,5 @@
> > -                              branch='a', mozillaRevision='abc',
> > -                              l10nChangesets='lk mn', dashboardCheck=False,
> > -                              mozillaRelbranch='BAR')
> > -            db.session.add(r)
> > -            r = FirefoxRelease(partials='0,1', promptWaitTime=5,
> 
> Same question as before re: doing multiple test releases for Firefox and
> Thunderbird.

I think I have all important cases covered -- most of the functionality is common between Fennec and Desktop releases. (Most of this code is just being moved from test/views/base.py, ftr.)
Attachment #707785 - Attachment is obsolete: true
Attachment #708125 - Flags: review?(catlee)
Comment on attachment 708125 [details] [diff] [review]
stop overriding split

Oops, wrong reviewer.
Attachment #708125 - Flags: review?(catlee) → review?(coop)
Attachment #707787 - Flags: checked-in+
Comment on attachment 707787 [details] [diff] [review]
library methods for version suggestions

Had to back this out because crappy Python version preproduction....
Attachment #707787 - Flags: checked-in+ → checked-in-
Attached patch use old syntaxSplinter Review
Tested this by hand w/ the same Python that's used for the preprod tests.
Attachment #707787 - Attachment is obsolete: true
Attachment #708158 - Flags: review?(coop)
Attachment #708125 - Flags: review?(coop) → review+
(In reply to Ben Hearsum [:bhearsum] from comment #17) 
> Had to back this out because crappy Python version preproduction....

Should we update that?
Attachment #708158 - Flags: review?(coop) → review+
(In reply to Chris Cooper [:coop] from comment #19)
> (In reply to Ben Hearsum [:bhearsum] from comment #17) 
> > Had to back this out because crappy Python version preproduction....
> 
> Should we update that?

It would be great to update it to whatever the minimum version we use across all slaves+masters is.
(In reply to Ben Hearsum [:bhearsum] from comment #20)
> (In reply to Chris Cooper [:coop] from comment #19)
> > (In reply to Ben Hearsum [:bhearsum] from comment #17) 
> > > Had to back this out because crappy Python version preproduction....
> > 
> > Should we update that?
> 
> It would be great to update it to whatever the minimum version we use across
> all slaves+masters is.

Filed bug 836787 on that.
Attachment #708158 - Flags: checked-in+
Attachment #708125 - Flags: checked-in+
Landed and the dev instance picked it up.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [kickoff] → [shipit]
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: