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

Release: 6.0.1 #568

Merged
merged 6 commits into from
Nov 13, 2024
Merged

Release: 6.0.1 #568

merged 6 commits into from
Nov 13, 2024

Conversation

abinoam
Copy link
Contributor

@abinoam abinoam commented Nov 11, 2024

Congratulations @jcormier and the whole team of contributors for maintaining this repo.
I'm really impressed how well documented is the process of crafting a new release.
It was really easy and straightforward.
I have run the tests and the instance worked perfectly. Screenshot attached.

The only caveat was that the test-relase expects a directory called certs with the openssl thing inside it.
I have updated Makefile to do the this automatically (based on the instructions provided by README)

Captura de tela de 2024-11-11 17-55-49

@jcormier
Copy link
Collaborator

Note the docker-compose-mysql.yml needs to be updated to MySQL 8. Picking the bookworm image to match the debian version used in Dockerfile.

services:
  mysql:
    image: mysql:8.0-bookworm
    environment:
      - MYSQL_USER=redmine
      - MYSQL_PASS=password
      - MYSQL_DATABASE=redmine_production
      - MYSQL_RANDOM_ROOT_PASSWORD=yes
    volumes:
      - /srv/docker/redmine/mysql:/var/lib/mysql

@jcormier
Copy link
Collaborator

One thing that was mentioned in their release news that I think needs special testing is they mentioned moving the assets and themes stuff around. We need to double check that we install any assets or themes in the correct place.

https://www.redmine.org/news/147

