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 18e68f8
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
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 github/serverless/branch_deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
DAGSTER_CLOUD_URL: ${{ secrets.DAGSTER_CLOUD_URL }}
DAGSTER_CLOUD_API_TOKEN: ${{ secrets.DAGSTER_CLOUD_API_TOKEN }}
ENABLE_FAST_DEPLOYS: 'true'
PYTHON_VERSION: '3.8'
PYTHON_VERSION: '3.11'
DAGSTER_CLOUD_FILE: 'dagster_cloud.yaml'

jobs:
Expand Down
2 changes: 1 addition & 1 deletion github/serverless/dbt/branch_deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
DAGSTER_CLOUD_URL: ${{ secrets.DAGSTER_CLOUD_URL }}
DAGSTER_CLOUD_API_TOKEN: ${{ secrets.DAGSTER_CLOUD_API_TOKEN }}
ENABLE_FAST_DEPLOYS: 'true'
PYTHON_VERSION: '3.8'
PYTHON_VERSION: '3.11'
DAGSTER_CLOUD_FILE: 'dagster_cloud.yaml'

jobs:
Expand Down
2 changes: 1 addition & 1 deletion github/serverless/dbt/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
DAGSTER_CLOUD_URL: ${{ secrets.DAGSTER_CLOUD_URL }}
DAGSTER_CLOUD_API_TOKEN: ${{ secrets.DAGSTER_CLOUD_API_TOKEN }}
ENABLE_FAST_DEPLOYS: 'true'
PYTHON_VERSION: '3.8'
PYTHON_VERSION: '3.11'
DAGSTER_CLOUD_FILE: 'dagster_cloud.yaml'

jobs:
Expand Down
2 changes: 1 addition & 1 deletion github/serverless/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
DAGSTER_CLOUD_URL: ${{ secrets.DAGSTER_CLOUD_URL }}
DAGSTER_CLOUD_API_TOKEN: ${{ secrets.DAGSTER_CLOUD_API_TOKEN }}
ENABLE_FAST_DEPLOYS: 'true'
PYTHON_VERSION: '3.8'
PYTHON_VERSION: '3.11'
DAGSTER_CLOUD_FILE: 'dagster_cloud.yaml'

jobs:
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.dagster-manylinux-builder
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ENV PATH="/opt/python/cp38-cp38/bin:/opt/python/cp37-cp37m/bin:/opt/python/cp39-
COPY wheels /wheels

# Install dagster-cloud
RUN python3.8 -m pip install dagster-cloud --find-links file:///wheels/
RUN python3.11 -m pip install dagster-cloud --find-links file:///wheels/

COPY generated/gha/builder.pex /builder.pex

Expand Down
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
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def builder_module(dagster_cloud_pex_path):
)
except subprocess.CalledProcessError as exc:
raise ValueError("Could not unpack builder:" + exc.output)
sys.path.insert(0, os.path.join(venv_dir, "lib/python3.8/site-packages"))
sys.path.insert(0, os.path.join(venv_dir, "lib/python3.11/site-packages"))
try:
yield importlib.import_module("dagster_cloud_cli.core.pex_builder")
finally:
Expand Down

0 comments on commit 18e68f8

Please sign in to comment.