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

[bitnami/discourse] Cannot upgrade from bitnami/discourse:3.3.3 or 3.4.1 to bitnami/discourse:3.4.2 #79434

Open
danieldietsch opened this issue Apr 4, 2025 · 3 comments
Assignees
Labels
discourse in-progress tech-issues The user has a technical issue about an application

Comments

@danieldietsch
Copy link

danieldietsch commented Apr 4, 2025

Name and Version

bitnami/discourse:3.4.2

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. Upgrade from 3.3.3 or 3.4.1 to 3.4.2
  2. Keep database in place
  3. Run container

What is the expected behavior?

Discourse starts

What do you see instead?

discourse 11:02:53.29 INFO  ==> Running database migrations
rake aborted!
Discourse::Utils::CommandError: /opt/bitnami/discourse/lib/discourse.rb:139:in `exec':  (Discourse::Utils::CommandError)
/opt/bitnami/discourse/lib/discourse.rb:173:in `execute_command'
/opt/bitnami/discourse/lib/discourse.rb:139:in `exec'
/opt/bitnami/discourse/lib/discourse.rb:35:in `execute_command'
/opt/bitnami/discourse/lib/discourse_js_processor.rb:69:in `build_theme_transpiler'
/opt/bitnami/discourse/lib/discourse_js_processor.rb:78:in `build_production_theme_transpiler'
/opt/bitnami/discourse/lib/tasks/assets.rake:329:in `block in <main>'
/opt/bitnami/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
/opt/bitnami/ruby/bin/bundle:25:in `load'
/opt/bitnami/ruby/bin/bundle:25:in `<main>'
Tasks: TOP => db:migrate => assets:precompile:theme_transpiler
(See full trace by running task with --trace)

Additional information

No response

@danieldietsch danieldietsch added the tech-issues The user has a technical issue about an application label Apr 4, 2025
@github-actions github-actions bot added the triage Triage is needed label Apr 4, 2025
@danieldietsch
Copy link
Author

When running RAILS_ENV=production bundle exec rake assets:precompile from /opt/bitnami/discourse (which is part of db:migrate) I also get

 ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)

Your pnpm version is incompatible with "/opt/bitnami/discourse/app/assets/javascripts/discourse".

Expected version: ^9
Got: 10.7.1

This is happening because the package's manifest has an engines.pnpm field specified.
To fix this issue, install the required pnpm version globally.

To install the latest version of pnpm, run "pnpm i -g pnpm".
To check your pnpm version, run "pnpm -v".

Perhaps this is related.

@danieldietsch danieldietsch changed the title Cannot upgrade from bitnami/discourse:3.3.3 to bitnami/discourse:3.4.x Cannot upgrade from bitnami/discourse:3.3.3 or 3.4.1 to bitnami/discourse:3.4.2 Apr 4, 2025
@javsalgar javsalgar changed the title Cannot upgrade from bitnami/discourse:3.3.3 or 3.4.1 to bitnami/discourse:3.4.2 [bitnami/discourse] Cannot upgrade from bitnami/discourse:3.3.3 or 3.4.1 to bitnami/discourse:3.4.2 Apr 7, 2025
@github-actions github-actions bot removed the triage Triage is needed label Apr 7, 2025
@github-actions github-actions bot assigned fmulero and unassigned carrodher Apr 7, 2025
@fmulero
Copy link
Collaborator

fmulero commented Apr 7, 2025

Thanks a lot @danieldietsch for using bitnami containers.

I am trying to reproduce your issue using a fresh installation with this docker-compose , upgrading the discourse image from version 3.4.1 to version 3.4.2 but I cannot reproduce your issue, the database is upgraded without issues. Am I doing something wrong? Could you share more details about the steps to reproduce it?

@danieldietsch
Copy link
Author

We also use a couple of plugins in 3.4.1 that may be related to the issue. We have

 image: discourse:3.4.1
    pull_policy: build
    build:
      context: .
      dockerfile: Dockerfile
      tags:
        - discourse:latest

(same for sidekiq)
and then the Dockerfile

FROM bitnami/discourse:3.4.1
RUN apt-get update --yes && apt-get install --yes git
WORKDIR /bitnami/discourse/plugins
RUN git config --global --add safe.directory /opt/bitnami/discourse \
    && git clone https://github.com/discourse/discourse-oauth2-basic.git \
    && git clone https://github.com/discourse/discourse-openid-connect.git \
    && git clone https://github.com/discourse/discourse-solved.git \
    && git clone https://github.com/discourse/discourse-voting.git discourse-topic-voting

# manually move to a version of discourse-solved that is compatible with 3.4.2
RUN cd discourse-solved && git reset --hard 4e3521fd25d8e660ff034ebca90cabfeac3c2e60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discourse in-progress tech-issues The user has a technical issue about an application
Projects
None yet
Development

No branches or pull requests

4 participants