Skip to content
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

Workaround bug in Travis? #489

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
4 participants
@cpina
Copy link
Member

commented Apr 27, 2013

Travis said "The log length has exceeded the limit of 4 Megabytes (this usually means that test suite is raising the same exception over and over)."
Watching the log I don't see 4 MB of data (https://travis-ci.org/citation-style-language/styles/builds/6688872)
Someone may contact Travis but this patch tries to print less "." just in case this fixes the problem for the time being.

@cpina

This comment has been minimized.

Copy link
Member Author

commented Apr 27, 2013

Ops, correction: the git commands may generate more output than what it looks. I'll have a second thought...

@rmzelle

This comment has been minimized.

Copy link
Member

commented Apr 27, 2013

I think it's because of the Fuubar progress formatter, which does a lot of redrawing. I'm not sure how to disable it, though.

@cpina

This comment has been minimized.

Copy link
Member Author

commented Apr 27, 2013

Actually indeed they do: pressing on the Travis webpage (https://travis-ci.org/citation-style-language/styles/builds/6688872 ) the "Download Log" (it's an option on the icon at the right): https://s3.amazonaws.com/archive.travis-ci.org/jobs/6688873/log.txt it shows a file of about 4 MB: https://s3.amazonaws.com/archive.travis-ci.org/jobs/6688873/log.txt

The "git clone" that Travis is doing should have the option "-q" to avoid too much verbosity. I'm not familiar with Travis but I guess that should be easy to do.

@cpina

This comment has been minimized.

Copy link
Member Author

commented Apr 27, 2013

@rmzelle : do you have some Travis credentials?

@rmzelle

This comment has been minimized.

Copy link
Member

commented Apr 27, 2013

I reported the issue with the Fuubar project: thekompanee/fuubar#39

@rmzelle

This comment has been minimized.

Copy link
Member

commented Apr 27, 2013

And while the git cloning could be less verbose, that's not the biggest issue.

@cpina

This comment has been minimized.

Copy link
Member Author

commented Apr 27, 2013

You are right, it's another command that generates all that output.

@cpina cpina closed this Apr 27, 2013

@rmzelle

This comment has been minimized.

Copy link
Member

commented Apr 27, 2013

@inukshuk, do you know how to disable Fuubar in the meantime?

@inukshuk

This comment has been minimized.

Copy link
Member

commented Apr 28, 2013

Yes, I switched to the regular progess reporter here – this way it does not error anymore on travis, but the log output is pretty useless. I'll take a look at how the rspec formatters work. For our purposes I figure it would be sufficient to only report errors and not tests that succeed.

@inukshuk

This comment has been minimized.

Copy link
Member

commented Apr 28, 2013

Guys, I added a custom formatter here: #98fc903.

This should now produce sane output (currently there's real error with the plasmonics style). Fingers crossed!

@inukshuk

This comment has been minimized.

Copy link
Member

commented Apr 28, 2013

@jfelchner

This comment has been minimized.

Copy link

commented Aug 12, 2013

Hey all, I think I finally have this taken care of now.

I've added both a #log statement to ruby-progressbar (which will remove the bar, print some text and the redraw the bar) as well as proper non-TTY output. The bar will only print to non-TTY device if the bar is stopped or finished.

This will be released today as v1.2 so if you have fuubar v1.1.1 or later, you can simply bundle update ruby-progressbar.

If you wouldn't mind trying this out on Travis and let me know if it works for you, I'd appreciate it!

@rmzelle

This comment has been minimized.

Copy link
Member

commented Aug 12, 2013

@inukshuk, can you make the required changes once ruby-progressbar 1.2 is out so we can test this? Feel free to push directly to the repo.

Judging from dfe3e2b , I guess some changes have to be made to the "Gemfile" and "Rakefile" files?

@inukshuk

This comment has been minimized.

Copy link
Member

commented Aug 12, 2013

@jfelchner awesome, thanks for the heads-up!

@rmzelle I'm currently out of town, but I can try it out as soon as I'm back home next week. Meanwhile, however, if I understand this correctly, all you need to do once 1.2 is ready is to:

  • move the line gem 'fuubar' out of the :extra group — this will make travis fetch fuubar for our build
  • change the default format to 'Fuubar' instead of 'progress' in the Rakefile on the spec.rspec_opts line

In case you want to try that out beforehand.

@rmzelle

This comment has been minimized.

Copy link
Member

commented Aug 12, 2013

Yeah, that's what I grasped as well without knowing any Ruby :). I'll give it a try this evening.

@jfelchner

This comment has been minimized.

Copy link

commented Aug 13, 2013

v1.2.0 has just been pushed to rubygems. Hopefully I didn't break anything too badly. :)

rmzelle added a commit that referenced this pull request Aug 13, 2013

@rmzelle

This comment has been minimized.

@jfelchner

This comment has been minimized.

Copy link

commented Aug 13, 2013

@rmzelle ok, the ASCII codes will be fixed in a bugfix release of fuubar that I will release tonight. We added throttling to ruby-progressbar so it only updates every 1/100th of a second so that's why you're no longer seeing every progress update.

This fact alone means that you may be able to get in under the log file size limit (and therefore be able to leave fuubar as the default rspec formatter).

Unfortunately, you're still seeing multiple updates, this shows that progressbar still considers the Travis log to be a TTY device. Have you all been in contact with the Travis folks about this?

@rmzelle

This comment has been minimized.

Copy link
Member

commented Aug 13, 2013

No, not yet.

@rmzelle

This comment has been minimized.

Copy link
Member

commented Aug 14, 2013

@jfelchner, would you mind creating a Travis issue? The only relevant comment I could find is travis-ci/travis-ci#1114 (comment) .

@jfelchner

This comment has been minimized.

Copy link

commented Aug 14, 2013

@inukshuk

This comment has been minimized.

Copy link
Member

commented Aug 18, 2013

@rmzelle anything I should do?

I guess we could stick with progress on Travis for now and make fuubar the default otherwise. I could add a switch that checks for any of the Travis CI environment variables.

Even better, I guess would be to add a custom formatter that only reports the errors and skips printing anything else (I mean, we're really only interested in the error messages anyway).

@jfelchner

This comment has been minimized.

Copy link

commented Aug 18, 2013

@inukshuk I think for now that making progress the default would be the way to go. Once I have an update from that Travis issue, I'll update this issue again and we can revisit it.

Thanks for sticking with me to try to make this work.

@rmzelle

This comment has been minimized.

Copy link
Member

commented Aug 19, 2013

@jfelchner, any chance of a strong throttling option for fuubar, e.g. limit refreshes to once per second and once per percent progress? That would help a lot. (this would also reduce the line flickering in my local terminal window)

@jfelchner

This comment has been minimized.

Copy link

commented Aug 20, 2013

@rmzelle one open feature request on fuubar is to expose the underlying progressbar options. Once I do that, you can set it to whatever you want in your RSpec configuration.

@rmzelle rmzelle referenced this pull request Aug 20, 2013

Closed

Travis Log TTY Issues #1337

@inukshuk

This comment has been minimized.

Copy link
Member

commented Aug 20, 2013

Here is a better link:

https://travis-ci.org/inukshuk/styles/builds/10411645

Fuubar seems to have worked on travis?

@rmzelle

This comment has been minimized.

Copy link
Member

commented Aug 20, 2013

@inukshuk, we're also back to using fuubar for the official CSL styles repo. The reason fuubar currently works is "We added throttling to ruby-progressbar so it only updates every 1/100th of a second so that's why you're no longer seeing every progress update." (see #489 (comment) above). The log of your build is still pretty big, though: https://s3.amazonaws.com/archive.travis-ci.org/jobs/10411646/log.txt

@inukshuk

This comment has been minimized.

Copy link
Member

commented Aug 20, 2013

Ah, sorry for not paying attention.

Anyway, I also added a switch to the Rakefile in case you want to pass different options on Travis in the future. See here: https://github.com/citation-style-language/styles/blob/master/Rakefile#L14

@jfelchner

This comment has been minimized.

Copy link

commented Dec 15, 2013

Hey all, I know it's been a while, but I think that all the work we discussed has been completed now.

Assuming the TravisCI folks have added the CONTINUOUS_INTEGRATION environment variable, the bar will remove all colors (even if the --color RSpec flag is passed) and will only output the bar once per second.

That's the best I can do right now, but I am eventually planning on adding a force_no_tty option to ruby-progressbar which will let me use the new non-TTY format when CONTINUOUS_INTEGRATION is set. Once this happens, the only duplicate bars which will be shown will be if other output is logged (like a failure).

For reference on the CONTINUOUS_INTEGRATION variable, see the TravisCI issue

@rmzelle

This comment has been minimized.

Copy link
Member

commented Dec 16, 2013

I updated my bundle, but now I get a few warnings from RSpec. @inukshuk, do you have some time to troubleshoot this before I push the updated Gemfile to GitHub?

rintze-zelles-macbook:styles rintzezelle$ bundle exec rake
/usr/local/Cellar/ruby/2.0.0-p0/bin/ruby -S rspec ./spec/dependent_styles_spec.rb ./spec/independent_styles_spec.rb ./spec/repository_spec.rb --require spec_helper.rb --format Fuubar --color

Loading dependent styles.................................................
Loading independent styles........
 115707/115707 |==================== 100 ====================>| Time: 00:03:54 

Finished in 3 minutes 54.3 seconds
115707 examples, 0 failures

rintze-zelles-macbook:styles rintzezelle$ bundle update
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.1.0) 
Installing namae (0.8.0) 
Using csl (1.0.2) 
Installing diff-lcs (1.2.5) 
Installing rspec-core (2.14.7) 
Installing rspec-expectations (2.14.4) 
Installing rspec-mocks (2.14.4) 
Using rspec (2.14.1) 
Installing ruby-progressbar (1.3.2) 
Installing fuubar (1.3.0) 
Installing mini_portile (0.5.2) 
Installing nokogiri (1.6.1) 
Using bundler (1.3.4) 
Your bundle is updated!

rintze-zelles-macbook:styles rintzezelle$ bundle exec rake
/usr/local/Cellar/ruby/2.0.0-p0/bin/ruby -S rspec ./spec/dependent_styles_spec.rb ./spec/independent_styles_spec.rb ./spec/repository_spec.rb --require spec_helper.rb --format Fuubar --color

Loading dependent styles.................................................
Loading independent styles........
/usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:901: warning: already initialized constant RSpec::Core::Configuration::DEFAULT_FORMATTER
/usr/local/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:901: warning: previous definition of DEFAULT_FORMATTER was here
/usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:938: warning: already initialized constant RSpec::Core::Configuration::DEFAULT_ORDERING
/usr/local/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:938: warning: previous definition of DEFAULT_ORDERING was here
/usr/local/Cellar/ruby/2.0.0-p0/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:941: warning: already initialized constant RSpec::Core::Configuration::RANDOM_ORDERING
/usr/local/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:941: warning: previous definition of RANDOM_ORDERING was here
 115707/115707 |==================== 100 ====================>| Time: 00:04:16 

Finished in 4 minutes 16.2 seconds
115707 examples, 0 failures
rintze-zelles-macbook:styles rintzezelle$ 
@jfelchner

This comment has been minimized.

Copy link

commented Dec 16, 2013

Guys, I just realized this may be a bug introduced in the latest fuubar. Give me a second to push a fix.

@jfelchner

This comment has been minimized.

Copy link

commented Dec 16, 2013

Ok all, I just pushed v1.3.1 of fuubar. Lemme know if that fixes your problem (or introduces new ones 😄)

@rmzelle

This comment has been minimized.

Copy link
Member

commented Dec 16, 2013

Thanks, that cleared things up!

@jfelchner

This comment has been minimized.

Copy link

commented Dec 16, 2013

@rmzelle perfect. Let me know if that helps. If Travis hasn't set the env variable automatically yet, I think there's capability in the YAML file to set environment variables there.

If you set CONTINUOUS_INTEGRATION to anything (except false), it should trigger the new colorless throttling.

@rmzelle

This comment has been minimized.

Copy link
Member

commented Dec 16, 2013

The log of the latest build is still pretty verbose, so my guess is that the variable isn't set. See

https://travis-ci.org/citation-style-language/styles/builds/15547670
and
https://s3.amazonaws.com/archive.travis-ci.org/jobs/15547671/log.txt

I'll try the YAML thing.

@jfelchner

This comment has been minimized.

Copy link

commented Dec 16, 2013

@rmzelle the fact that the color codes are still being output means that it is definitely not being set.

@jfelchner

This comment has been minimized.

@jfelchner

This comment has been minimized.

Copy link

commented Dec 16, 2013

@rmzelle can you gist your Gemfile for me? Someone else is having a similar issue that I'm trying to track down. Since fuubar is working for you, I'd like to see what the differences are.

@rmzelle

This comment has been minimized.

Copy link
Member

commented Dec 16, 2013

@rmzelle

This comment has been minimized.

Copy link
Member

commented Dec 16, 2013

And the .travis.yml file, which now sets the environment variable: 6d9c9c9

@jfelchner

This comment has been minimized.

Copy link

commented Dec 16, 2013

BOOM! 😀 Glad we could finally get this sorted for you all!!

@rmzelle

This comment has been minimized.

Copy link
Member

commented Dec 16, 2013

Thanks a lot! Early Christmas present :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.