kevquirk / 512kb.club

Website for the 512 KB Club
https://512kb.club
MIT License
446 stars 617 forks source link

Builds are failing #1434

Closed kevquirk closed 8 months ago

kevquirk commented 8 months ago

Don't have time to troubleshoot this at the moment. Will look when I get time. Here's the Vercel build log:

[16:39:20.803] Running build in Washington, D.C., USA (East) – iad1
[16:39:22.166] Cloning github.com/kevquirk/512kb.club (Branch: main, Commit: 87a16c0)
[16:39:22.495] Cloning completed: 329.453ms
[16:39:24.568] Restored build cache
[16:39:24.642] Running "vercel build"
[16:39:25.125] Vercel CLI 33.5.1
[16:39:26.630] Installing dependencies...
[16:39:26.869] Bundler 2.5.5 is running, but your lockfile was generated with 2.2.22. Installing Bundler 2.2.22 and restarting using that version.
[16:39:27.845] Fetching gem metadata from https://rubygems.org/.
[16:39:27.853] Fetching bundler 2.2.22
[16:39:27.919] Installing bundler 2.2.22
[16:39:28.087] Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
[16:39:28.804] Fetching gem metadata from https://rubygems.org/
[16:39:29.534] Fetching gem metadata from https://rubygems.org/...........
[16:39:29.542] Fetching rake 13.1.0
[16:39:29.567] Installing rake 13.1.0
[16:39:29.598] Using bundler 2.2.22
[16:39:29.599] Fetching public_suffix 5.0.4
[16:39:29.600] Fetching colorator 1.1.0
[16:39:29.600] Fetching concurrent-ruby 1.2.3
[16:39:29.619] Fetching eventmachine 1.2.7
[16:39:29.634] Installing colorator 1.1.0
[16:39:29.655] Installing public_suffix 5.0.4
[16:39:29.661] Fetching http_parser.rb 0.8.0
[16:39:29.693] Installing eventmachine 1.2.7 with native extensions
[16:39:29.699] Fetching ffi 1.16.3
[16:39:29.711] Installing concurrent-ruby 1.2.3
[16:39:29.718] Installing http_parser.rb 0.8.0 with native extensions
[16:39:29.899] Installing ffi 1.16.3 with native extensions
[16:39:29.940] Fetching forwardable-extended 2.6.0
[16:39:29.973] Installing forwardable-extended 2.6.0
[16:39:30.051] Fetching google-protobuf 3.25.1
[16:39:30.180] Installing google-protobuf 3.25.1 with native extensions
[16:39:31.741] Fetching rb-fsevent 0.11.2
[16:39:31.763] Installing rb-fsevent 0.11.2
[16:39:31.780] Fetching rexml 3.2.6
[16:39:31.812] Installing rexml 3.2.6
[16:39:31.844] Fetching liquid 4.0.4
[16:39:31.870] Installing liquid 4.0.4
[16:39:31.907] Fetching mercenary 0.4.0
[16:39:31.930] Installing mercenary 0.4.0
[16:39:31.945] Fetching rouge 4.2.0
[16:39:31.999] Installing rouge 4.2.0
[16:39:32.179] Fetching safe_yaml 1.0.5
[16:39:32.215] Installing safe_yaml 1.0.5
[16:39:32.243] Fetching unicode-display_width 2.5.0
[16:39:32.276] Installing unicode-display_width 2.5.0
[16:39:32.284] Fetching webrick 1.8.1
[16:39:32.309] Installing webrick 1.8.1
[16:39:32.329] Fetching addressable 2.8.6
[16:39:32.374] Installing addressable 2.8.6
[16:39:32.407] Fetching i18n 1.14.1
[16:39:32.570] Installing i18n 1.14.1
[16:39:32.602] Fetching tzinfo 2.0.6
[16:39:32.639] Installing tzinfo 2.0.6
[16:39:32.698] Fetching pathutil 0.16.2
[16:39:32.721] Installing pathutil 0.16.2
[16:39:32.732] Fetching kramdown 2.4.0
[16:39:32.780] Installing kramdown 2.4.0
[16:39:32.953] Fetching terminal-table 3.0.2
[16:39:33.021] Installing terminal-table 3.0.2
[16:39:33.039] Fetching tzinfo-data 1.2024.1
[16:39:33.081] Installing tzinfo-data 1.2024.1
[16:39:33.274] Fetching kramdown-parser-gfm 1.1.0
[16:39:33.298] Installing kramdown-parser-gfm 1.1.0
[16:39:39.710] Fetching rb-inotify 0.10.1
[16:39:39.733] Installing rb-inotify 0.10.1
[16:39:39.744] Fetching listen 3.8.0
[16:39:39.767] Installing listen 3.8.0
[16:39:39.785] Fetching jekyll-watch 2.2.1
[16:39:39.803] Installing jekyll-watch 2.2.1
[16:39:40.528] Fetching sass-embedded 1.69.6
[16:39:40.552] Installing sass-embedded 1.69.6 with native extensions
[16:39:42.385] Fetching em-websocket 0.5.3
[16:39:42.407] Installing em-websocket 0.5.3
[16:39:43.811] Fetching jekyll-sass-converter 3.0.0
[16:39:43.826] Installing jekyll-sass-converter 3.0.0
[16:39:43.832] Fetching jekyll 4.3.3
[16:39:43.879] Installing jekyll 4.3.3
[16:39:43.971] Fetching jekyll-seo-tag 2.8.0
[16:39:43.971] Fetching jekyll-sitemap 1.4.0
[16:39:43.998] Installing jekyll-seo-tag 2.8.0
[16:39:43.998] Installing jekyll-sitemap 1.4.0
[16:39:44.035] Bundle complete! 5 Gemfile dependencies, 35 gems now installed.
[16:39:44.035] Bundled gems are installed into `./vendor/bundle`
[16:39:44.499] Configuration file: /vercel/path0/_config.yml
[16:39:44.545]             Source: /vercel/path0
[16:39:44.545]        Destination: /vercel/path0/_site
[16:39:44.545]  Incremental build: disabled. Enable with --incremental
[16:39:44.545]       Generating... 
[16:39:44.619]                     ------------------------------------------------
[16:39:44.619]       Jekyll 4.3.3   Please append `--trace` to the `build` command 
[16:39:44.619]                      for any additional information or backtrace. 
[16:39:44.619]                     ------------------------------------------------
[16:39:44.619] /ruby32/lib/ruby/3.2.0/psych/class_loader.rb:99:in `find': Tried to load unspecified class: Date (Psych::DisallowedClass)
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/class_loader.rb:28:in `load'
[16:39:44.620]  from (eval):2:in `date'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/scalar_scanner.rb:66:in `tokenize'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:65:in `deserialize'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:130:in `visit_Psych_Nodes_Scalar'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/visitors/visitor.rb:30:in `visit'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/visitors/visitor.rb:6:in `accept'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:35:in `accept'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:347:in `block in revive_hash'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:345:in `each'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:345:in `each_slice'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:345:in `revive_hash'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:169:in `visit_Psych_Nodes_Mapping'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/visitors/visitor.rb:30:in `visit'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/visitors/visitor.rb:6:in `accept'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:35:in `accept'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:340:in `block in register_empty'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:340:in `each'
[16:39:44.620]  from /ruby32/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:340:in `register_empty'
[16:39:44.621]  from /ruby32/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:148:in `visit_Psych_Nodes_Sequence'
[16:39:44.621]  from /ruby32/lib/ruby/3.2.0/psych/visitors/visitor.rb:30:in `visit'
[16:39:44.621]  from /ruby32/lib/ruby/3.2.0/psych/visitors/visitor.rb:6:in `accept'
[16:39:44.621]  from /ruby32/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:35:in `accept'
[16:39:44.621]  from /ruby32/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:320:in `visit_Psych_Nodes_Document'
[16:39:44.621]  from /ruby32/lib/ruby/3.2.0/psych/visitors/visitor.rb:30:in `visit'
[16:39:44.621]  from /ruby32/lib/ruby/3.2.0/psych/visitors/visitor.rb:6:in `accept'
[16:39:44.621]  from /ruby32/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:35:in `accept'
[16:39:44.621]  from /ruby32/lib/ruby/3.2.0/psych.rb:334:in `safe_load'
[16:39:44.621]  from /ruby32/lib/ruby/3.2.0/psych.rb:369:in `load'
[16:39:44.621]  from /ruby32/lib/ruby/3.2.0/psych.rb:671:in `block in load_file'
[16:39:44.621]  from /ruby32/lib/ruby/3.2.0/psych.rb:670:in `open'
[16:39:44.621]  from /ruby32/lib/ruby/3.2.0/psych.rb:670:in `load_file'
[16:39:44.621]  from /vercel/path0/_plugins/rss_feed.rb:10:in `generate'
[16:39:44.621]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.3/lib/jekyll/site.rb:193:in `block in generate'
[16:39:44.621]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.3/lib/jekyll/site.rb:191:in `each'
[16:39:44.621]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.3/lib/jekyll/site.rb:191:in `generate'
[16:39:44.621]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.3/lib/jekyll/site.rb:79:in `process'
[16:39:44.621]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.3/lib/jekyll/command.rb:28:in `process_site'
[16:39:44.621]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.3/lib/jekyll/commands/build.rb:65:in `build'
[16:39:44.621]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.3/lib/jekyll/commands/build.rb:36:in `process'
[16:39:44.622]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.3/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
[16:39:44.622]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.3/lib/jekyll/command.rb:91:in `each'
[16:39:44.622]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.3/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
[16:39:44.622]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.3/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
[16:39:44.622]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
[16:39:44.622]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
[16:39:44.622]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
[16:39:44.622]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
[16:39:44.622]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
[16:39:44.622]  from /vercel/path0/vendor/bundle/ruby/3.2.0/gems/jekyll-4.3.3/exe/jekyll:15:in `<top (required)>'
[16:39:44.622]  from /vercel/path0/vendor/bin/jekyll:29:in `load'
[16:39:44.622]  from /vercel/path0/vendor/bin/jekyll:29:in `<main>'
[16:39:44.627] Error: Command "jekyll build" exited with 1
[16:39:44.932] 
garritfra commented 8 months ago

