Skip to content

sentry-admin.sh fails to detect latest docker compose version #3700

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

Closed
1 task done
alefaut opened this issue May 15, 2025 · 2 comments · Fixed by #3693
Closed
1 task done

sentry-admin.sh fails to detect latest docker compose version #3700

alefaut opened this issue May 15, 2025 · 2 comments · Fixed by #3693

Comments

@alefaut
Copy link

alefaut commented May 15, 2025

Self-Hosted Version

25.4.0

CPU Architecture

x86_64

Docker Version

28.1.1

Docker Compose Version

2.35.1

Machine Specification

  • My system meets the minimum system requirements of Sentry

Steps to Reproduce

I have two different version of docker compose

# docker-compose version --short
2.32.1
# docker compose version --short
2.35.1

This should not cause any issue since sentry-admin.sh uses install/dc-detect-version.sh to detect which one to use (the latest one)

if [[ -z "$COMPOSE_VERSION" ]] || [[ -n "$STANDALONE_COMPOSE_VERSION" ]] && ! vergte ${COMPOSE_VERSION//v/} ${STANDALONE_COMPOSE_VERSION//v/}; then
  COMPOSE_VERSION="${STANDALONE_COMPOSE_VERSION}"
  dc_base="$dc_base_standalone"
fi

Unfortunately, vergte function has not been defined.

This function is defined in install/_lib.sh but this file is not sourced in the sentry-admin.sh script.
Not sure it would be a good idea as install/_lib.sh define many other thing.

Expected Result

+++ docker compose version --short
+++ echo 'docker compose'
++ dc_base='docker compose'
+++ docker-compose version --short
+++ echo docker-compose
++ dc_base_standalone=docker-compose
+++ '[' -n 'docker compose' ']'
+++ docker compose version --short
++ COMPOSE_VERSION=2.35.1
+++ '[' -n docker-compose ']'
+++ docker-compose version --short
++ STANDALONE_COMPOSE_VERSION=2.32.1
++ [[ -z 2.35.1 ]]
++ [[ -z 2.35.1 ]]
++ [[ -n 2.32.1 ]]
++ vergte 2.35.1 2.32.1
++ printf '%s\n%s' 2.35.1 2.32.1
++ sort --version-sort --check=quiet --reverse
++ dc='docker compose --ansi never'

Actual Result

+++ docker compose version --short
+++ echo 'docker compose'
++ dc_base='docker compose'
+++ docker-compose version --short
+++ echo docker-compose
++ dc_base_standalone=docker-compose
+++ '[' -n 'docker compose' ']'
+++ docker compose version --short
++ COMPOSE_VERSION=2.35.1
+++ '[' -n docker-compose ']'
+++ docker-compose version --short
++ STANDALONE_COMPOSE_VERSION=2.32.1
++ [[ -z 2.35.1 ]]
++ [[ -z 2.35.1 ]]
++ [[ -n 2.32.1 ]]
++ vergte 2.35.1 2.32.1
install/dc-detect-version.sh: line 23: vergte: command not found
++ COMPOSE_VERSION=2.32.1
++ dc_base=docker-compose

Event ID

No response

@aldy505
Copy link
Collaborator

aldy505 commented May 16, 2025

cc @aminvakil @BYK

@BYK
Copy link
Member

BYK commented May 16, 2025

This will be resolved in #3693. I thought it was merged but for some reason tests failed. I'll see what's wrong there.

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

Successfully merging a pull request may close this issue.

3 participants