no error in UI when release cannot be deleted

RESOLVED FIXED

Status

Release Engineering
Applications: Balrog (backend)
P3
normal
RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: bhearsum, Assigned: vtieu)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [lang=python][good first bug])

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
It looks like the backend may not be returning a proper response, because Firefox's dev tools don't pick up a response body nor headers.

Comment 1

2 years ago
I'm interested in taking on this bug. Can you point me in the direction of where to look to get started?

Thank you, 

Kyle
(Reporter)

Comment 2

2 years ago
(In reply to kyleandrewmckenzie from comment #1)
> I'm interested in taking on this bug. Can you point me in the direction of
> where to look to get started?
> 
> Thank you, 
> 
> Kyle

Hi Kyle, thanks for your interest! You'll want to make sure that you can run the local development environment first, per https://wiki.mozilla.org/Balrog#Hacking. Also make sure that you can run the tests: https://wiki.mozilla.org/Balrog#Backend.

Once you've got that up and running, reproducing the bug is a next good step. You should be able to do that by browsing to http://localhost:8080/releases and attempting to do delete the "B2G-dogfood-fota-20151130130150" release. Note that there's a dialog that shows up, but no real error message inside of it. You should also see an exception in your console like:
balrogadmin_1 | ValueError: releases.name has rules pointing to it. Hence it cannot be deleted.

After you can reproduce, you'll need to figure out what's wrong, and how to fix it. Here's some pointers to possibly relevant code:
* The entry point for the DELETE endpoint: https://github.com/mozilla/balrog/blob/a9681be962001b1f973b0b38b6cdf11ad96e0941/auslib/admin/views/releases.py#L284
* Where we do some general exception handling from the API: https://github.com/mozilla/balrog/blob/a9681be962001b1f973b0b38b6cdf11ad96e0941/auslib/admin/views/base.py#L23
* Where the exception in question is raised: https://github.com/mozilla/balrog/blob/a9681be962001b1f973b0b38b6cdf11ad96e0941/auslib/db.py#L1549

Please feel free to ask if you run into trouble. IRC is best (irc://irc.mozilla.org/#balrog), but here in the bug is fine as well.
Assignee: nobody → kyleandrewmckenzie

Comment 3

2 years ago
Thank you!
(Reporter)

Comment 4

2 years ago
(In reply to kyleandrewmckenzie from comment #3)
> Thank you!

Hi Kyle, did you make any progress with this bug?
(Reporter)

Comment 5

2 years ago
(In reply to Ben Hearsum (:bhearsum) from comment #4)
> (In reply to kyleandrewmckenzie from comment #3)
> > Thank you!
> 
> Hi Kyle, did you make any progress with this bug?

Looks like you're not actively working on this. I'm going to unassign it for now.
Assignee: kyleandrewmckenzie → nobody
(Assignee)

Comment 6

a year ago
Created attachment 8828087 [details] [diff] [review]
1304375.patch

Hi I've attached the patch for this bug. I have also created a PR on github. Thanks
Attachment #8828087 - Flags: review?
(Reporter)

Updated

a year ago
Assignee: nobody → vtieu7
(Reporter)

Updated

a year ago
Priority: -- → P3

Comment 7

a year ago
Commit pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/df3b8f42a9eddac962c587aa792ec65a28d944e0
Bug 1304375 - no error in UI when release cannot be deleted (#213). r=bhearsum,aksareen
(Reporter)

Updated

a year ago
Depends on: 1337379
(Reporter)

Comment 8

a year ago
In production. Nice work Tieu!
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.