thekompanee / fuubar

The instafailing RSpec progress bar formatter
http://jeffkreeftmeijer.com/2010/fuubar-the-instafailing-rspec-progress-bar-formatter/
MIT License
955 stars 65 forks source link

Strange Fuubar line in Travis-CI build reports #97

Closed rmzelle closed 7 years ago

rmzelle commented 7 years ago

Hi, I'm not sure if this is an issue with how Travis-CI processes their raw logs, or an issue with Fuubar, but I noticed that our build pages show a rather awkward line for the Fuubar progress bar.

138727/138784 |==================== 99 =====================> | ETA: 00:00:00 138784/138784 |==================== 100 =====================>| Time: 00:01:00 https://travis-ci.org/citation-style-language/styles/builds/199495218#L205 (ruby 2.4.0)

I would expect this to look like 138784/138784 |==================== 100 =====================>| Time: 00:01:00 like it does after tests complete locally.

Any idea what could be going on? I just noticed it, but apparently we've had this going on for several years with different ruby versions. See also:

123631/123769 |==================== 99 =====================> | ETA: 00:00:00 123769/123769 |==================== 100 =====================>| Time: 00:04:19 https://travis-ci.org/citation-style-language/styles/builds/38622374#L116 (ruby 1.9.3)

129059/129178 |==================== 99 =====================> | ETA: 00:00:00 129178/129178 |==================== 100 =====================>| Time: 00:01:07 https://travis-ci.org/citation-style-language/styles/builds/57387823#L126 (ruby 2.2.0)

rmzelle commented 7 years ago

I just noticed it, but apparently we've had this going on for several years with different ruby versions.

(alternative, if it's a Travis CI issue, maybe it's a new issue that also affects older build pages)

I also find it very curious that https://api.travis-ci.org/jobs/199495219/log.txt?deansi=true, the raw log belonging to https://travis-ci.org/citation-style-language/styles/builds/199495218#L205, doesn't even contain the 138727/138784 |==================== 99 =====================> | ETA: 00:00:00 string.

jfelchner commented 7 years ago

This has nothing to do with fuubar and everything to do with how Travis interprets ANSI codes and carriage returns and shows them to the user.

If you want fuubar to show a stripped down bar that doesn't use carriage returns you can set the CONTINUOUS_INTEGRATION environment variable to true in your builds.

rmzelle commented 7 years ago

If you want fuubar to show a stripped down bar that doesn't use carriage returns you can set the CONTINUOUS_INTEGRATION environment variable to true in your builds.

Oh, but it was my impression that Travis was already supplying this environmental variable by default nowadays (see our 2014 discussion on this topic at https://github.com/travis-ci/travis-ci/issues/1337#issuecomment-41580936).

rmzelle commented 7 years ago

And this is a rather old example, but I'm seeing the same issue for a build from back when we were still manually setting the CONTINUOUS_INTEGRATION variable to "true" in 2014 ($ export CONTINUOUS_INTEGRATION=true, https://travis-ci.org/citation-style-language/styles/builds/23634732#L3). See https://travis-ci.org/citation-style-language/styles/builds/23634732#L59:

117252/117329 |==================== 99 =====================> | ETA: 00:00:00 117329/117329 |==================== 100 =====================>| Time: 00:03:58

rmzelle commented 7 years ago

And see https://github.com/travis-ci/travis-cookbooks/pull/253 for the PR where the CONTINUOUS_INTEGRATION environment variable was set by default in Travis. It's still there in https://github.com/travis-ci/travis-cookbooks/blob/master/cookbooks/travis_build_environment/templates/default/etc/environment.sh.erb#L10.

jfelchner commented 7 years ago

@rmzelle it should be but I didn't know if they'd changed it.

jfelchner commented 7 years ago

Basically it's a Travis issue. They try to do fancy stuff to give the users a good experience and sometimes it breaks.

jfelchner commented 7 years ago

If I were you, I would potentially look at this:

image

Why are there spaces before your bar?

github-actions[bot] commented 3 years ago

This issue has been closed automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.