Skip to content

chore(deps): bump the pip group across 5 directories with 9 updates #390

chore(deps): bump the pip group across 5 directories with 9 updates

chore(deps): bump the pip group across 5 directories with 9 updates #390

Workflow file for this run

name: PR - Ray EC2 CPU
on:
pull_request:
branches: [main]
types: [opened, reopened, synchronize]
paths:
- ".github/config/image/ray-ec2-cpu.yml"
- ".github/workflows/pr-ray-ec2-cpu.yml"
- "docker/ray/Dockerfile.cpu"
- "docker/ray/pyproject.toml"
- "docker/ray/uv.lock"
- "scripts/common/**"
- "scripts/ray/**"
- "scripts/telemetry/**"
- "test/ray/**"
- "test/sanity/**"
- "test/security/data/ecr_scan_allowlist/ray/**"
- "test/telemetry/**"
- "!docs/**"
permissions:
contents: read
pull-requests: read
env:
FORCE_COLOR: "1"
CONFIG_FILE: ".github/config/image/ray-ec2-cpu.yml"
jobs:
gatekeeper:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-gate-${{ github.event.pull_request.number }}
cancel-in-progress: true
steps:
- name: Checkout base branch (safe)
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.base.sha }}
fetch-depth: 1
- name: Run permission gate (from base)
uses: ./.github/actions/pr-permission-gate
load-config:
needs: [gatekeeper]
if: success()
runs-on: ubuntu-latest
outputs:
config: ${{ steps.load.outputs.config }}
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Load configuration
id: load
uses: ./.github/actions/load-config
with:
config-file: ${{ env.CONFIG_FILE }}
parse-config:
needs: [load-config]
if: success()
runs-on: ubuntu-latest
outputs:
framework: ${{ steps.parse.outputs.framework }}
framework-version: ${{ steps.parse.outputs.framework-version }}
python-version: ${{ steps.parse.outputs.python-version }}
os-version: ${{ steps.parse.outputs.os-version }}
container-type: ${{ steps.parse.outputs.container-type }}
device-type: ${{ steps.parse.outputs.device-type }}
arch-type: ${{ steps.parse.outputs.arch-type }}
contributor: ${{ steps.parse.outputs.contributor }}
customer-type: ${{ steps.parse.outputs.customer-type }}
prod-image: ${{ steps.parse.outputs.prod-image }}
steps:
- name: Parse configuration
id: parse
run: |
echo '${{ needs.load-config.outputs.config }}' > config.json
echo "framework=$(jq -r '.common.framework' config.json)" >> $GITHUB_OUTPUT
echo "framework-version=$(jq -r '.common.framework_version' config.json)" >> $GITHUB_OUTPUT
echo "python-version=$(jq -r '.common.python_version' config.json)" >> $GITHUB_OUTPUT
echo "os-version=$(jq -r '.common.os_version' config.json)" >> $GITHUB_OUTPUT
echo "container-type=$(jq -r '.common.job_type' config.json)" >> $GITHUB_OUTPUT
echo "device-type=$(jq -r '.common.device_type // "cpu"' config.json)" >> $GITHUB_OUTPUT
echo "arch-type=$(jq -r '.common.arch_type // "x86"' config.json)" >> $GITHUB_OUTPUT
echo "contributor=$(jq -r '.common.contributor // "None"' config.json)" >> $GITHUB_OUTPUT
echo "customer-type=$(jq -r '.common.customer_type // ""' config.json)" >> $GITHUB_OUTPUT
echo "prod-image=$(jq -r '.common.prod_image' config.json)" >> $GITHUB_OUTPUT
check-changes:
needs: [load-config, parse-config]
if: success()
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-check-changes-${{ github.event.pull_request.number }}
cancel-in-progress: true
outputs:
build-change: ${{ steps.changes.outputs.build-change }}
ec2-test-change: ${{ steps.changes.outputs.ec2-test-change }}
sanity-test-change: ${{ steps.changes.outputs.sanity-test-change }}
telemetry-test-change: ${{ steps.changes.outputs.telemetry-test-change }}
steps:
- name: Checkout DLC source
uses: actions/checkout@v5
- name: Setup python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files
- name: Detect file changes
id: changes
uses: dorny/paths-filter@v4
with:
filters: |
build-change:
- ".github/config/image/ray-ec2-cpu.yml"
- "docker/ray/Dockerfile.cpu"
- "docker/ray/pyproject.toml"
- "docker/ray/uv.lock"
- "scripts/common/install_python.sh"
- "scripts/common/setup_oss_compliance.sh"
- "scripts/telemetry/bash_telemetry.sh.template"
- "scripts/ray/*"
- "test/security/data/ecr_scan_allowlist/ray/**"
ec2-test-change:
- "test/ray/ec2/**"
sanity-test-change:
- "test/sanity/**"
telemetry-test-change:
- "test/telemetry/**"
build-ray-ec2-cpu-image:
needs: [check-changes, parse-config]
if: needs.check-changes.outputs.build-change == 'true'
runs-on:
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
fleet:x86-build-runner
buildspec-override:true
concurrency:
group: ${{ github.workflow }}-build-ray-ec2-cpu-image-${{ github.event.pull_request.number }}
cancel-in-progress: true
outputs:
ci-image: ${{ steps.build.outputs.image-uri }}
steps:
- uses: actions/checkout@v5
- name: Build image
id: build
uses: ./.github/actions/build-image
with:
framework: ${{ needs.parse-config.outputs.framework }}
target: ray-ec2-cpu
# Ray Dockerfile.cpu is multi-stage; base images are hardcoded in the Dockerfile.
# This value is passed as --build-arg BASE_IMAGE but not consumed by the Dockerfile.
base-image: "unused-ray-cpu-multistage"
framework-version: ${{ needs.parse-config.outputs.framework-version }}
container-type: ${{ needs.parse-config.outputs.container-type }}
aws-account-id: ${{ vars.CI_AWS_ACCOUNT_ID }}
aws-region: ${{ vars.AWS_REGION }}
tag-pr: ${{ needs.parse-config.outputs.framework }}-${{ needs.parse-config.outputs.framework-version }}-cpu-${{ needs.parse-config.outputs.python-version }}-${{ needs.parse-config.outputs.os-version }}-ec2-pr-${{ github.event.pull_request.number }}
dockerfile-path: docker/ray/Dockerfile.cpu
arch-type: ${{ needs.parse-config.outputs.arch-type }}
device-type: ${{ needs.parse-config.outputs.device-type }}
python-version: ${{ needs.parse-config.outputs.python-version }}
os-version: ${{ needs.parse-config.outputs.os-version }}
contributor: ${{ needs.parse-config.outputs.contributor }}
customer-type: ${{ needs.parse-config.outputs.customer-type }}
ray-ec2-cpu-ffmpeg-test:
needs: [check-changes, build-ray-ec2-cpu-image, parse-config]
if: needs.check-changes.outputs.build-change == 'true'
runs-on:
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
fleet:x86-build-runner
buildspec-override:true
concurrency:
group: ${{ github.workflow }}-ray-ec2-cpu-ffmpeg-test-${{ github.event.pull_request.number }}
cancel-in-progress: true
steps:
- name: Checkout DLC source
uses: actions/checkout@v5
- name: Container pull
uses: ./.github/actions/ecr-authenticate
with:
aws-account-id: ${{ needs.build-ray-ec2-cpu-image.result == 'success' && vars.CI_AWS_ACCOUNT_ID || vars.PROD_AWS_ACCOUNT_ID }}
aws-region: ${{ vars.AWS_REGION }}
image-uri: ${{ needs.build-ray-ec2-cpu-image.result == 'success' && needs.build-ray-ec2-cpu-image.outputs.ci-image || format('{0}.dkr.ecr.{1}.amazonaws.com/{2}', vars.PROD_AWS_ACCOUNT_ID, vars.AWS_REGION, needs.parse-config.outputs.prod-image) }}
- name: Start container
run: |
CONTAINER_ID=$(docker run -d -it --rm --entrypoint /bin/bash \
-v .:/workdir --workdir /workdir \
${{ needs.build-ray-ec2-cpu-image.result == 'success' && needs.build-ray-ec2-cpu-image.outputs.ci-image || format('{0}.dkr.ecr.{1}.amazonaws.com/{2}', vars.PROD_AWS_ACCOUNT_ID, vars.AWS_REGION, needs.parse-config.outputs.prod-image) }})
echo "CONTAINER_ID=$CONTAINER_ID" >> $GITHUB_ENV
- name: Run FFmpeg codecs test
run: docker exec ${CONTAINER_ID} bash /workdir/test/ray/test_ffmpeg_codecs.sh
ray-ec2-cpu-serve-test:
needs: [check-changes, build-ray-ec2-cpu-image, parse-config]
if: |
always() && !failure() && !cancelled() &&
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.ec2-test-change == 'true')
runs-on:
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
fleet:x86-build-runner
buildspec-override:true
concurrency:
group: ${{ github.workflow }}-ray-ec2-cpu-serve-test-${{ github.event.pull_request.number }}
cancel-in-progress: false
steps:
- name: Checkout DLC source
uses: actions/checkout@v5
- name: Container pull
uses: ./.github/actions/ecr-authenticate
with:
aws-account-id: ${{ needs.build-ray-ec2-cpu-image.result == 'success' && vars.CI_AWS_ACCOUNT_ID || vars.PROD_AWS_ACCOUNT_ID }}
aws-region: ${{ vars.AWS_REGION }}
image-uri: ${{ needs.build-ray-ec2-cpu-image.result == 'success' && needs.build-ray-ec2-cpu-image.outputs.ci-image || format('{0}.dkr.ecr.{1}.amazonaws.com/{2}', vars.PROD_AWS_ACCOUNT_ID, vars.AWS_REGION, needs.parse-config.outputs.prod-image) }}
- name: Install test dependencies
run: |
uv venv --python 3.12
source .venv/bin/activate
uv pip install -r test/requirements.txt
uv pip install -r test/ray/ec2/requirements.txt
- name: Clean stale ray temp dirs
run: rm -rf /tmp/ray-ec2-* || true
- name: Run EC2 serve tests
run: |
source .venv/bin/activate
cd test/
python3 -m pytest -vs -rA \
--image-uri ${{ needs.build-ray-ec2-cpu-image.result == 'success' && needs.build-ray-ec2-cpu-image.outputs.ci-image || format('{0}.dkr.ecr.{1}.amazonaws.com/{2}', vars.PROD_AWS_ACCOUNT_ID, vars.AWS_REGION, needs.parse-config.outputs.prod-image) }} \
ray/ec2/test_ec2_cpu.py
- name: Cleanup ray temp dirs
if: always()
run: rm -rf /tmp/ray-ec2-* || true
sanity-test:
needs: [check-changes, build-ray-ec2-cpu-image, parse-config]
if: |
always() && !failure() && !cancelled() &&
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.sanity-test-change == 'true')
concurrency:
group: ${{ github.workflow }}-sanity-test-${{ github.event.pull_request.number }}
cancel-in-progress: true
uses: ./.github/workflows/reusable-sanity-tests.yml
with:
image-uri: ${{ needs.build-ray-ec2-cpu-image.result == 'success' && needs.build-ray-ec2-cpu-image.outputs.ci-image || format('{0}.dkr.ecr.{1}.amazonaws.com/{2}', vars.PROD_AWS_ACCOUNT_ID, vars.AWS_REGION, needs.parse-config.outputs.prod-image) }}
aws-account-id: ${{ needs.build-ray-ec2-cpu-image.result == 'success' && vars.CI_AWS_ACCOUNT_ID || vars.PROD_AWS_ACCOUNT_ID }}
aws-region: ${{ vars.AWS_REGION }}
framework: ${{ needs.parse-config.outputs.framework }}
framework-version: ${{ needs.parse-config.outputs.framework-version }}
python-version: ${{ needs.parse-config.outputs.python-version }}
os-version: ${{ needs.parse-config.outputs.os-version }}
customer-type: ${{ needs.parse-config.outputs.customer-type }}
arch-type: ${{ needs.parse-config.outputs.arch-type }}
device-type: ${{ needs.parse-config.outputs.device-type }}
contributor: ${{ needs.parse-config.outputs.contributor }}
container-type: ${{ needs.parse-config.outputs.container-type }}
security-test:
needs: [build-ray-ec2-cpu-image, parse-config]
if: success()
concurrency:
group: ${{ github.workflow }}-security-test-${{ github.event.pull_request.number }}
cancel-in-progress: true
uses: ./.github/workflows/reusable-security-tests.yml
with:
image-uri: ${{ needs.build-ray-ec2-cpu-image.result == 'success' && needs.build-ray-ec2-cpu-image.outputs.ci-image || format('{0}.dkr.ecr.{1}.amazonaws.com/{2}', vars.PROD_AWS_ACCOUNT_ID, vars.AWS_REGION, needs.parse-config.outputs.prod-image) }}
aws-account-id: ${{ needs.build-ray-ec2-cpu-image.result == 'success' && vars.CI_AWS_ACCOUNT_ID || vars.PROD_AWS_ACCOUNT_ID }}
aws-region: ${{ vars.AWS_REGION }}
framework: ${{ needs.parse-config.outputs.framework }}
framework-version: ${{ needs.parse-config.outputs.framework-version }}
telemetry-test:
needs: [check-changes, build-ray-ec2-cpu-image, parse-config]
if: |
always() && !failure() && !cancelled() &&
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.telemetry-test-change == 'true')
concurrency:
group: ${{ github.workflow }}-telemetry-test-${{ github.event.pull_request.number }}
cancel-in-progress: false
uses: ./.github/workflows/reusable-telemetry-tests.yml
with:
image-uri: ${{ needs.build-ray-ec2-cpu-image.result == 'success' && needs.build-ray-ec2-cpu-image.outputs.ci-image || format('{0}.dkr.ecr.{1}.amazonaws.com/{2}', vars.PROD_AWS_ACCOUNT_ID, vars.AWS_REGION, needs.parse-config.outputs.prod-image) }}
aws-account-id: ${{ needs.build-ray-ec2-cpu-image.result == 'success' && vars.CI_AWS_ACCOUNT_ID || vars.PROD_AWS_ACCOUNT_ID }}
aws-region: ${{ vars.AWS_REGION }}
framework: ${{ needs.parse-config.outputs.framework }}
framework-version: ${{ needs.parse-config.outputs.framework-version }}
container-type: ${{ needs.parse-config.outputs.container-type }}