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

Draft: discourse 3.1.0 backport to nixos-23.05 #262450

Closed
wants to merge 9 commits into from

Conversation

pdg137
Copy link
Contributor

@pdg137 pdg137 commented Oct 21, 2023

I'm trying to apply #250735 or #257294 to nixos-23.05 and keep running into this "Failed to open TCP connection to github.com:443" error when I run the tests:

_64-linux/3.2.0/sass-embedded-1.64.1/gem_make.out
current directory: /nix/store/am8avzjcmcd871rzmz5z44f86vvnn9c1-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/gems/sass-embedded-1.64.1/ext/sass
/nix/store/vh5zmcaji4pihr08sqb6z4zznshl2l3g-ruby-3.2.2/bin/ruby -rrubygems /nix/store/kd8ar4rzh880afhfc1zqd82g4iqxc9jd-ruby3.2.2-rake-13.0.6/lib/ruby/gems/3.2.0/gems/rake-13.0.6/exe/rake RUBYARCHDIR\=/nix/store/am8avzjcmcd871rzmz5z44f86vvnn9c1-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0/sass-embedded-1.64.1 RUBYLIBDIR\=/nix/store/am8avzjcmcd871rzmz5z44f86vvnn9c1-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0/sass-embedded-1.64.1
gem install --force --install-dir /nix/store/am8avzjcmcd871rzmz5z44f86vvnn9c1-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/gems/sass-embedded-1.64.1/ext/sass/ruby --no-document --ignore-dependencies --platform x86_64-linux-gnu --version 1.64.1 sass-embedded
fetch https://github.com/sass/dart-sass/releases/download/1.64.1/dart-sass-1.64.1-linux-x64.tar.gz
rake aborted!
SocketError: Failed to open TCP connection to github.com:443 (getaddrinfo: Temporary failure in name resolution)
/nix/store/am8avzjcmcd871rzmz5z44f86vvnn9c1-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/gems/sass-embedded-1.64.1/ext/sass/Rakefile:176:in `public_send'
/nix/store/am8avzjcmcd871rzmz5z44f86vvnn9c1-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/gems/sass-embedded-1.64.1/ext/sass/Rakefile:176:in `fetch'
/nix/store/am8avzjcmcd871rzmz5z44f86vvnn9c1-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/gems/sass-embedded-1.64.1/ext/sass/Rakefile:27:in `rescue in block in <top (required)>'
/nix/store/am8avzjcmcd871rzmz5z44f86vvnn9c1-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/gems/sass-embedded-1.64.1/ext/sass/Rakefile:21:in `block in <top (required)>'
/nix/store/kd8ar4rzh880afhfc1zqd82g4iqxc9jd-ruby3.2.2-rake-13.0.6/lib/ruby/gems/3.2.0/gems/rake-13.0.6/exe/rake:27:in `<main>'

Caused by:

/nix/store/am8avzjcmcd871rzmz5z44f86vvnn9c1-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/gems/sass-embedded-1.64.1/ext/sass/Rakefile:207:in `gem_install'
/nix/store/am8avzjcmcd871rzmz5z44f86vvnn9c1-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/gems/sass-embedded-1.64.1/ext/sass/Rakefile:23:in `block in <top (required)>'
/nix/store/kd8ar4rzh880afhfc1zqd82g4iqxc9jd-ruby3.2.2-rake-13.0.6/lib/ruby/gems/3.2.0/gems/rake-13.0.6/exe/rake:27:in `<main>'
Tasks: TOP => default => install => cli.rb => dart-sass
(See full trace by running task with --trace)
rm -rf /nix/store/am8avzjcmcd871rzmz5z44f86vvnn9c1-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/gems/sass-embedded-1.64.1/ext/sass/ruby

rake failed, exit code 1

I think that's related to removing the sass-embedded patch in 8e8a6ed. But I don't understand it or know what to do to get it to work. @TheNeikos @MTRNord do you have any suggestions?

The update.py script would error out if the spec had a trailing new
line. The split that follows it would try to split it into two, and
error out as it can't.
This was fixed globally in NixOS#240000 and thus is not needed here anymore.

# Conflicts:
#	pkgs/servers/web-apps/discourse/default.nix
Suggested-by: talyz <kim.lindberger@gmail.com>

# Conflicts:
#	pkgs/servers/web-apps/discourse/default.nix
@github-actions github-actions bot added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Oct 21, 2023
@TheNeikos
Copy link
Contributor

I think #240000 also needs to be applied?

@pdg137
Copy link
Contributor Author

pdg137 commented Oct 22, 2023

Thanks @TheNeikos, I applied those commits and I think that gets me further.

However now the tests freeze on the "building discourse-assets-3.1.0" step like this:

