Skip to content

Commit

Permalink
fix: change lexicographical based comparison to numerical comparison …
Browse files Browse the repository at this point in the history
…to handle edge cases
  • Loading branch information
Danyal-Faheem committed Aug 30, 2024
1 parent 820cebe commit 4d0042c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion tutor/templates/k8s/deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,11 @@ spec:
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
- "--binlog-expire-logs-seconds=259200"
{% if DOCKER_IMAGE_MYSQL >= "docker.io/mysql:8.4.0" -%}- "--mysql-native-password=ON"{%- endif %}
# We only require this option for MySQL 8.4 and above
# Breaks MySQL for previous versions as this option does not exist on versions earlier than 8.4
{% if DOCKER_IMAGE_MYSQL.split(':')[-1].split('.') | map('int') | list >= '8.4.0'.split('.') | map('int') | list -%}
- "--mysql-native-password=ON"
{%- endif %}
env:
- name: MYSQL_ROOT_PASSWORD
value: "{{ MYSQL_ROOT_PASSWORD }}"
Expand Down
6 changes: 5 additions & 1 deletion tutor/templates/local/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ services:
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
--binlog-expire-logs-seconds=259200
{% if DOCKER_IMAGE_MYSQL >= "docker.io/mysql:8.4.0" -%}--mysql-native-password=ON{%- endif %}
# We only require this option for MySQL 8.4 and above
# Breaks MySQL for previous versions as this option does not exist on versions earlier than 8.4
{% if DOCKER_IMAGE_MYSQL.split(':')[-1].split('.') | map('int') | list >= '8.4.0'.split('.') | map('int') | list -%}
--mysql-native-password=ON
{%- endif %}
restart: unless-stopped
user: "999:999"
volumes:
Expand Down

0 comments on commit 4d0042c

Please sign in to comment.