Add basic releases view in balrog admin-ui

RESOLVED FIXED

Status

Release Engineering
General
RESOLVED FIXED
6 years ago
14 days ago

People

(Reporter: edransch, Assigned: edransch)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 4 obsolete attachments)

(Assignee)

Description

6 years ago
Created attachment 605922 [details] [diff] [review]
Add basic releases view

We should have an interface for showing the releases table in the admin ui for Balrog.
This should eventually include a good way to view the big json in the 'data' column.
Attachment #605922 - Flags: feedback?(bhearsum)
(Assignee)

Comment 1

6 years ago
Created attachment 605930 [details]
Screenshot of work-in-progress
Comment on attachment 605922 [details] [diff] [review]
Add basic releases view

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

Good start on this!

::: auslib/web/templates/snippets/releases.html
@@ +9,5 @@
> +        {% endfor %}
> +    </tr>
> +    {% for row in releases %}
> +    <tr>
> +        {% for key,value in row.iteritems() %}

It's nice that this loop means you don't have to hardcode key names, but I think it might be more trouble than it's worth for a few reasons:
- data_version and release_id need to be hidden fields
- you've got a special case for 'data' anyways
- the layout is subject to however python decides to order the results from iteritems()

::: auslib/web/views/releases.py
@@ +79,5 @@
> +class ReleasesView(AdminView):
> +    """/releases.html """
> +    def get(self):
> +        limit = None
> +        releases = db.releases.getReleases(limit=limit)

What's limit for?

@@ +83,5 @@
> +        releases = db.releases.getReleases(limit=limit)
> +        return render_template('releases.html', releases=releases)
> +
> +class DataView(AdminView):
> +    """releases/[release]"""

Total nit picks:
- ReleasesView -> ReleasesPageView, since I've been calling the HTML views in permissions.py similarly.
- DataView -> SingleReleaseView, to be more consistent with the rest of this file.
- Missing a leading slash at the start of this docstring.
Attachment #605922 - Flags: feedback?(bhearsum) → feedback+
Hmmm, is your screenshot from newer code? I just realized that it has release_id and the code doesn't.
(Assignee)

Comment 4

6 years ago
Created attachment 606662 [details] [diff] [review]
Add releases view

Updated to address feedback and add tests
Attachment #605922 - Attachment is obsolete: true
Attachment #606662 - Flags: feedback?(bhearsum)
Comment on attachment 606662 [details] [diff] [review]
Add releases view

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

Looking good so far!

::: auslib/web/templates/snippets/releases.html
@@ +16,5 @@
> +        <td>{{ row['version'] }}</td>
> +        <td> <a href='releases/{{ row.name }}'>link</a></td>
> +    </tr>
> +    {% endfor %}
> +</table>

Nit: Put this entire snippet inside the if condition. Instead of showing an empty table with headers, show a message saying there's no releases to show! This reminds me, we should expose a method of adding a new release via the admin ui at some point. Can you file a bug on that?
Attachment #606662 - Flags: feedback?(bhearsum) → feedback+
(Assignee)

Comment 6

6 years ago
Created attachment 607190 [details] [diff] [review]
Updated patch - Releases View
Attachment #606662 - Attachment is obsolete: true
Attachment #607190 - Flags: feedback?(bhearsum)
(Assignee)

Comment 7

6 years ago
Created attachment 607683 [details]
Screenshot of work-in-progress
Attachment #605930 - Attachment is obsolete: true
(Assignee)

Comment 8

6 years ago
1) Is there a json blob display/editor available in-webpage? If so, it's worth looking into. In either case, we should allow download/upload of blobs to edit the releases table. 

2) Have similar in-line editing to the Rules table

3) Display a diff in the JSON before committing any changes to the database.

3) Add ability to clone releases and allow edits.

4) Suppress nightly releases unless they're explicitly enabled (maybe a checkbox).

5) Add arbitrary filtering, sorting by column, and pagination. (Similar to slavealloc)

6) Possibility: attach tags to releases to facilitate easier filtering, etc. Do not implement this yet, keep it in mind for the future.
(In reply to Erick Dransch [:edransch] from comment #8)
> 4) Suppress nightly releases unless they're explicitly enabled (maybe a
> checkbox).

I would say that this should only apply to the dated nightly releases - I think the -latest versions should be as readily accessible as releases.
(Assignee)

Comment 10

6 years ago
Created attachment 609312 [details] [diff] [review]
Updated patch - Releases View

Update snippets->fragments
Attachment #607190 - Attachment is obsolete: true
Attachment #607190 - Flags: feedback?(bhearsum)
Attachment #609312 - Flags: review?(bhearsum)
Comment on attachment 609312 [details] [diff] [review]
Updated patch - Releases View

Landed this, here's the Jenkins run: https://jenkins.mozilla.org/job/Balrog/62/

I guess we can call this bug FIXED and open new ones for further enhancements.
Attachment #609312 - Flags: review?(bhearsum)
Attachment #609312 - Flags: review+
Attachment #609312 - Flags: checked-in+
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Summary: Add releases view in balrog admin-ui → Add basic releases view in balrog admin-ui
(Assignee)

Updated

6 years ago
Blocks: 737018
Product: mozilla.org → Release Engineering
Component: General Automation → General
Product: Release Engineering → Release Engineering
You need to log in before you can comment on or make changes to this bug.