Asset pipeline integration using Propshaft has been enabled (#39111):

Redmine assets have been moved from public to app/assets to comply with the Rails standard
Assets are automatically recompiled in production mode when updates are found in order to not require an additional command, but you can disable this behavior from configuration (config.assets.redmine_detect_update)
[breaking change] Themes are now loaded from themes in the project root instead of public/themes, please update your installation accordingly. Being a trivial change, we do not provide any rake task to make this change automatically.

Ofcourse now that 6.0.1 has been released. I'd recommend we skip to that version as well.

@abinoam abinoam changed the title Release: 6.0.0 Release: 6.0.1 Nov 12, 2024
@abinoam
Copy link
Contributor Author

abinoam commented Nov 12, 2024

Hi @jcormier,

Thank you for your prompt feedback.

I've updated the commits to reference version 6.0.1 directly, skipping over 6.0.0.

I also adjusted the MySQL configuration as per your instructions. Here’s the updated YAML:

services:
  mysql:
    image: mysql:8.0-bookworm
    environment:
      - MYSQL_USER=redmine
      - MYSQL_PASS=password
      - MYSQL_DATABASE=redmine_production
      - MYSQL_RANDOM_ROOT_PASSWORD=yes
    volumes:
      - /srv/docker/redmine/mysql:/var/lib/mysql
    # https://www.redmine.org/projects/redmine/wiki/MySQL_configuration
    command: --transaction-isolation=READ-COMMITTED

I retained the command configuration as it was because the MySQL issue seems to persist (referencing the link provided). Let me know if this final version looks good to you.

-      - MYSQL_CHARSET=utf8mb4
-      - MYSQL_COLLATION=utf8mb4_unicode_ci

Are these two parameters no longer necessary?

Regarding the asset migration, I'm not entirely comfortable proceeding on my own. After reviewing the code, I noticed the export REDMINE_WAS_UPDATED=yes line, which seems to be a likely place to hook the migration process for moving assets and themes to the new location in 6.0.1. However, I couldn't progress further.

If this is something you could handle quickly, given your familiarity with the code, it might be the more efficient approach. That said, if you’d prefer to guide me through it, I'm more than willing to give it a try, though please bear in mind I'm not yet at a senior level in Docker.

Thank you again!

@jcormier
Copy link
Collaborator

I retained the command configuration as it was because the MySQL issue seems to persist (referencing the link provided). Let me know if this final version looks good to you.

Thanks I overlooked that. I thought that was resolved in 8.x but not according to the redmine docs so good call.

Are these two parameters no longer necessary?

They are now the defaults for MySQL 8.x. Thanks for checking.
https://dev.mysql.com/blog-archive/mysql-8-0-collations-migrating-from-older-collations/

From MySQL 8.0, utf8mb4 is the default character set, and the default collation for utf8mb4 is utf8mb4_0900_ai_ci. MySQL 8.0 is also coming with a whole new set of Unicode collations for the utf8mb4 character set.

If this is something you could handle quickly, given your familiarity with the code, it might be the more efficient approach. That said, if you’d prefer to guide me through it, I'm more than willing to give it a try, though please bear in mind I'm not yet at a senior level in Docker.

Let me take a look. Its probably a single path change in the functions file.

Thanks for the quick follow up.

@jcormier
Copy link
Collaborator

Looks like the only change needed is

diff --git a/assets/runtime/functions b/assets/runtime/functions
index fff89c2b08e4..ebe5fa338ba0 100644
--- a/assets/runtime/functions
+++ b/assets/runtime/functions
@@ -1128,7 +1128,7 @@ install_plugins() {
 install_themes() {
   if [[ -d ${REDMINE_THEMES_DIR} ]]; then
     echo "Installing themes..."
-    rsync -avq --chown=${REDMINE_USER}:${REDMINE_USER} ${REDMINE_THEMES_DIR}/ ${REDMINE_INSTALL_DIR}/public/themes/
+    rsync -avq --chown=${REDMINE_USER}:${REDMINE_USER} ${REDMINE_THEMES_DIR}/ ${REDMINE_INSTALL_DIR}/themes/
   fi
 }

@abinoam
Copy link
Contributor Author

abinoam commented Nov 12, 2024

The MySQL is still buggy. Sorry for not noticing before.

I sent one more commit (to be squashed later before merging).

@@ -3,7 +3,7 @@ services:
     image: mysql:8.0-bookworm
     environment:
       - MYSQL_USER=redmine
-      - MYSQL_PASS=password
+      - MYSQL_PASSWORD=password
       - MYSQL_DATABASE=redmine_production
       - MYSQL_RANDOM_ROOT_PASSWORD=yes
     volumes:

@jcormier jcormier self-assigned this Nov 12, 2024
@abinoam
Copy link
Contributor Author

abinoam commented Nov 12, 2024

Looks like the only change needed is

diff --git a/assets/runtime/functions b/assets/runtime/functions
index fff89c2b08e4..ebe5fa338ba0 100644
--- a/assets/runtime/functions
+++ b/assets/runtime/functions
@@ -1128,7 +1128,7 @@ install_plugins() {
 install_themes() {
   if [[ -d ${REDMINE_THEMES_DIR} ]]; then
     echo "Installing themes..."
-    rsync -avq --chown=${REDMINE_USER}:${REDMINE_USER} ${REDMINE_THEMES_DIR}/ ${REDMINE_INSTALL_DIR}/public/themes/
+    rsync -avq --chown=${REDMINE_USER}:${REDMINE_USER} ${REDMINE_THEMES_DIR}/ ${REDMINE_INSTALL_DIR}/themes/
   fi
 }

Nice. Let me see if I can understand what is going on behind the scenes.
The REDMINE_THEMES_DIR is a fixed dir in my local filesystem? Isn't it?
And REDMINE_INSTALL_DIR is a directory inside the container?
Did I understand correctly or not?

@jcormier
Copy link
Collaborator

jcormier commented Nov 12, 2024

The REDMINE_THEMES_DIR is a fixed dir in my local filesystem? Isn't it?
Yeah, the standard location according to the redmine would be /srv/docker/redmine/redmine/themes. But it could really be anywhere as long as you change the volume mount.

The /srv/docker/redmine/redmine folder get volume mounted into the docker container at /home/redmine/data
The startup script then copies the plugin and themes directory to where it needs to be.

And REDMINE_INSTALL_DIR is a directory inside the container?

Yes, it's the location where the redmine tarball was extracted "installed". Tends to be /home/redmine/redmine in the docker container.

Did I understand correctly or not?

Yeah.

@abinoam
Copy link
Contributor Author

abinoam commented Nov 12, 2024

Did I understand correctly or not?

Yeah.

Nice.

PS: Feel free to rebase, reorder, squash, do anything with my commits.

@jcormier
Copy link
Collaborator

No rush. If you can squash the MySQL pass fix and add the themes commit. I think this should be mergeable.

@abinoam
Copy link
Contributor Author

abinoam commented Nov 12, 2024

I noticed a message on mysql configuration.

mbind: Operation not permitted

As per https://stackoverflow.com/questions/55559386/how-to-fix-mbind-operation-not-permitted-in-mysql-error-log it is related to the MySQL 8.x on.

I added a commit with the instructed fix (I checked and it made the message disappear).

One thing more... The "info" page is not working for MySQL. I'm still investigating.

When I click "Informations" in the "Administration" panel it goes from http://localhost:10083/admin to https://localhost:10445/admin/info.

I tried to force port 10083 but it doesn't work either.

I failed to make the mysql docker compose file to work from the master branch (as I was trying to compare behaviours).

@abinoam
Copy link
Contributor Author

abinoam commented Nov 12, 2024

It's working. I guess the problem with the info page was related to my browser's session problem.

@abinoam
Copy link
Contributor Author

abinoam commented Nov 12, 2024

Let me know if you spot anything more to fix before merging. Otherwise, feel free to do it!

@jcormier jcormier merged commit 00613fe into sameersbn:master Nov 13, 2024
1 check passed
@jcormier
Copy link
Collaborator

Thanks @abinoam. I created a 5.1-stable branch and have merged your changes into master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants