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

Set NEXT_PGVERSION to 17 #17749

Merged
merged 2 commits into from
Feb 11, 2025
Merged

Set NEXT_PGVERSION to 17 #17749

merged 2 commits into from
Feb 11, 2025

Conversation

oliverguenther
Copy link
Member

@oliverguenther oliverguenther commented Jan 28, 2025

@oliverguenther oliverguenther requested a review from a team January 28, 2025 13:47
Copy link
Member

@crohr crohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is fine, however the server doesn't start due to a gem issue:

❯ docker run --rm -it -e PGVERSION=17 yoh
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
-----> Setting PGVERSION=17 PGBIN=/usr/lib/postgresql/17/bin PGCONF_FILE=/etc/postgresql/17/main/postgresql.conf
-----> Starting the all-in-one OpenProject setup at /app/docker/prod/supervisord...
-----> Database cluster not found. Creating a new one in /var/openproject/pgdata...
chown: warning: '.' should be ':': ‘postgres.postgres’
       The files belonging to this database system will be owned by user "postgres".
       This user must also own the server process.
       
       The database cluster will be initialized with locale "C.UTF-8".
       The default text search configuration will be set to "english".
       
       Data page checksums are disabled.
       
       fixing permissions on existing directory /var/openproject/pgdata ... ok
       creating subdirectories ... ok
       selecting dynamic shared memory implementation ... posix
       selecting default "max_connections" ... 100
       selecting default "shared_buffers" ... 128MB
       selecting default time zone ... Etc/UTC
       creating configuration files ... ok
       running bootstrap script ... ok
       performing post-bootstrap initialization ... ok
       syncing data to disk ... ok
       
       Success. You can now start the database server using:
       
           /usr/lib/postgresql/17/bin/pg_ctl -D /var/openproject/pgdata -l logfile start
       
       waiting for server to start.... done
       server started
       CREATE ROLE
       Trying to contact PostgreSQL server instance or waiting for it to come online.
       Starting memcached: memcached.
-----> Running migrations...
       bundler: failed to load command: rake (/app/vendor/bundle/ruby/3.4.0/bin/rake)
       /usr/local/lib/ruby/3.4.0/bundler/definition.rb:676:in 'Bundler::Definition#materialize': Could not find rb_sys-0.9.108, mini_portile2-2.8.8 in locally installed gems (Bundler::GemNotFound)
        from /usr/local/lib/ruby/3.4.0/bundler/definition.rb:232:in 'Bundler::Definition#specs'
        from /usr/local/lib/ruby/3.4.0/bundler/definition.rb:299:in 'Bundler::Definition#specs_for'
        from /usr/local/lib/ruby/3.4.0/bundler/runtime.rb:18:in 'Bundler::Runtime#setup'
        from /usr/local/lib/ruby/3.4.0/bundler.rb:167:in 'Bundler.setup'
        from /usr/local/lib/ruby/3.4.0/bundler/setup.rb:32:in 'block in <top (required)>'
        from /usr/local/lib/ruby/3.4.0/bundler/ui/shell.rb:173:in 'Bundler::UI::Shell#with_level'
        from /usr/local/lib/ruby/3.4.0/bundler/ui/shell.rb:119:in 'Bundler::UI::Shell#silence'
        from /usr/local/lib/ruby/3.4.0/bundler/setup.rb:32:in '<top (required)>'
        from /usr/local/lib/ruby/3.4.0/bundler/cli/exec.rb:57:in 'Kernel#require_relative'
        from /usr/local/lib/ruby/3.4.0/bundler/cli/exec.rb:57:in 'Bundler::CLI::Exec#kernel_load'
        from /usr/local/lib/ruby/3.4.0/bundler/cli/exec.rb:23:in 'Bundler::CLI::Exec#run'
        from /usr/local/lib/ruby/3.4.0/bundler/cli.rb:452:in 'Bundler::CLI#exec'
        from /usr/local/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/command.rb:28:in 'Bundler::Thor::Command#run'
        from /usr/local/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in 'Bundler::Thor::Invocation#invoke_command'
        from /usr/local/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor.rb:538:in 'Bundler::Thor.dispatch'
        from /usr/local/lib/ruby/3.4.0/bundler/cli.rb:35:in 'Bundler::CLI.dispatch'
        from /usr/local/lib/ruby/3.4.0/bundler/vendor/thor/lib/thor/base.rb:584:in 'Bundler::Thor::Base::ClassMethods#start'
        from /usr/local/lib/ruby/3.4.0/bundler/cli.rb:29:in 'Bundler::CLI.start'
        from /usr/local/lib/ruby/gems/3.4.0/gems/bundler-2.6.2/exe/bundle:28:in 'block in <top (required)>'
        from /usr/local/lib/ruby/3.4.0/bundler/friendly_errors.rb:117:in 'Bundler.with_friendly_errors'
        from /usr/local/lib/ruby/gems/3.4.0/gems/bundler-2.6.2/exe/bundle:20:in '<top (required)>'
        from /usr/local/bundle/bin/bundle:25:in 'Kernel#load'
        from /usr/local/bundle/bin/bundle:25:in '<main>'

Also wondering what happens to users that manually set PGVERSION to 15. Do we assume it is just a hidden feature for us and nobody manually sets it?

@crohr
Copy link
Member

crohr commented Feb 4, 2025

The bundle issue probably comes from one of these changes:

❯ git blame docker/prod/Dockerfile | grep 2025
f8bf0bdf1777 docker/prod/Dockerfile (ulferts           2025-01-18 17:12:19 +0100   1) ARG RUBY_VERSION="3.4.1"
55dbe2c73aa9 docker/prod/Dockerfile (Oliver Günther    2025-01-28 14:46:22 +0100  21) ENV NEXT_PGVERSION="17"
f932f06a0ff1 docker/prod/Dockerfile (Markus Kahl       2025-01-06 10:57:19 +0000  61) COPY ./docker/prod/setup/bundle-install.sh ./vendor/bundle* ./vendor/
f932f06a0ff1 docker/prod/Dockerfile (Markus Kahl       2025-01-06 10:57:19 +0000  62) RUN bash vendor/bundle-install.sh && rm vendor/bundle-install.sh

Possibly an issue with @machisuji changes?

@machisuji
Copy link
Member

f8bf0bd docker/prod/Dockerfile (ulferts 2025-01-18 17:12:19 +0100 1) ARG RUBY_VERSION="3.4.1"

I've reverted

f8bf0bdf1777 docker/prod/Dockerfile (ulferts           2025-01-18 17:12:19 +0100   1) ARG RUBY_VERSION="3.4.1"

and then everything works. For good measure I've also tried keeping the ruby 3.4.1 change and reverting my changes instead but it still fails. So the issue seems to lie with the ruby 3.4.1 upgrade somehow.

This will install the psql17 client, allowing is to upgrade on saas
@oliverguenther oliverguenther requested a review from a team February 11, 2025 09:00
@oliverguenther oliverguenther merged commit 67fb5e4 into dev Feb 11, 2025
16 of 18 checks passed
@oliverguenther oliverguenther deleted the chore/psql-next-17 branch February 11, 2025 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants