From 56af6c3af87818b4f931089c1205e0bd85c7a7ad Mon Sep 17 00:00:00 2001 From: gibsondan Date: Tue, 8 Oct 2024 16:35:04 -0500 Subject: [PATCH] Remove direct python 3.8 dependencies from dagster-cloud-action now that 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 --- actions/build_deploy_python_executable/action.yml | 12 +++--------- src/Dockerfile.dagster-manylinux-builder | 10 +++++----- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/actions/build_deploy_python_executable/action.yml b/actions/build_deploy_python_executable/action.yml index 7e54ce78..38214913 100644 --- a/actions/build_deploy_python_executable/action.yml +++ b/actions/build_deploy_python_executable/action.yml @@ -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 @@ -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: > diff --git a/src/Dockerfile.dagster-manylinux-builder b/src/Dockerfile.dagster-manylinux-builder index 3e07dd09..8c1b2003 100644 --- a/src/Dockerfile.dagster-manylinux-builder +++ b/src/Dockerfile.dagster-manylinux-builder @@ -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. @@ -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. @@ -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