Skip to content

Commit

Permalink
Remove direct python 3.8 dependencies from dagster-cloud-action now t…
Browse files Browse the repository at this point in the history
…hat it is EOL

Summary:
- Don't install python 3.8 in every serverless build unless that version is what is being used
- Use python 3.11 instead of 3.8 in the manylinux builder

Test Plan:
Create a release and run the action on a serverless deploy ofpython 3.8 through 3.12
Run a docker build locally using the latest manylinux builder
  • Loading branch information
gibsondan committed Oct 8, 2024
1 parent a582e0f commit 56af6c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
12 changes: 3 additions & 9 deletions actions/build_deploy_python_executable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
deployment:
required: false
description: "The deployment to push to, defaults to 'prod'. Ignored for pull requests where the branch deployment is used."
default: "prod"
default: "prod"
deploy:
description: 'Whether to upload the code files and update the code location'
required: false
Expand Down Expand Up @@ -44,20 +44,14 @@ runs:
run: echo "FLAG_DEPS_CACHE_TO=--deps-cache-to=${{ github.repository }}" >> $GITHUB_ENV
shell: bash

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

- if: ${{ inputs.python_version != '3.8' }}
id: custom-python-version
- id: setup-python
name: Set up Python ${{ inputs.python_version }} for target
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}

- if: ${{ inputs.python_version != '3.8' }}
run: ${{ steps.custom-python-version.outputs.python-path }} -m pip install setuptools
- run: ${{ steps.setup-python.outputs.python-path }} -m pip install setuptools
shell: bash

- run: >
Expand Down
10 changes: 5 additions & 5 deletions src/Dockerfile.dagster-manylinux-builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Builds ghcr.io/daster-io/dagster-manylinux-builder:*

# This docker image contains the PEX builder (builder.pex) and is capable of
# This docker image contains the PEX builder (builder.pex) and is capable of
# building source only dependencies (sdists) for Python that work with Dagster Cloud Serverless base
# images.

Expand All @@ -12,8 +12,8 @@
#
# $ echo $GITHUB-PAT | docker login ghcr.io -u USERNAME --password-stdin
#
# $ docker build . -f src/Dockerfile.dagster-manylinux-builder -t ghcr.io/dagster-io/dagster-manylinux-builder:latest
# $ docker push ghcr.io/dagster-io/dagster-manylinux-builder:latest
# $ docker build . -f src/Dockerfile.dagster-manylinux-builder -t ghcr.io/dagster-io/dagster-manylinux-builder:YOUR_IMAGE_TAG_HERE
# $ docker push ghcr.io/dagster-io/dagster-manylinux-builder:YOUR_IMAGE_TAG_HERE

# See dagster-cloud (docker_runner.py) for code that uses this image.

Expand All @@ -23,13 +23,13 @@
FROM --platform=linux/amd64 quay.io/pypa/manylinux_2_28_x86_64:latest

# Add all the relevant Python binaries to the PATH
ENV PATH="/opt/python/cp38-cp38/bin:/opt/python/cp37-cp37m/bin:/opt/python/cp39-cp39/bin:/opt/python/cp310-cp310/bin:$PATH"
ENV PATH="/opt/python/cp38-cp38/bin:/opt/python/cp39-cp39/bin:/opt/python/cp310-cp310/bin:/opt/python/cp311-cp311/bin:/opt/python/cp311-cp312/bin:$PATH"

# To install unreleased versions, build the wheels and drop them in this directory
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

0 comments on commit 56af6c3

Please sign in to comment.