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

Tests aren't passing (except in an old, end-of-life Ubuntu release under Travis CI) #601

Closed
DeeDeeG opened this issue Oct 22, 2019 · 4 comments · Fixed by #606
Closed

Tests aren't passing (except in an old, end-of-life Ubuntu release under Travis CI) #601

DeeDeeG opened this issue Oct 22, 2019 · 4 comments · Fixed by #606

Comments

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Oct 22, 2019

Problem

Tests are failing anywhere but Travis CI's old Ubuntu 14.04 "Trusty" base image.

See this recent test run for an example: https://travis-ci.com/RefugeRestrooms/refugerestrooms/builds/130835299#L956-L981

Full error (click, or give keyboard focus and press enter, to expand)
An error occurred while loading ./spec/api/v1/restrooms_spec.rb.

Failure/Error: config.include Locations

NameError:

  uninitialized constant Locations

# /usr/local/bundle/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/active_support.rb:79:in `block in load_missing_constant'
# /usr/local/bundle/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/active_support.rb:8:in `without_bootsnap_cache'
# /usr/local/bundle/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/active_support.rb:79:in `rescue in load_missing_constant'
# /usr/local/bundle/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/active_support.rb:58:in `load_missing_constant'
# ./spec/support/rspec.rb:19:in `block in <top (required)>'
# ./spec/support/rspec.rb:18:in `<top (required)>'
# /usr/local/bundle/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
# /usr/local/bundle/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
# /usr/local/bundle/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
# /usr/local/bundle/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
# /usr/local/bundle/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
# ./spec/spec_helper.rb:17:in `block in <top (required)>'
# ./spec/spec_helper.rb:17:in `each'
# ./spec/spec_helper.rb:17:in `<top (required)>'
# ./spec/api/v1/restrooms_spec.rb:1:in `require'
# ./spec/api/v1/restrooms_spec.rb:1:in `<top (required)>'
# ------------------
# --- Caused by: ---
# NameError:
#   uninitialized constant Locations
#   /usr/local/bundle/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/active_support.rb:60:in `block in load_missing_constant'
.

There are eight of these errors, one for each inclusion of Locations (which I believe is intended to be a "module" in Ruby terminology).

Scope / difficulty

Looks to me like a Ruby syntax error. Anyone knowledgeable about re-using code from one file to another in Ruby should be able to fix this, at least in theory.

Impact

Allows us to keep running our CI tests, but on a new Travis CI base image (Ubuntu 16.04 "Xenial" or newer).

Might also make running tests locally work. As far as I know, the tests don't pass anywhere but Travis CI's Ubuntu 14.04 "Trusty" environment. I would love to be able to run these tests natively on my local machine, or locally in a Docker container.

The current image, Ubuntu 14.04 "Trusty," is already in its end-of-life period. It is no longer supported. Travis CI is likely to keep supporting it for a while, due to how many projects are probably still using it. In theory, though, they could decide to stop offering Trusty CI runs at any time if they wanted to.

Fixing this adds certainty that we can keep testing on Travis CI.

Proposal

Change the code for our tests to make them pass everywhere, not just in this older Travis CI test environment.

How to actually do this:

Probably research the proper way to include modules, and edit the Ruby code in the spec/ directory of this project.

@DeeDeeG

This comment has been minimized.

@DeeDeeG
Copy link
Contributor Author

DeeDeeG commented Oct 25, 2019

Setting Travis CI's dist setting to bionic doesn't work either.

@stardust66
Copy link
Contributor

stardust66 commented Oct 29, 2019

I'm looking into this. Going to make a pull request to run tests with Travis, because for some reason that error doesn't pop up in Docker on my machine.

Edit:
Never mind it's failing on my machine as well.

@DeeDeeG
Copy link
Contributor Author

DeeDeeG commented Oct 30, 2019

Thank you @stardust66!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants