-
Notifications
You must be signed in to change notification settings - Fork 23.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug output callback #16839
Debug output callback #16839
Conversation
as mentioned in related PR, this should not be the default, easy enough to create a new callback that just does this and let the user point to it. |
Well, it's easy to create a new callback already. What's not easy, is to do remote debugging, ie. when trying to support a user on IRC (dunno if you've read the ML thread which includes a use case) and get them to produce readable output in the current situation. |
it would be as easy as asking him to rerun with:
|
Nice ! in this case note that we're going to have to hack the result variable by temporarily removing std{out,err} variables. However, we can close #16838 in this case ? |
31e5a08
to
2adbce3
Compare
|
||
# For some reason this would cause ImportError | ||
# import ansible.plugins.callback.default as DEFAULT_MODULE | ||
# So, please forgive the horror you are about to witness, but it is necessary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try something like:
from ansible.plugins.callback.default import CallbackModule as CallbackModule_default
and
class CallbackModule(CallbackModule_default):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ the code above is what we already use in other plugins that derive from default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3 it ! Thanks a lot !
Is there any other revision needed from me ? I'm wondering because of the label. |
And fatal: [devops]: FAILED! => {"changed": true, "cmd": ["make", "frontend"], "delta": "0:07:51.972557", "end": "2016-08-05 16:26:51.450171", "failed": true, "rc": 2, "start": "2016-08-05 16:18:59.477614", "stderr": "You are using pip version 8.1.1, however version 8.1.2 is available.\nYou should consider upgrading via the 'pip install --upgrade pip' command.\nYou are using pip version 8.1.1, however version 8.1.2 is available.\nYou should consider upgrading via the 'pip install --upgrade pip' command.\nCommand "python setup.py egg_info" failed with error code 1 in /opt/buildbot/www/base/\nYou are using pip version 8.1.1, however version 8.1.2 is available.\nYou should consider upgrading via the 'pip install --upgrade pip' command.\nCommand "python setup.py egg_info" failed with error code 1 in /opt/buildbot/www/codeparameter/\nYou are using pip version 8.1.1, however version 8.1.2 is available.\nYou should consider upgrading via the 'pip install --upgrade pip' command.\nCommand "python setup.py egg_info" failed with error code 1 in /opt/buildbot/www/console_view/\nYou are using pip version 8.1.1, however version 8.1.2 is available.\nYou should consider upgrading via the 'pip install --upgrade pip' command.\nCommand "python setup.py egg_info" failed with error code 1 in /opt/buildbot/www/waterfall_view/\nYou are using pip version 8.1.1, however version 8.1.2 is available.\nYou should consider upgrading via the 'pip install --upgrade pip' command.\nmake: *** [frontend] Error 1", "stdout": "pip install -e pkg\nObtaining file:///opt/buildbot/pkg\nInstalling collected packages: buildbot-pkg\n Running setup.py develop for buildbot-pkg\nSuccessfully installed buildbot-pkg-0.9.0\npip install mock\nCollecting mock\n Downloading mock-2.0.0-py2.py3-none-any.whl (56kB)\nRequirement already satisfied (use --upgrade to upgrade): six>=1.9 in /usr/local/lib/python2.7/dist-packages (from mock)\nCollecting funcsigs>=1; python_version < "3.3" (from mock)\n Downloading funcsigs-1.0.2-py2.py3-none-any.whl\nCollecting pbr>=0.11 (from mock)\n Downloading pbr-1.10.0-py2.py3-none-any.whl (96kB)\nInstalling collected packages: funcsigs, pbr, mock\nSuccessfully installed funcsigs-1.0.2 mock-2.0.0 pbr-1.10.0\nfor i in www/_/; do pip install -e $i ; done\nObtaining file:///opt/buildbot/www/base\n Complete output from command python setup.py egg_info:\n running egg_info\n npm install\n WARN engine guanlecoja@0.3.7: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"4.2.6","npm":"3.5.2"})\n npm WARN deprecated gulp-minify-css@0.3.13: Please use gulp-clean-css\n WARN engine gulp-bower-deps@0.2.5: wanted: {"node":"~0.10"} (current: {"node":"4.2.6","npm":"3.5.2"})\n WARN engine karma@0.12.37: wanted: {"node":">=0.8 <=0.12 || >=1 <=2"} (current: {"node":"4.2.6","npm":"3.5.2"})\n npm WARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.\n npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.\n npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue\n npm WARN deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue\n npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue\n npm WARN deprecated jade@1.3.1: Jade has been renamed to pug, please install the latest version of pug instead of jade\n npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer\n npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue\n npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130\n npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.\n npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.\n npm WARN prefer global bower@1.3.8 should be installed with -g\n \n > ws@0.4.32 install /opt/buildbot/www/base/node_modules/ws\n > (node-gyp rebuild 2> builderror.log) || (exit 0)\n \n \n > phantomjs@1.9.20 install /opt/buildbot/www/base/node_modules/phantomjs\n > node install.js\n \n sh: 1: node: not found\n buildbot-www@ /opt/buildbot/www/base\n ├── connect@2.12.0 extraneous\n ├─┬ gulp@3.8.6\n │ ├── archy@0.0.2\n │ ├─┬ chalk@0.5.1\n │ │ ├── ansi-styles@1.1.0\n │ │ ├─┬ has-ansi@0.1.0\n │ │ │ └── ansi-regex@0.2.1\n │ │ ├── strip-ansi@0.3.0\n │ │ └── supports-color@0.2.0\n │ ├── deprecated@0.0.1\n │ ├─┬ gulp-util@2.2.20\n │ │ ├─┬ dateformat@1.0.12\n │ │ │ ├── get-stdin@4.0.1\n │ │ │ └─┬ meow@3.7.0\n │ │ │ ├─┬ camelcase-keys@2.1.0\n │ │ │ │ └── camelcase@2.1.1\n │ │ │ ├── decamelize@1.2.0\n │ │ │ ├─┬ loud-rejection@1.6.0\n │ │ │ │ ├─┬ currently-unhandled@0.4.1\n │ │ │ │ │ └── array-find-index@1.0.1\n │ │ │ │ └── signal-exit@3.0.0\n │ │ │ ├── map-obj@1.0.1\n │ │ │ ├── minimist@1.2.0\n │ │ │ ├─┬ normalize-package-data@2.3.5\n │ │ │ │ ├── hosted-git-info@2.1.5\n │ │ │ │ ├─┬ is-builtin-module@1.0.0\n │ │ │ │ │ └── builtin-modules@1.1.1\n │ │ │ │ ├── semver@5.3.0\n │ │ │ │ └─┬ validate-npm-package-license@3.0.1\n │ │ │ │ ├─┬ spdx-correct@1.0.2\n │ │ │ │ │ └── spdx-license-ids@1.2.2\n │ │ │ │ └─┬ spdx-expression-parse@1.0.2\n │ │ │ │ └── spdx-exceptions@1.0.5\n │ │ │ ├── object-assign@4.1.0\n │ │ │ ├─┬ read-pkg-up@1.0.1\n │ │ │ │ ├─┬ find-up@1.1.2\n │ │ │ │ │ ├── path-exists@2.1.0\n │ │ │ │ │ └─┬ pinkie-promise@2.0.1\n │ │ │ │ │ └── pinkie@2.0.4\n │ │ │ │ └─┬ read-pkg@1.1.0\n │ │ │ │ ├─┬ load-json-file@1.1.0\n │ │ │ │ │ ├── graceful-fs@4.1.5\n │ │ │ │ │ ├─┬ parse-json@2.2.0\n │ │ │ │ │ │ └─┬ error-ex@1.3.0\n │ │ │ │ │ │ └── is-arrayish@0.2.1\n │ │ │ │ │ ├── pify@2.3.0\n │ │ │ │ │ └── strip-bom@2.0.0\n │ │ │ │ └── path-type@1.1.0\n │ │ │ ├─┬ redent@1.0.0\n │ │ │ │ ├─┬ indent-string@2.1.0\n │ │ │ │ │ └─┬ repeating@2.0.1\n │ │ │ │ │ └─┬ is-finite@1.0.1\n │ │ │ │ │ └── number-is-nan@1.0.0\n │ │ │ │ └── strip-indent@1.0.1\n │ │ │ └── trim-newlines@1.0.0\n │ │ ├── lodash._reinterpolate@2.4.1\n │ │ ├─┬ lodash.template@2.4.1\n │ │ │ ├── lodash._escapestringchar@2.4.1\n │ │ │ ├─┬ lodash.defaults@2.4.1\n │ │ │ │ └── lodash._objecttypes@2.4.1\n │ │ │ ├─┬ lodash.escape@2.4.1\n │ │ │ │ ├─┬ lodash._escapehtmlchar@2.4.1\n │ │ │ │ │ └── lodash._htmlescapes@2.4.1\n │ │ │ │ └── lodash._reunescapedhtml@2.4.1\n │ │ │ ├─┬ lodash.keys@2.4.1\n │ │ │ │ ├── lodash._isnative@2.4.1\n │ │ │ │ ├── lodash._shimkeys@2.4.1\n │ │ │ │ └── lodash.isobject@2.4.1\n │ │ │ ├── lodash.templatesettings@2.4.1\n │ │ │ └── lodash.values@2.4.1\n │ │ ├─┬ multipipe@0.1.2\n │ │ │ └─┬ duplexer2@0.0.2\n │ │ │ └── readable-stream@1.1.14\n │ │ └─┬ vinyl@0.2.3\n │ │ └── clone-stats@0.0.1\n │ ├── interpret@0.3.10\n │ ├─┬ liftoff@0.12.1\n │ │ ├── extend@1.3.0\n │ │ ├─┬ findup-sync@0.1.3\n │ │ │ └─┬ glob@3.2.11\n │ │ │ └─┬ minimatch@0.3.0\n │ │ │ ├── lru-cache@2.5.2\n │ │ │ └── sigmund@1.0.1\n │ │ └── resolve@0.7.4\n │ ├── minimist@0.2.0\n │ ├─┬ orchestrator@0.3.7\n │ │ ├─┬ end-of-stream@0.1.5\n │ │ │ └─┬ once@1.3.3\n │ │ │ └── wrappy@1.0.2\n │ │ ├── sequencify@0.0.7\n │ │ └── stream-consume@0.1.0\n │ ├── pretty-hrtime@0.2.2\n │ ├── semver@2.3.2\n │ ├── tildify@0.2.0\n │ └─┬ vinyl-fs@0.3.14\n │ ├─┬ defaults@1.0.3\n │ │ └── clone@1.0.2\n │ ├─┬ glob-stream@3.1.18\n │ │ ├─┬ glob@4.5.3\n │ │ │ └── inflight@1.0.5\n │ │ ├─┬ glob2base@0.0.12\n │ │ │ └── find-index@0.1.1\n │ │ ├─┬ minimatch@2.0.10\n │ │ │ └─┬ brace-expansion@1.1.6\n │ │ │ ├── balanced-match@0.4.2\n │ │ │ └── concat-map@0.0.1\n │ │ ├── ordered-read-streams@0.1.0\n │ │ ├─┬ through2@0.6.5\n │ │ │ ├── readable-stream@1.0.34\n │ │ │ └── xtend@4.0.1\n │ │ └── unique-stream@1.0.0\n │ ├─┬ glob-watcher@0.0.6\n │ │ └─┬ gaze@0.5.2\n │ │ └─┬ globule@0.1.0\n │ │ ├─┬ glob@3.1.21\n │ │ │ ├── graceful-fs@1.2.3\n │ │ │ └── inherits@1.0.2\n │ │ ├── lodash@1.0.2\n │ │ └── minimatch@0.2.14\n │ ├── graceful-fs@3.0.8\n │ ├─┬ mkdirp@0.5.1\n │ │ └── minimist@0.0.8\n │ ├─┬ strip-bom@1.0.0\n │ │ ├── first-chunk-stream@1.0.0\n │ │ └── is-utf8@0.2.1\n │ ├─┬ through2@0.6.5\n │ │ ├── readable-stream@1.0.34\n │ │ └── xtend@4.0.1\n │ └─┬ vinyl@0.4.6\n │ └── clone@0.2.0\n ├── gulp-angular-templatecache@1.2.1 extraneous\n ├── gulp-bower-deps@0.2.5 extraneous\n ├── gulp-cached@1.0.4 extraneous\n ├── gulp-coffee@2.1.2 extraneous\n ├── gulp-fixtures2js@0.0.1 extraneous\n ├── gulp-help@1.3.4 extraneous\n ├── gulp-if@1.2.5 extraneous\n ├── gulp-jade@0.6.1 extraneous\n ├── gulp-karma@0.0.5 extraneous\n ├── gulp-less@1.3.9 extraneous\n ├── gulp-livereload@2.1.1 extraneous\n ├── gulp-minify-css@0.3.13 extraneous\n ├── gulp-ng-annotate@0.2.0 extraneous\n ├── gulp-ng-classify@4.0.1 extraneous\n ├── gulp-remember@0.2.2 extraneous\n ├── gulp-rename@1.2.2 extraneous\n ├─┬ gulp-shell@0.2.9\n │ ├── async@0.9.2\n │ ├─┬ gulp-util@3.0.7\n │ │ ├── array-differ@1.0.0\n │ │ ├── array-uniq@1.0.3\n │ │ ├── beeper@1.1.0\n │ │ ├─┬ chalk@1.1.3\n │ │ │ ├── ansi-styles@2.2.1\n │ │ │ ├─┬ has-ansi@2.0.0\n │ │ │ │ └── ansi-regex@2.0.0\n │ │ │ ├── strip-ansi@3.0.1\n │ │ │ └── supports-color@2.0.0\n │ │ ├─┬ fancy-log@1.2.0\n │ │ │ ├─┬ chalk@1.1.3\n │ │ │ │ ├── ansi-styles@2.2.1\n │ │ │ │ ├─┬ has-ansi@2.0.0\n │ │ │ │ │ └── ansi-regex@2.0.0\n │ │ │ │ ├── strip-ansi@3.0.1\n │ │ │ │ └── supports-color@2.0.0\n │ │ │ └── time-stamp@1.0.1\n │ │ ├─┬ gulplog@1.0.0\n │ │ │ └── glogg@1.0.0\n │ │ ├─┬ has-gulplog@0.1.0\n │ │ │ └── sparkles@1.0.0\n │ │ ├── lodash._reescape@3.0.0\n │ │ ├── lodash._reevaluate@3.0.0\n │ │ ├── lodash._reinterpolate@3.0.0\n │ │ ├─┬ lodash.template@3.6.2\n │ │ │ ├── lodash._basecopy@3.0.1\n │ │ │ ├── lodash._basetostring@3.0.1\n │ │ │ ├── lodash._basevalues@3.0.0\n │ │ │ ├── lodash._isiterateecall@3.0.9\n │ │ │ ├─┬ lodash.escape@3.2.0\n │ │ │ │ └── lodash._root@3.0.1\n │ │ │ ├─┬ lodash.keys@3.1.2\n │ │ │ │ ├── lodash.getnative@3.9.1\n │ │ │ │ ├── lodash.isarguments@3.0.9\n │ │ │ │ └── lodash.isarray@3.0.4\n │ │ │ ├── lodash.restparam@3.6.1\n │ │ │ └── lodash.templatesettings@3.1.1\n │ │ ├── minimist@1.2.0\n │ │ ├── object-assign@3.0.0\n │ │ ├── replace-ext@0.0.1\n │ │ ├─┬ through2@2.0.1\n │ │ │ ├─┬ readable-stream@2.0.6\n │ │ │ │ └── isarray@1.0.0\n │ │ │ └── xtend@4.0.1\n │ │ └── vinyl@0.5.3\n │ ├── lodash@2.4.2\n │ └─┬ through2@0.5.1\n │ ├─┬ readable-stream@1.0.34\n │ │ ├── core-util-is@1.0.2\n │ │ ├── inherits@2.0.1\n │ │ ├── isarray@0.0.1\n │ │ └── string_decoder@0.10.31\n │ └── xtend@3.0.0\n ├── gulp-sourcemaps@1.1.5 extraneous\n ├── gulp-uglify@0.3.2 extraneous\n ├── karma@0.12.37 extraneous\n ├── karma-coverage@0.2.7 extraneous\n ├── karma-jasmine@0.2.3 extraneous\n └── karma-sourcemap-loader@0.2.0 extraneous\n \n npm WARN optional Skipping failed optional dependency /chokidar/fsevents:\n npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14\n npm WARN guanlecoja@0.3.7 requires a peer of run-sequence@~0.3.6 but none was installed.\n npm WARN buildbot-www@ No description\n npm WARN buildbot-www@ No repository field.\n npm WARN buildbot-www@ No license field.\n npm ERR! Linux 4.6.4-1-userns\n npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"\n npm ERR! node v4.2.6\n npm ERR! npm v3.5.2\n npm ERR! file sh\n npm ERR! code ELIFECYCLE\n npm ERR! errno ENOENT\n npm ERR! syscall spawn\n \n npm ERR! phantomjs@1.9.20 install: Becomes
What a relief !! |
As discussed on the Improving default output thread, this PR makes multiline output readable with -v.