w3c / wai-website

This repository hosts the WAI Website.
https://www.w3.org/WAI/
Other
46 stars 157 forks source link

Dependency hell breaking Netlify builds #327

Closed SteveALee closed 1 year ago

SteveALee commented 1 year ago

This problem just surfaced in wai-course-list but will eventually effect ALL preview builds on netlify and possibly release builds

The latest version of Jekyll used in builds has changed from 4.2.1 to 4.3.1 this requires rouge 4.0.0. which requires ruby 2.7. We are pinned to ruby 2.6.2 in netlify builds and probably in GitHub action (need to check)

This is all horrid, and especially bad as all resource repos speciify the gem dependencies themselves. I did move the basic deps out to a shared gemfile which eases the problem somewhat as there is now a central place defining the dependencies.

The problem will arise whenever a bundle install or bundle update is run. This will update the the Gemfile.lock which fixes the versions. If the Gemfile.lock is commited the builds will break

I suspect the version of Jekyll is not fixed in the shared gemfile and could be fixed to 4.2.1 to temporarily avoid the issue. At least until we have to update Jekyll. (need to check)

For wai-courses i fixed the jekyll version in its Gemfile

-[ ] Chec kif github action use ruby 2.6.2 so is impacted -[ ] See if can fix Jekyll version in shared Gemfile as temp hack -[ ] See if can use Ruby 2.7. - need to update all netlify.toml files and github release action -[ ] roll back explicit version in wai-course-list

shawna-slh commented 1 year ago

:-(

SteveALee commented 1 year ago

According to the Jekyll 4.3.0 release notes we can specify older versions of the Rouge Gem so I can add that to the shared gemfile. We don't use rouge explicitly AFAIK.

SteveALee commented 1 year ago

There don't seem to be any breaking changes in [ruby 2.7.0]()https://github.com/ruby/ruby/blob/v2_7_0/NEWS) and I've been building using that locally for some time. This seems the best solution but will require a change to all netlify.toml

SteveALee commented 1 year ago

Fixed by specifying rouge 3.30.0 in shared gemfile

Tested in wai website preview, course list and github release