Bug 174477

Summary: Create Individual EWS Pages
Product: WebKit Reporter: obinna obike <oobike>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, buildbot, commit-queue, dbates, ddkilzer, dean_johnson, jlewis3, joepeck, ryanhaddad, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=173667
Attachments:
Description Flags
Reverted the changes to urls.py and bugzilla.py
aakash_jain: review-
status bubble link to individual EWS page.
aakash_jain: review-
status bubble link to individual EWS page.
none
status bubble link to individual EWS page.
none
status bubble link to individual EWS page.
none
Updated Patch
none
Updated Patch
none
Updated Patch none

Description obinna obike 2017-07-13 15:56:45 PDT
Created Individual EWS Pages
Comment 1 obinna obike 2017-07-19 17:35:06 PDT
Created attachment 315961 [details]
Reverted the changes to urls.py and bugzilla.py

I changed the url in the urls.py back to wekbkit server instead of my local server. I also reverted the changes to bugzilla.py.
Comment 2 Aakash Jain 2017-07-31 14:25:57 PDT
Comment on attachment 315961 [details]
Reverted the changes to urls.py and bugzilla.py

View in context: https://bugs.webkit.org/attachment.cgi?id=315961&action=review

> Tools/ChangeLog:7
> +

Please describe your changes in the ChangeLog. Please see https://webkit.org/contributing-code/#changelog-files

> Tools/QueueStatusServer/handlers/patch.py:50
> +                    per_queue_statuses = queue_status.get(status.queue_name, [])

As I requested couple of times in-person, please avoid this code duplication. It's a simple if else, you should be able to avoid the duplication.

> Tools/QueueStatusServer/handlers/statusbubble.py:91
> +                message = "\n\nhttps://build.webkit.org/dashboard/"

This is completely unrelated change. Please remove this change from this patch and create a separate bug for this change. Make sure you test it as well.
Comment 3 Aakash Jain 2017-07-31 14:29:51 PDT
*** Bug 174728 has been marked as a duplicate of this bug. ***
Comment 4 obinna obike 2017-08-03 13:58:37 PDT
Created attachment 317149 [details]
status bubble link to individual EWS page.
Comment 5 Build Bot 2017-08-03 14:00:35 PDT
Attachment 317149 [details] did not pass style-queue:


ERROR: Tools/QueueStatusServer/handlers/patch.py:58:  no newline at end of file  [pep8/W292] [5]
ERROR: Tools/QueueStatusServer/handlers/patch.py:58:  [Patch.get] Instance of 'Patch' has no 'response' member  [pylint/E1101] [5]
Total errors found: 2 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Aakash Jain 2017-08-03 14:05:28 PDT
Comment on attachment 317149 [details]
status bubble link to individual EWS page.

View in context: https://bugs.webkit.org/attachment.cgi?id=317149&action=review

> Tools/ChangeLog:9
> +        to go directly to the Individual EWS page.I also added made changes to the code so that if the number

"added made changes" ?

> Tools/ChangeLog:10
> +        of items in the queue is 0 then have a message that says waiting in the queue processing hasnt started.

hasnt => hasn't.
0 => zero

> Tools/ChangeLog:11
> +        I also added a link to the list of all of the EWS queues at the bottom if there is no or one EWS on the page.

"if there is no or one EWS on the page"? Wouldn't that link be always there?

> Tools/ChangeLog:15
> +        * QueueStatusServer/handlers/statusbubble.py:

Please add a small description of each change here as well.

> Tools/QueueStatusServer/handlers/patch.py:52
> +                    queue_status[status.queue_name] = per_queue_statuses

Did you see my previous comment: "As I requested couple of times in-person, please avoid this code duplication. It's a simple if else, you should be able to avoid the duplication."
Comment 7 obinna obike 2017-08-07 09:46:06 PDT
Created attachment 317428 [details]
status bubble link to individual EWS page.
Comment 8 Aakash Jain 2017-08-07 10:22:45 PDT
The patch looks good except for the code duplication which I requested earlier. You are not able to simplify the if-else?
Comment 9 obinna obike 2017-08-07 11:51:21 PDT
Created attachment 317447 [details]
status bubble link to individual EWS page.