Observation: Could be linked to this Dependabot PR I recently merged: https://github.com/kevquirk/512kb.club/pull/1420

Some people claim that this error surfaced after a ruby update. The release notes in that PR say something about a bump of the ruby version. I'll try to somehow revert it on my phone to see if that fixes it.

garritfra commented 8 months ago

Nope, no luck. 😕 CI is still failing on that revert PR.

kevquirk commented 8 months ago

Yeah, I bumped ruby to 3.1.3 locally to see if I could get builds working, but it's still failing. I haven't had time to investigate further.

zwbetz-gh commented 8 months ago

This was an interesting one to track down 😅 .

First, I was able to reproduce it locally with this Dockerfile:

FROM ruby:3.3.0-bookworm
WORKDIR /usr/src/app
COPY Gemfile Gemfile.lock ./
RUN bundle update --bundler
RUN bundle install
COPY . .
RUN ruby --version \
  && bundle --version \
  && jekyll --version
EXPOSE 4000
CMD [ "bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0" ]
# To hit local server, go to http://127.0.0.1:4000/

And these shell commands:

docker build \
--progress plain \
-t "512kb-club" \
.

docker run \
--rm \
-p "4000:4000" \
--name "512kb-club" \
"512kb-club"

After some googling, this stack overflow answer was the only hint I found.

I searched the codebase for YAML.load_file and turns out that _plugins/rss_feed.rb was using it.

The fix was to change this line:

https://github.com/kevquirk/512kb.club/blob/bfcc66410a04089b0434f30f3e6edb2828e9230d/_plugins/rss_feed.rb#L10

To be:

websites = YAML.load_file(
  File.join(site.source, '_data', 'sites.yml'),
  permitted_classes: [Date]
)
garritfra commented 8 months ago

Wow! Thanks for hunting this one down. Do you have a minute to open a PR? I'm currently at the airport without a proper computing device. 😅

Otherwise I (or @kevquirk?) can do it later. Thanks again @zwbetz-gh!

kevquirk commented 8 months ago

That worked a treat. Thanks @zwbetz-gh 🎉

zwbetz-gh commented 8 months ago

Nice! Thank y'all for this cool project 👍