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

fix: docker-compose-image-tag fails to start #31606

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,24 @@ jobs:
echo "matrix_config=${MATRIX_CONFIG}" >> $GITHUB_OUTPUT
echo $GITHUB_OUTPUT

docker-compose-image-tag:
needs: setup_matrix
runs-on: ubuntu-24.04
steps:
- name: Setup Docker Environment
if: steps.check.outputs.python || steps.check.outputs.frontend || steps.check.outputs.docker
uses: ./.github/actions/setup-docker
with:
dockerhub-user: ${{ secrets.DOCKERHUB_USER }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
build: "false"
install-docker-compose: "true"
- name: docker-compose sanity check
if: steps.check.outputs.python || steps.check.outputs.frontend || steps.check.outputs.docker
shell: bash
run: |
docker compose --exit-code-from superset-init -f docker-compose-image-tag.yml up

docker-build:
name: docker-build
needs: setup_matrix
Expand Down
17 changes: 11 additions & 6 deletions docker/docker-bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@

set -eo pipefail

# UV may not be installed in older images
pip install uv

# Make python interactive
if [ "$DEV_MODE" == "true" ]; then
echo "Reinstalling the app in editable mode"
uv pip install -e .
if command -v uv > /dev/null 2>&1; then
echo "Reinstalling the app in editable mode"
uv pip install -e .
fi
fi
Comment on lines 22 to 27
Copy link

Choose a reason for hiding this comment

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

Missing pip fallback in DEV_MODE category Functionality

Tell me more
What is the issue?

When UV is not available in DEV_MODE, the script silently skips the installation without falling back to regular pip or warning the user.

Why this matters

This could lead to missing dependencies in development environments where UV is not available, potentially causing runtime issues.

Suggested change

Add pip fallback:
if [ "$DEV_MODE" == "true" ]; then
echo "Reinstalling the app in editable mode"
if command -v uv > /dev/null 2>&1; then
uv pip install -e .
else
pip install -e .
fi
fi

Chat with Korbit by mentioning @korbit-ai, and give a 👍 or 👎 to help Korbit improve your reviews.

Copy link
Member Author

Choose a reason for hiding this comment

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

Don't need to reinstall in dev mode where uv is not present as it was the default install in that era

REQUIREMENTS_LOCAL="/app/docker/requirements-local.txt"
# If Cypress run – overwrite the password for admin and export env variables
Expand All @@ -35,7 +34,13 @@ if [ "$CYPRESS_CONFIG" == "true" ]; then
fi
if [[ "$DATABASE_DIALECT" == postgres* ]] ; then
echo "Installing postgres requirements"
uv pip install -e .[postgres]
if command -v uv > /dev/null 2>&1; then
# Use uv in newer images
uv pip install -e .[postgres]
else
# Use pip in older images
pip install -e .[postgres]
fi
fi
#
# Make sure we have dev requirements installed
Expand Down
Loading