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

Dealing with a corrupted cache #397

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

mishina2228
Copy link
Contributor

This PR attempts to fix failing CI with Ruby 2.5.
refs: #391

ruby/setup-ruby provides the function to cache bundle install, but sometimes this cache seems to corrupt.
https://github.com/ruby/setup-ruby#dealing-with-a-corrupted-cache

In some rare scenarios (like using gems with C extensions whose functionality depends on libraries found on the system at the time of the gem's build) it may be necessary to ignore contents of the cache and get and build all the gems anew. In order to achieve this, set the cache-version option to any value other than 0 (or change it to a new unique value if you have already used it before.)

The most recent logs show that psych builds are failing, which is exactly the situation.
https://github.com/travisjeffery/timecop/actions/runs/3578996103/jobs/6019716355

...
  Fetching psych 4.0.6
  Using pry 0.14.1
  Fetching faraday 1.10.2
  --- ERROR REPORT TEMPLATE -------------------------------------------------------
  
  ```
  ArgumentError: wrong number of arguments (given 4, expected 1)
    /home/runner/work/timecop/timecop/vendor/bundle/ruby/2.5.0/gems/psych-4.0.4/lib/psych.rb:322:in `safe_load'
    /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/2.5.0/rubygems/safe_yaml.rb:31:in `safe_load'
    /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/2.5.0/rubygems/package.rb:496:in `block (2 levels) in read_checksums'
...

@mishina2228
Copy link
Contributor Author

@joshuacronemeyer Could you try to see if this works?

@mishina2228
Copy link
Contributor Author

Psych 5.0 has been released, but CI on Ruby 2.6+ now fails due to lack of libyaml-dev.

This issue has been discussed on the psych side,
but since psych is a dependent gem of jeweler, the problem should go away if jeweler is removed in #392.

@joshuacronemeyer joshuacronemeyer merged commit 38576b3 into travisjeffery:master Dec 12, 2022
@joshuacronemeyer
Copy link
Collaborator

thanks @mishina2228

@mishina2228 mishina2228 deleted the fix-ci-failure2 branch December 13, 2022 00:33
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 this pull request may close these issues.

None yet

2 participants