Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 0 additions & 83 deletions .github/workflows/basic-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,89 +301,6 @@ jobs:
fetch-depth: 2
persist-credentials: false

upgrade-check:
timeout-minutes: 45
name: "Upgrade checks"
runs-on: ${{ fromJSON(inputs.runners) }}
env:
PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version }}"
if: inputs.canary-run == 'true'
steps:
- name: "Cleanup repo"
shell: bash
run: docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: "Install Breeze"
uses: ./.github/actions/breeze
id: breeze
- name: "Install prek"
uses: ./.github/actions/install-prek
id: prek
with:
python-version: ${{ steps.breeze.outputs.host-python-version }}
platform: ${{ inputs.platform }}
save-cache: false
- name: "Autoupdate all prek hooks"
run: prek autoupdate --cooldown-days 4 --freeze
- name: "Check if there are any changes in prek hooks"
run: |
if ! git diff --exit-code; then
echo -e "\n\033[0;31mThere are changes in prek hooks after upgrade check.\033[0m"
echo -e "\n\033[0;33mHow to fix:\033[0m Run \`breeze ci upgrade\` locally to fix it!.\n"
exit 1
fi
- name: "Run automated upgrade for chart dependencies"
run: >
prek
--all-files --show-diff-on-failure --color always --verbose
--stage manual
update-chart-dependencies
if: always()
# For UV we are not failing the upgrade installers check if it is updated because
# it is upgraded very frequently, so we want to manually upgrade it rather than
# get notified about it - until it stabilizes in 1.* version
- name: "Run automated upgrade for uv, prek (not failing - just informational)"
run: >
prek
--all-files --show-diff-on-failure --color always --verbose
--stage manual upgrade-important-versions || true
if: always()
env:
UPGRADE_FLIT: "false"
UPGRADE_GITPYTHON: "false"
UPGRADE_GOLANG: "false"
UPGRADE_HATCH: "false"
UPGRADE_HATCHLING: "false"
UPGRADE_MYPY: "false"
UPGRADE_NODE_LTS: "false"
UPGRADE_PIP: "false"
UPGRADE_PYTHON: "false"
UPGRADE_PYYAML: "false"
UPGRADE_RICH: "false"
UPGRADE_RUFF: "false"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Run automated upgrade for important versions minus uv (failing if needed)"
run: |
if ! prek \
--all-files --show-diff-on-failure --color always --verbose \
--stage manual upgrade-important-versions; then
echo -e "\n\033[0;31mThere are changes in prek hooks after upgrade check.\033[0m"
echo -e "\n\033[0;33mHow to fix:\033[0m Run \`breeze ci upgrade\` locally to fix it!.\n"
exit 1
fi
if: always()
env:
UPGRADE_UV: "false"
UPGRADE_PREK: "false"
UPGRADE_MPROCS: "false"
UPGRADE_PROTOC: "false"
UPGRADE_OPENAPI_GENERATOR: "false"
UPGRADE_COOLDOWN_DAYS: "4"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

test-airflow-release-commands:
timeout-minutes: 80
name: "Test Airflow release commands"
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/scheduled-upgrade-check-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
name: "[main] Scheduled CI upgrade check"
on: # yamllint disable-line rule:truthy
schedule:
# Mon, Wed, Fri at 06:00 UTC
- cron: '0 6 * * 1,3,5'
workflow_dispatch:
permissions:
contents: read
jobs:
upgrade-main:
name: "[main] Upgrade"
uses: ./.github/workflows/upgrade-check.yml
with:
target-branch: main
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/scheduled-upgrade-check-v3-2-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
name: "[v3-2-test] Scheduled CI upgrade check"
on: # yamllint disable-line rule:truthy
schedule:
# Tue, Thu at 06:00 UTC
- cron: '0 6 * * 2,4'
workflow_dispatch:
permissions:
contents: read
jobs:
upgrade-v3-2-test:
name: "[v3-2-test] Upgrade"
uses: ./.github/workflows/upgrade-check.yml
with:
target-branch: v3-2-test
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
125 changes: 125 additions & 0 deletions .github/workflows/upgrade-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
name: Upgrade check
on: # yamllint disable-line rule:truthy
workflow_call:
inputs:
target-branch:
description: >-
Branch to upgrade (e.g. 'main' or 'v3-2-test')
required: true
type: string
secrets:
SLACK_BOT_TOKEN:
description: "Slack bot token for notifications"
required: true
permissions:
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
TARGET_BRANCH: ${{ inputs.target-branch }}
jobs:
createupgrade-check:
timeout-minutes: 45
name: >-
[${{ inputs.target-branch }}] Upgrade checks and PR
runs-on: ["ubuntu-22.04"]
steps:
- name: >-
[${{ inputs.target-branch }}] Cleanup repo
shell: bash
run: >
docker run -v "${GITHUB_WORKSPACE}:/workspace"
-u 0:0 bash -c "rm -rf /workspace/*"
- name: >-
[${{ inputs.target-branch }}] Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ inputs.target-branch }}
fetch-depth: 0
persist-credentials: false
- name: >-
[${{ inputs.target-branch }}] Configure git credentials
run: |
git remote set-url origin \
"https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git config user.name "github-actions[bot]"
git config user.email \
"41898282+github-actions[bot]@users.noreply.github.com"
- name: >-
[${{ inputs.target-branch }}] Install Breeze
uses: ./.github/actions/breeze
id: breeze
- name: >-
[${{ inputs.target-branch }}] Install prek
uses: ./.github/actions/install-prek
id: prek
with:
python-version: >-
${{ steps.breeze.outputs.host-python-version }}
platform: "linux/amd64"
save-cache: false
- name: >-
[${{ inputs.target-branch }}] Run breeze ci upgrade
run: >
breeze ci upgrade
--target-branch "${TARGET_BRANCH}"
--create-pr
--draft
--switch-to-base
--no-k8s-schema-sync
--answer yes
- name: >-
[${{ inputs.target-branch }}] Find upgrade PR
id: find-pr
run: |
PR_URL=$(gh pr list \
--repo "${GITHUB_REPOSITORY}" \
--head "ci-upgrade-${TARGET_BRANCH}" \
--base "${TARGET_BRANCH}" \
--state open \
--json url \
--jq '.[0].url' 2>/dev/null || true)
echo "pr-url=${PR_URL}" >> "${GITHUB_OUTPUT}"
- name: >-
[${{ inputs.target-branch }}] Notify Slack
if: steps.find-pr.outputs.pr-url != ''
uses: >-
slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95
with:
method: chat.postMessage
token: ${{ env.SLACK_BOT_TOKEN }}
payload: |
channel: "internal-airflow-ci-cd"
text: >-
🔧 [${{ inputs.target-branch }}] CI upgrade PR
ready for review. Please undraft, review and
merge: ${{ steps.find-pr.outputs.pr-url }}
blocks:
- type: section
text:
type: mrkdwn
text: >-
🔧 *[${{ inputs.target-branch }}] CI upgrade
PR ready for review*

Please undraft, review and merge:
<${{ steps.find-pr.outputs.pr-url }}|View PR>
Loading
Loading