Skip to content

Commit

Permalink
Increment default python version to 3.11
Browse files Browse the repository at this point in the history
I suspect we'll want to sufficiently increment the released version so
this doesn't break users who are pinned to 0.1.
  • Loading branch information
jmsanders committed Mar 27, 2024
1 parent 7c2f65f commit 15f5c5e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions actions/build_deploy_python_executable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ inputs:
description: 'Path to dagster_cloud.yaml'
required: true
python_version:
description: 'Python version string, major.minor only, eg "3.8"'
description: 'Python version string, major.minor only, eg "3.11"'
required: false
default: '3.8'
default: '3.11'
deployment:
required: false
description: "The deployment to push to, defaults to 'prod'. Ignored for pull requests where the branch deployment is used."
Expand Down Expand Up @@ -47,12 +47,12 @@ runs:
run: echo "FLAG_DEPS_CACHE_TO=--deps-cache-to=${{ github.repository }}/${{ github.ref_name }}" >> $GITHUB_ENV
shell: bash

- name: Set up Python 3.8
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.11"

- if: ${{ inputs.python_version != '3.8' }}
- if: ${{ inputs.python_version != '3.11' }}
name: Set up Python ${{ inputs.python_version }} for target
uses: actions/setup-python@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion gitlab/serverless-legacy-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ build-image:
before_script:
- echo $AWS_ECR_PASSWORD | docker login --username $AWS_ECR_USERNAME --password-stdin $REGISTRY_URL
script:
- echo "FROM python:3.8-slim" > $DAGSTER_CLOUD_LOCATION_DIR/Dockerfile
- echo "FROM python:3.11-slim" > $DAGSTER_CLOUD_LOCATION_DIR/Dockerfile
- cat Dockerfile.template >> $DAGSTER_CLOUD_LOCATION_DIR/Dockerfile
- docker build $DAGSTER_CLOUD_LOCATION_DIR -t $REGISTRY_URL:prod-$DAGSTER_CLOUD_LOCATION_NAME-$CI_COMMIT_SHA
- docker push $REGISTRY_URL:prod-$DAGSTER_CLOUD_LOCATION_NAME-$CI_COMMIT_SHA
Expand Down
4 changes: 2 additions & 2 deletions sample-repo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM python:3.8-slim
FROM python:3.11-slim

COPY requirements.txt /requirements.txt
RUN pip install -r /requirements.txt

WORKDIR /opt/dagster/app

COPY repo.py /opt/dagster/app
COPY repo.py /opt/dagster/app
4 changes: 2 additions & 2 deletions src/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 python:3.8.16-slim
FROM --platform=linux/amd64 python:3.11-slim

# Install deps
RUN apt update && apt install git -y
Expand Down Expand Up @@ -34,4 +34,4 @@ COPY src/get_branch_deployment.sh /get_branch_deployment.sh
COPY src/gitlab_action gitlab_action

# Use the venv python as the command
CMD venv-dagster-cloud/bin/python3
CMD venv-dagster-cloud/bin/python3
2 changes: 1 addition & 1 deletion src/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# base image is templated in (default: python:3.8-slim)
# base image is templated in (default: python:3.11-slim)

# Run the custom dagster cloud pre install script if available
COPY *dagster_cloud_pre_install.sh *setup.py *requirements.txt /
Expand Down
4 changes: 2 additions & 2 deletions src/copy_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

if [ -z $CUSTOM_BASE_IMAGE_ALLOWED ] || [ -z $INPUT_BASE_IMAGE ]; then
if [ ! -z $INPUT_BASE_IMAGE ]; then
echo "Custom base images are not enabled for this organization, defaulting to python:3.8-slim."
echo "Custom base images are not enabled for this organization, defaulting to python:3.11-slim."
fi
echo "FROM python:3.8-slim" > ${INPUT_TARGET_DIRECTORY}/Dockerfile
echo "FROM python:3.11-slim" > ${INPUT_TARGET_DIRECTORY}/Dockerfile
else
echo "FROM ${INPUT_BASE_IMAGE}" > ${INPUT_TARGET_DIRECTORY}/Dockerfile
fi
Expand Down

0 comments on commit 15f5c5e

Please sign in to comment.