changed the if else statement to two if statements to simplify the code.
Comment 10 Aakash Jain 2017-08-07 11:53:36 PDT
Code duplication is still there. It shouldn't be difficult to simplify it.
Comment 11 Dean Johnson 2017-08-07 13:26:18 PDT
Comment on attachment 317447 [details]
status bubble link to individual EWS page.

View in context: https://bugs.webkit.org/attachment.cgi?id=317447&action=review

> Tools/QueueStatusServer/handlers/patch.py:51
> +                queue_status[status.queue_name] = per_queue_statuses

I would recommend rewriting L41-L51 as follows:

queue_status = {}
for status in statuses:
    bug_id = status.active_bug_id  # Should be the same for every status
    per_queue_statuses = queue_status.get(status.queue_name, [])
    per_queue_statuses.append(status)
    queue_status[status.queue_name] = per_queue_statuses

# Show a single EWS status instead of all.
if queue_name is not None:  
    single_queue_status = {}
    single_queue_status[queue_name] = queue_statuses.get(status.queue_name, [])
    queue_statuses = single_queue_status

This is optimal because it allows for existing code to continue functioning as it was, and just picks out the individual status if it's requested.
Comment 12 Dean Johnson 2017-08-07 13:47:23 PDT
(In reply to Dean Johnson from comment #11)
> Comment on attachment 317447 [details]
> status bubble link to individual EWS page.
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=317447&action=review
> 
> > Tools/QueueStatusServer/handlers/patch.py:51
> > +                queue_status[status.queue_name] = per_queue_statuses
> 
> I would recommend rewriting L41-L51 as follows:
> 
> queue_status = {}
> for status in statuses:
>     bug_id = status.active_bug_id  # Should be the same for every status
>     per_queue_statuses = queue_status.get(status.queue_name, [])
>     per_queue_statuses.append(status)
>     queue_status[status.queue_name] = per_queue_statuses
> 
> # Show a single EWS status instead of all.
> if queue_name is not None:  
>     single_queue_status = {}
>     single_queue_status[queue_name] = queue_statuses.get(status.queue_name,
> [])
Oops, this line should read:
      single_queue_status[queue_name] = queue_statuses.get(queue_name, [])
>     queue_statuses = single_queue_status
> 
> This is optimal because it allows for existing code to continue functioning
> as it was, and just picks out the individual status if it's requested.
Comment 13 obinna obike 2017-08-07 13:59:02 PDT
Created attachment 317460 [details]
status bubble link to individual EWS page.
Comment 14 obinna obike 2017-08-08 09:53:38 PDT
Created attachment 317581 [details]
Updated Patch
Comment 15 Aakash Jain 2017-08-08 12:54:07 PDT
Patch looks good. Please do svn update and re-create the patch, to ensure it doesn't fail to apply to repository.
Comment 16 obinna obike 2017-08-08 16:40:39 PDT
Created attachment 317646 [details]
Updated Patch
Comment 17 obinna obike 2017-08-08 16:41:50 PDT
Created attachment 317647 [details]
Updated Patch
Comment 18 Aakash Jain 2017-08-08 17:54:10 PDT
Looks good to me.
Comment 19 WebKit Commit Bot 2017-08-08 18:24:29 PDT
Comment on attachment 317647 [details]
Updated Patch

Clearing flags on attachment: 317647

Committed r220434: <http://trac.webkit.org/changeset/220434>
Comment 20 WebKit Commit Bot 2017-08-08 18:24:30 PDT
All reviewed patches have been landed.  Closing bug.
Comment 21 Radar WebKit Bug Importer 2017-08-08 18:26:08 PDT
<rdar://problem/33790314>
Comment 22 Aakash Jain 2017-08-09 10:57:32 PDT
Updated the server. These changes are now live.