Bug 197700 - [ews-app] Production and Development env should configure DEBUG appropriately
Summary: [ews-app] Production and Development env should configure DEBUG appropriately
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aakash Jain
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-05-08 11:56 PDT by Aakash Jain
Modified: 2019-05-09 09:09 PDT (History)
8 users (show)

See Also:


Attachments
Patch (1.77 KB, patch)
2019-05-08 11:59 PDT, Aakash Jain
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews214 for win-future (13.62 MB, application/zip)
2019-05-08 21:35 PDT, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.