-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix Dangerbot parsing of Travis errors in Rails 4 #1852
Comments
The error message gives an insight that this piece of code is being called here to report the error: rescue => ex
puts "There was an error with Danger bot's Junit parsing:"
puts ex.message
end Because this is a rescue call, something has thrown an error somewhere, let me single it out. The error says: @jywarren how did you produce this danger error message? Anywhere I could play with these values? $ mkdir -p ./test/reports
The command "mkdir -p ./test/reports" exited with 0.
$ touch ./test/reports/TEST_.xml
The command "touch ./test/reports/TEST_.xml" exited with 0. @jywarren are you sure reports were even generated? If so, then why do we need to make the |
I tried running ...
task :all => :environment do
require 'coveralls/rake/task'
Coveralls::RakeTask.new
STDOUT.puts 'Reports being generated' # Extra line one
k = STDIN.gets # Extra line two
if ENV['GENERATE_REPORT'] == 'true'
require 'ci/reporter/rake/test_unit'
Rake::Task["ci:setup:testunit"].execute
end
... With two extra lines added. Shouldn't the Rake task halt momentarily for input? It doesn't. Something seems fishy. |
Okay, I finally made the last two work. The problem now is, with or without a test failure, no
|
@jywarren Ugh, take a look at this: ci-reporter/ci_reporter#106 |
@jywarren I submitted a patch, please take a look. |
* Fix Error reporting and parsing (fixes publiclab#1852) * Remove fraudlent failure * Update .travis.yml
Until recently, Dangerbot would repeat out errors and failures in each PR, like in this example:
#1708 (comment) (see how Dangerbot actually reproduced the errors in its comment?)
In this recent one (after the Rails 4.1 upgrade), this no longer happens. This PR, which had the error:
shown here: https://travis-ci.org/publiclab/plots2/builds/314000925?utm_source=github_status&utm_medium=notification
does not show any Danger-reported messages: #1851
(you can open a new PR with failed tests to confirm this)
The Dangerfile is here:
https://github.com/publiclab/plots2/blob/master/Dangerfile
The error it generates is:
Let's fix this! It may also involve the .travis.yml file here, which generates the output.xml files which Danger and Junit parse:
plots2/.travis.yml
Lines 22 to 25 in 5ffd7c6
The text was updated successfully, but these errors were encountered: