Skip to content

Commit

Permalink
Temporarily switch to public github runners
Browse files Browse the repository at this point in the history
We are having problems with self-hosted runners and until we fix
the problems we switch main builds to only run on main with
regular schedule 1x day to serve as a canary build. They will run
longer than on self-hosted runners.

We also add option to trigger the workflow manually from GitHub
interface (by maintainers).
  • Loading branch information
potiuk committed Jul 21, 2024
1 parent 0b0f8f0 commit 9f88b7d
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 48 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/additional-ci-image-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,26 +145,26 @@ jobs:
- name: "Check that image builds quickly"
run: breeze shell --max-time 600 --platform "linux/amd64"

# This is only a check if ARM images are successfully building when committer runs PR from
# Apache repository. This is needed in case you want to fix failing cache job in "canary" run
# There is no point in running this one in "canary" run, because the above step is doing the
# same build anyway.
build-ci-arm-images:
name: Build CI ARM images (in-workflow)
uses: ./.github/workflows/ci-image-build.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
push-image: "false"
runs-on-as-json-public: ${{ inputs.runs-on-as-json-public }}
runs-on-as-json-self-hosted: ${{ inputs.runs-on-as-json-self-hosted }}
image-tag: ${{ inputs.image-tag }}
python-versions: ${{ inputs.python-versions }}
platform: "linux/arm64"
branch: ${{ inputs.branch }}
constraints-branch: ${{ inputs.constraints-branch }}
use-uv: "true"
upgrade-to-newer-dependencies: ${{ inputs.upgrade-to-newer-dependencies }}
docker-cache: ${{ inputs.docker-cache }}
# # This is only a check if ARM images are successfully building when committer runs PR from
# # Apache repository. This is needed in case you want to fix failing cache job in "canary" run
# # There is no point in running this one in "canary" run, because the above step is doing the
# # same build anyway.
# build-ci-arm-images:
# name: Build CI ARM images (in-workflow)
# uses: ./.github/workflows/ci-image-build.yml
# permissions:
# contents: read
# packages: write
# secrets: inherit
# with:
# push-image: "false"
# runs-on-as-json-public: ${{ inputs.runs-on-as-json-public }}
# runs-on-as-json-self-hosted: ${{ inputs.runs-on-as-json-self-hosted }}
# image-tag: ${{ inputs.image-tag }}
# python-versions: ${{ inputs.python-versions }}
# platform: "linux/arm64"
# branch: ${{ inputs.branch }}
# constraints-branch: ${{ inputs.constraints-branch }}
# use-uv: "true"
# upgrade-to-newer-dependencies: ${{ inputs.upgrade-to-newer-dependencies }}
# docker-cache: ${{ inputs.docker-cache }}
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
name: Tests
on: # yamllint disable-line rule:truthy
schedule:
- cron: '28 0 * * *'
- cron: '28 7,15 * * *'
push:
branches: ['main', 'v[0-9]+-[0-9]+-test']
branches: ['v[0-9]+-[0-9]+-test']
pull_request:
branches: ['main']
workflow_dispatch:
permissions:
# All other permissions are set to none
contents: read
Expand Down
44 changes: 22 additions & 22 deletions .github/workflows/finalize-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,28 +150,28 @@ jobs:
docker-cache: ${{ inputs.docker-cache }}
if: inputs.canary-run == 'true'

push-buildx-cache-to-github-registry-arm:
name: Push Regular ARM Image Cache
needs: [update-constraints]
uses: ./.github/workflows/push-image-cache.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
runs-on-as-json-public: ${{ inputs.runs-on-as-json-public }}
runs-on-as-json-self-hosted: ${{ inputs.runs-on-as-json-self-hosted }}
cache-type: "Regular ARM"
include-prod-images: "true"
push-latest-images: "true"
platform: "linux/arm64"
python-versions: ${{ inputs.python-versions }}
branch: ${{ inputs.branch }}
constraints-branch: ${{ inputs.constraints-branch }}
use-uv: "true"
include-success-outputs: ${{ inputs.include-success-outputs }}
docker-cache: ${{ inputs.docker-cache }}
if: inputs.canary-run == 'true'
# push-buildx-cache-to-github-registry-arm:
# name: Push Regular ARM Image Cache
# needs: [update-constraints]
# uses: ./.github/workflows/push-image-cache.yml
# permissions:
# contents: read
# packages: write
# secrets: inherit
# with:
# runs-on-as-json-public: ${{ inputs.runs-on-as-json-public }}
# runs-on-as-json-self-hosted: ${{ inputs.runs-on-as-json-self-hosted }}
# cache-type: "Regular ARM"
# include-prod-images: "true"
# push-latest-images: "true"
# platform: "linux/arm64"
# python-versions: ${{ inputs.python-versions }}
# branch: ${{ inputs.branch }}
# constraints-branch: ${{ inputs.constraints-branch }}
# use-uv: "true"
# include-success-outputs: ${{ inputs.include-success-outputs }}
# docker-cache: ${{ inputs.docker-cache }}
# if: inputs.canary-run == 'true'

summarize-warnings:
timeout-minutes: 15
Expand Down
4 changes: 4 additions & 0 deletions dev/breeze/src/airflow_breeze/commands/ci_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,10 @@ def workflow_info(context: str) -> WorkflowInfo:
target_repo = ctx["repository"]
head_repo = ctx["repository"]
event_name = ctx["event_name"]
elif event_name == "workflow_dispatch":
target_repo = ctx["repository"]
head_repo = ctx["repository"]
event_name = ctx["event_name"]
elif event_name == "pull_request_target":
target_repo = ctx["repository"]
head_repo = ctx["repository"]
Expand Down
4 changes: 3 additions & 1 deletion dev/breeze/src/airflow_breeze/global_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
RUNS_ON_PUBLIC_RUNNER = '["ubuntu-22.04"]'
# we should get more sophisticated logic here in the future, but for now we just check if
# we use self airflow, vm-based, amd hosted runner as a default
# TODO: temporarily we need to switch to public runners to avoid issues with self-hosted runners
RUNS_ON_SELF_HOSTED_RUNNER = '["ubuntu-22.04"]'
# TODO: when we have it properly set-up with labels we should change it to
# RUNS_ON_SELF_HOSTED_RUNNER = '["self-hosted", "airflow-runner", "vm-runner", "X64"]'
RUNS_ON_SELF_HOSTED_RUNNER = '["self-hosted", "Linux", "X64"]'
# RUNS_ON_SELF_HOSTED_RUNNER = '["self-hosted", "Linux", "X64"]'
SELF_HOSTED_RUNNERS_CPU_COUNT = 8

ANSWER = ""
Expand Down

0 comments on commit 9f88b7d

Please sign in to comment.