travis.rb: travis lint fails with intermittent "invalid access token" errors

Hi! I’ve an issue with the travis lint command.

I run it as a build step on Travis CI, and it sometimes fail with the following error:

$ echo "n" | travis lint -x
Shell completion not installed. Would you like to install it now? |y| invalid access token - try running travis login
The command "echo "n" | travis lint -x" exited with 1.

Most of the times, if I restart the build step/job, it succeeds, with no errors.

So, I think we actually have two issues:

  1. travis lint shouldn’t need any token.
  2. travis lint intermittently fails with this error.

Can you assist? Thanks!

Example build: https://travis-ci.com/github/ferrarimarco/kubernetes-playground/jobs/316452382

Gem installation output:

7.91s$ gem install travis --no-document
Fetching: multipart-post-2.1.1.gem (100%)
Successfully installed multipart-post-2.1.1
Fetching: faraday-0.17.3.gem (100%)
Successfully installed faraday-0.17.3
Fetching: faraday_middleware-0.14.0.gem (100%)
Successfully installed faraday_middleware-0.14.0
Fetching: highline-1.7.10.gem (100%)
Successfully installed highline-1.7.10
Fetching: backports-3.17.0.gem (100%)
Successfully installed backports-3.17.0
Fetching: concurrent-ruby-1.1.6.gem (100%)
Successfully installed concurrent-ruby-1.1.6
Fetching: i18n-1.8.2.gem (100%)
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Successfully installed i18n-1.8.2
Fetching: thread_safe-0.3.6.gem (100%)
Successfully installed thread_safe-0.3.6
Fetching: tzinfo-1.2.7.gem (100%)
Successfully installed tzinfo-1.2.7
Fetching: activesupport-5.2.4.2.gem (100%)
Successfully installed activesupport-5.2.4.2
Fetching: multi_json-1.14.1.gem (100%)
Successfully installed multi_json-1.14.1
Fetching: public_suffix-4.0.4.gem (100%)
Successfully installed public_suffix-4.0.4
Fetching: addressable-2.7.0.gem (100%)
Successfully installed addressable-2.7.0
Fetching: net-http-persistent-2.9.4.gem (100%)
Successfully installed net-http-persistent-2.9.4
Fetching: net-http-pipeline-1.0.1.gem (100%)
Successfully installed net-http-pipeline-1.0.1
Fetching: gh-0.16.0.gem (100%)
Successfully installed gh-0.16.0
Fetching: launchy-2.5.0.gem (100%)
Successfully installed launchy-2.5.0
Fetching: ffi-1.12.2.gem (100%)
Building native extensions. This could take a while...
Successfully installed ffi-1.12.2
Fetching: ethon-0.12.0.gem (100%)
Successfully installed ethon-0.12.0
Fetching: typhoeus-0.8.0.gem (100%)
Successfully installed typhoeus-0.8.0
Fetching: websocket-1.2.8.gem (100%)
Successfully installed websocket-1.2.8
Fetching: pusher-client-0.6.2.gem (100%)
Successfully installed pusher-client-0.6.2
Fetching: travis-1.8.13.gem (100%)
Successfully installed travis-1.8.13
23 gems installed

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 1
  • Comments: 22 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Is there any chance the endpoint is getting rate limited, based on how many times everyone is trying to run travis lint at one time?

@ljharb It does not do that at the moment. Whether it should is a valid (but separate) UX question. To be honest, I’d never thought it should, until you raised it.

@ferrarimarco I assume you mean travis lint, not travis validate. travis lint works by talking to the API end point POST /lint with required payload. As we have seen, this behavior seems to be a little unreliable. I’ll dig a little deeper.