potiuk commented on code in PR #41443: URL: https://github.com/apache/airflow/pull/41443#discussion_r1715986674
########## .github/workflows/news-fragment.yml: ########## @@ -0,0 +1,52 @@ +# 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: CI + +on: # yamllint disable-line rule:truthy + pull_request: + types: [labeled, unlabeled, opened, reopened, synchronize] + +jobs: + check-news-fragment: + name: Check News Fragment + runs-on: ubuntu-20.04 + if: "contains(github.event.pull_request.labels.*.name, 'airflow3.0:breaking')" + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + # `towncrier check` runs `git diff --name-only origin/main...`, which + # needs a non-shallow clone. + fetch-depth: 0 + + - name: Check news fragment + run: > + if ! pipx run towncrier check + --dir . + --config newsfragments/config.toml + --compare-with origin/${{ github.base_ref }}; then + + echo "Please check + https://github.com/apache/airflow/blob/main/contributing-docs/16_contribution_workflow.rst + for guidance." + + false + + fi Review Comment: > pipx is provided by the ubuntu-20.04 image by default, that part is covered. Ah yes we just upgrade it to `python -m pip install "pipx>=1.4.1` in breeze installation script to avoid the bug with 1.4.0 about setuptools(?) breaking It I think. I think at some point of time ubuntu runner had the buggy version. > I’m trying to think of a good reason to add towncrier to breeze. The check will never work locally, so requiring towncrier there feels quite wrong. It is used by the release manager though ([Airflow core](https://github.com/apache/airflow/blob/6570c6d1bb620c6a952a16743c7168c775f6ad70/dev/README_RELEASE_AIRFLOW.md?plain=1#L275) and [Helm](https://github.com/apache/airflow/blob/6570c6d1bb620c6a952a16743c7168c775f6ad70/dev/README_RELEASE_HELM_CHART.md?plain=1#L120)); would it make sense to move the release commands into breeze release-management? Yes. I think it makes sense - I think having a single auto-upgradeable environment for all "release" commands has great benefits - i.e. absolute reproducibility - especially if those commands that release manager executes are also executed in CI (which is already happenning for all release-management subcommands of breeze) - because then you avoid the surprises that things stop working at the very moment you need it as relase manager and it adds unnecessary stress - running them in CI makes a lot of sense in this case. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
