Bug 197700

Summary: [ews-app] Production and Development env should configure DEBUG appropriately
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Aakash Jain <aakash_jain>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, commit-queue, ews-watchlist, jbedard, kocsen_chung, lforschler, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews214 for win-future none

Description Aakash Jain 2019-05-08 11:56:08 PDT
[ews-app] Production and Development env should configure DEBUG appropriately in the Django app.
Comment 1 Radar WebKit Bug Importer 2019-05-08 11:58:46 PDT
<rdar://problem/50590650>
Comment 2 Aakash Jain 2019-05-08 11:59:33 PDT
Created attachment 369402 [details]
Patch
Comment 3 Jonathan Bedard 2019-05-08 14:40:33 PDT
Comment on attachment 369402 [details]
Patch

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

> Tools/BuildSlaveSupport/ews-app/ews-app/settings.py:36
> +is_test_mode_enabled = os.getenv('EWS_PRODUCTION') is None

I usually prefer something like:

not int(os.getenv('EWS_PRODUCTION', 0))

What will the value of EWS_PRODUCTION be? I suppose this is being moved so it doesn't have to change, though.

> Tools/BuildSlaveSupport/ews-app/ews-app/settings.py:50
> +    # SECURITY WARNING: don't run with debug turned on in production!

Is it possible to log this somewhere? It doesn't seem useful as a nested comment.
Comment 4 Aakash Jain 2019-05-08 17:29:58 PDT
Comment on attachment 369402 [details]
Patch

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

>> Tools/BuildSlaveSupport/ews-app/ews-app/settings.py:36
>> +is_test_mode_enabled = os.getenv('EWS_PRODUCTION') is None
> 
> I usually prefer something like:
> 
> not int(os.getenv('EWS_PRODUCTION', 0))
> 
> What will the value of EWS_PRODUCTION be? I suppose this is being moved so it doesn't have to change, though.

EWS_PRODUCTION=true

This is similar to our all other buildbot instance. e.g.: See <rdar://problem/49263590>.

>> Tools/BuildSlaveSupport/ews-app/ews-app/settings.py:50
>> +    # SECURITY WARNING: don't run with debug turned on in production!
> 
> Is it possible to log this somewhere? It doesn't seem useful as a nested comment.

This comment (and file) was autogenerated by Django. I am just moving it around. This patch ensure that we don't turn on debug in production.
Comment 5 EWS Watchlist 2019-05-08 21:35:12 PDT Comment hidden (obsolete)
Comment 6 EWS Watchlist 2019-05-08 21:35:14 PDT Comment hidden (obsolete)
Comment 7 WebKit Commit Bot 2019-05-09 09:09:40 PDT
Comment on attachment 369402 [details]
Patch

Clearing flags on attachment: 369402

Committed r245136: <https://trac.webkit.org/changeset/245136>
Comment 8 WebKit Commit Bot 2019-05-09 09:09:42 PDT
All reviewed patches have been landed.  Closing bug.