$ nix build -v -f. nixosTests.discourse
...
building '/nix/store/yny7adpfvnhv9j5a5f7cfap7qasvx6g0-discourse-assets-3.1.0.drv'...
[1/252/277 built, 260 copied (960.5/961.9 MiB), 259.5 MiB DL] building discourse-assets-3.1.0 (buildPhase):     from /nix/store/x2v29wk5sdpsrn0vcna09rq30v0kijsz-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/gems/sass-embedded-1.64.1/lib/sass/embedded/dispatcher.rb:18:in `block in initialize'

Is this another obvious problem, or is there a way to get more debugging output from these commands?

@TheNeikos
Copy link
Contributor

Thanks @TheNeikos, I applied those commits and I think that gets me further.

However now the tests freeze on the "building discourse-assets-3.1.0" step like this:

$ nix build -v -f. nixosTests.discourse
...
building '/nix/store/yny7adpfvnhv9j5a5f7cfap7qasvx6g0-discourse-assets-3.1.0.drv'...
[1/252/277 built, 260 copied (960.5/961.9 MiB), 259.5 MiB DL] building discourse-assets-3.1.0 (buildPhase):     from /nix/store/x2v29wk5sdpsrn0vcna09rq30v0kijsz-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/gems/sass-embedded-1.64.1/lib/sass/embedded/dispatcher.rb:18:in `block in initialize'

Is this another obvious problem, or is there a way to get more debugging output from these commands?

You could try running with -L, that should output the log as it’s coming in. And otherwise, you’d have to read what the code does at the position it reports…

@pdg137
Copy link
Contributor Author

pdg137 commented Oct 22, 2023

The -L gives more info, still not sure what it means since there are various errors and yet it keeps running:

$ nix build -L -v -f. nixosTests.discourse
...
discourse-assets> app/assets/javascripts/node_modules/js-yaml/bin/js-yaml.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/8w46c2hf7hclc5p3adyi85bm67gpikqf-nodejs-18.17.1/bin/node"
discourse-assets> Waiting for Redis and PostgreSQL to be ready..
discourse-assets> psql: error: connection to server on socket "/build/.s.PGSQL.5432" failed: No such file or directory
discourse-assets>       Is the server running locally and accepting connections on that socket?
discourse-assets> 2023-10-22 18:07:42.194 UTC [634] LOG:  starting PostgreSQL 14.9 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 12.2.0, 64-bit
discourse-assets> 2023-10-22 18:07:42.195 UTC [634] LOG:  listening on IPv4 address "127.0.0.1", port 5432
discourse-assets> 2023-10-22 18:07:42.200 UTC [634] LOG:  listening on Unix socket "/build/.s.PGSQL.5432"
discourse-assets> 2023-10-22 18:07:42.205 UTC [638] LOG:  database system was shut down at 2023-10-22 18:07:42 UTC
discourse-assets> 2023-10-22 18:07:42.210 UTC [634] LOG:  database system is ready to accept connections
discourse-assets> CREATE ROLE
discourse-assets> CREATE DATABASE
discourse-assets> CREATE EXTENSION
discourse-assets> CREATE EXTENSION
discourse-assets> fatal: not a git repository (or any of the parent directories): .git
discourse-assets> > Seeding theme and color schemes
discourse-assets> #<Thread:0x00007fffea44b000 /nix/store/x2v29wk5sdpsrn0vcna09rq30v0kijsz-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/gems/sass-embedded-1.64.1/lib/sass/embedded/dispatcher.rb:17 run> terminated with exception (report_on_exception is true):
discourse-assets> /nix/store/x2v29wk5sdpsrn0vcna09rq30v0kijsz-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/gems/sass-embedded-1.64.1/lib/sass/embedded/dispatcher.rb:79:in `receive_proto': undefined method `receive_proto' for nil:NilClass (NoMethodError)
discourse-assets>           @mutex.synchronize { @observers[id] }.receive_proto(proto)
discourse-assets>                                                ^^^^^^^^^^^^^^
discourse-assets>       from /nix/store/x2v29wk5sdpsrn0vcna09rq30v0kijsz-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/gems/sass-embedded-1.64.1/lib/sass/embedded/dispatcher.rb:19:in `block (2 levels) in initialize'
discourse-assets>       from /nix/store/x2v29wk5sdpsrn0vcna09rq30v0kijsz-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/gems/sass-embedded-1.64.1/lib/sass/embedded/dispatcher.rb:18:in `loop'
discourse-assets>       from /nix/store/x2v29wk5sdpsrn0vcna09rq30v0kijsz-ruby3.2.2-sass-embedded-1.64.1/lib/ruby/gems/3.2.0/gems/sass-embedded-1.64.1/lib/sass/embedded/dispatcher.rb:18:in `block in initialize'
[1/0/25 built] building discourse-assets-3.1.0 (buildPhase)

@pdg137
Copy link
Contributor Author

pdg137 commented Oct 23, 2023

I'm giving up on this for now but will leave this up in case anyone else wants to try to pick it up from here.

@wegank
Copy link
Member

wegank commented Jan 3, 2024

Closing since NixOS 23.05 is EOL.

@wegank wegank closed this Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: ruby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants