Bug 197319 - [ews-build] Do not print worker environment variables in each build step
Summary: [ews-build] Do not print worker environment variables in each build step
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-04-26 10:45 PDT by Aakash Jain
Modified: 2019-10-08 10:52 PDT (History)
9 users (show)

See Also:


Attachments
Patch (10.42 KB, patch)
2019-04-26 10:46 PDT, Aakash Jain
no flags Details | Formatted Diff | Diff
Patch (10.50 KB, patch)
2019-06-26 19:32 PDT, Aakash Jain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aakash Jain 2019-04-26 10:45:03 PDT
By default Buildbot prints worker's environment variables in each build step. This is unnecessary and makes the logs hard to read. We should disable printing environment variable in most of the build steps.

example (from https://ews-build.webkit.org/#/builders/9/builds/1071/steps/5/logs/stdio):
environment:
  Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.aTwloZVLIM/Render
  HOME=/Users/buildbot
  LOGNAME=buildbot
  OLDPWD=/Users/buildbot
  PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
  PWD=/Volumes/Data/worker/API-Tests-iOS-Simulator-EWS/build
  PYPI_MIRRORS=pypi.apple.com
  SHELL=/bin/bash
  SHLVL=1
  SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.D4SBJF1v2I/Listeners
  TMPDIR=/var/folders/vr/hgrp98wj6w797xrk_t22t3vh0000gn/T/
  USER=buildbot
  VERSIONER_PYTHON_PREFER_32_BIT=no
  VERSIONER_PYTHON_VERSION=2.7
  XPC_FLAGS=0x0
  XPC_SERVICE_NAME=0
  _=/usr/local/bin/twistd
  __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
 using PTY: False
Comment 1 Aakash Jain 2019-04-26 10:46:52 PDT
Created attachment 368335 [details]
Patch
Comment 2 Build Bot 2019-04-26 10:50:17 PDT Comment hidden (obsolete)
Comment 3 Lucas Forschler 2019-04-26 11:58:29 PDT
looks good to me, except for the style errors... (not sure if that is avoidable)
Comment 4 Dean Johnson 2019-04-26 11:59:54 PDT
Comment on attachment 368335 [details]
Patch

Maybe it'd be worth setting logEnviron=False in a new base class that inherited from shell.ShellCommand? Such as:

class MinimalLoggingShellCommand(shell.ShellCommand):
    logEnviron = False
Comment 5 Dean Johnson 2019-04-26 12:04:07 PDT
If you decide not to wrap shell.ShellCommand, I think the style errors can be avoided by moving the logEnviron=False to member vars of each class you want them used for. It's also a bit more clear since that's how other (static) step configurations are set.
Comment 6 Aakash Jain 2019-06-26 19:02:20 PDT
> class MinimalLoggingShellCommand(shell.ShellCommand):
>     logEnviron = False

logEnviron can not be a class variable, it has to be passed an instance variable (passed in __init__). We noticed similar behavior with 'timeout' in https://github.com/buildbot/buildbot/issues/3887#issuecomment-356736827
Comment 7 Aakash Jain 2019-06-26 19:32:43 PDT
Created attachment 372993 [details]
Patch
Comment 8 WebKit Commit Bot 2019-06-27 09:10:08 PDT
Comment on attachment 372993 [details]
Patch

Clearing flags on attachment: 372993

Committed r246882: <https://trac.webkit.org/changeset/246882>
Comment 9 WebKit Commit Bot 2019-06-27 09:10:09 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2019-06-27 09:11:17 PDT
<rdar://problem/52263170>