Merge lp:~henninge/launchpad/bug-824435-failure-reporting into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Aaron Bentley | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 13744 | ||||
Proposed branch: | lp:~henninge/launchpad/bug-824435-failure-reporting | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
313 lines (+200/-19) 5 files modified
lib/lp/app/javascript/testing/iorecorder.js (+18/-5) lib/lp/code/javascript/requestbuild_overlay.js (+34/-13) lib/lp/code/javascript/tests/test_requestbuild_overlay.html (+38/-0) lib/lp/code/javascript/tests/test_requestbuild_overlay.js (+104/-0) lib/lp/code/templates/sourcepackagerecipe-index.pt (+6/-1) |
||||
To merge this branch: | bzr merge lp:~henninge/launchpad/bug-824435-failure-reporting | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email:
|
Commit message
[r=abentley][bug=824435][incr] Remove Javascript alert and add test for requestdailybuild.
Description of the change
= Bug 824435 =
This is the first part of the fix. Does two things:
1. Remove the Javascript alert
2. Add a test as a fixture for the current situation
The next part will contain the actual fix.
== Proposed fix ==
The Javascript alert is a Bad Thing and I also don't know how to test
it. I replaced it with an in-place message which was already used for
displaying the result for the successful case.
I changed the behaviour of this message box by adding a "Dismiss"
button instead of having it disappear after 20 minutes. In case of the
error message it is a Good Idea to not have it disappear before you
can copy it to IRC. Also, since the page shifts around abit when the
message disappears, it used to be a bit surprising when that happened
by itself.
== Pre-implementation notes ==
I talked this through with Deryck and Aaron and they also helped me a
lot. There has been no pre-imp for the UI change, though.
== Implementation details ==
This is the second usage of IORecorder and I had to extend it to make
failure responses possible. The next step will see more extensions.
== Tests ==
The tests test the two possible errors that can currently be detected by
the failure handler: 503 and !503.
lib/lp/
== Demo and Q/A ==
Create a new recipe without changing the standard settings. You will see
the "Buld now" link. Clicking on it should create new builds and the
success message will be displayed. When it is dismissed, the "Build now"
button is gone, too.
I am not sure how to trigger an error yet.
= Launchpad lint =
I will fix these in the next go.
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
./lib/lp/
40: Expected '===' and instead saw '=='.
45: Expected '!==' and instead saw '!='.
70: Expected '===' and instead saw '=='.
72: ['name'] is better written in dot notation.
111: Expected '===' and instead saw '=='.
112: Expected '===' and instead saw '=='.
113: Expected '{' and instead saw 'header'.
116: Expected '{' and instead saw 'header'.
119: Expected '!==' and instead saw '!='.
121: Expected '===' and instead saw '=='.
227: Expected '!==' and instead saw '!='.
228: Expected '{' and instead saw 'error_msg'.
239: Use the array literal notation [].
261: Expected '{' and instead saw 'return'.
275: Expected ';' and instead saw 'if'.
276: Expected '===' and instead saw '=='.
290: Expected '{' and instead saw 'return'.
324: ['builds'] is better written in dot notation.
326: ['already_pending'] is better written in dot notation.
328: ['errors'] is better written in dot notation.
331: Expected '!==' and instead saw '!='.
343: Expected '!==' and instead saw '!='.
344: Expected '!==' and instead saw '!='.
345: Expected '{' and instead saw 'error_
347: Expected '{' and instead saw 'error_
350: Move 'var' declarations to the top of the function.
350: Stopping. (67% scanned).
0: JSLINT had a fatal error.
161: Line has trailing whitespace.
./lib/lp/
21: ['context'] is better written in dot notation.
99: Unexpected ','.
43: Line has trailing whitespace.
47: Line has trailing whitespace.
This is a syntax error in some browsers, so it should be fixed before landing:
./lib/lp/ code/javascript /tests/ test_requestbui ld_overlay. js
21: ['context'] is better written in dot notation.
99: Unexpected ','.
Aside from that, this is landable.
200 is far from the only "success" code. It might be better to trigger success on < 400.