This is an automated email from the ASF dual-hosted git repository. ephraimanierobi pushed a commit to branch v2-6-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 3dbc88b8ca3cec8279afc6c3e7a73e90be3dbaf9 Author: Ephraim Anierobi <[email protected]> AuthorDate: Mon Apr 17 13:13:05 2023 +0100 Update the release note (#30680) * Update the release note During the beta release, I observed some minor things that need fixing. Here's the PR * Use local import (cherry picked from commit 2557c07aa5852d415a647679180d4dbf81a5d670) --- .pre-commit-config.yaml | 2 +- dev/airflow-github | 4 +++- dev/breeze/README.md | 2 +- dev/breeze/setup.cfg | 2 +- .../airflow_breeze/commands/release_candidate_command.py | 16 ++++++++++------ 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 36e80151ee..fa7a7fd51a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -852,7 +852,7 @@ repos: ^generated/provider_dependencies.json$ require_serial: true pass_filenames: false - additional_dependencies: ['rich>=12.4.4', 'rich-click>=1.5', 'inputimeout', 'pyyaml'] + additional_dependencies: ['rich>=12.4.4', 'rich-click>=1.5', 'inputimeout', 'pyyaml', 'packaging'] - id: check-example-dags-urls name: Check that example dags url include provider versions entry: ./scripts/ci/pre_commit/pre_commit_update_example_dags_paths.py diff --git a/dev/airflow-github b/dev/airflow-github index d756f06fab..56daa6e5a2 100755 --- a/dev/airflow-github +++ b/dev/airflow-github @@ -229,7 +229,9 @@ def compare(target_version, github_token, previous_version=None, show_uncherrypi github_handler = Github(github_token) milestone_issues: list[Issue] = list( - github_handler.search_issues(f'repo:apache/airflow milestone:"Airflow {target_version}"') + github_handler.search_issues( + f'repo:apache/airflow milestone:"Airflow {target_version}" is:pull-request is:issue' + ) ) num_cherrypicked = 0 diff --git a/dev/breeze/README.md b/dev/breeze/README.md index 03345f84c6..ad0f24771d 100644 --- a/dev/breeze/README.md +++ b/dev/breeze/README.md @@ -52,6 +52,6 @@ PLEASE DO NOT MODIFY THE HASH BELOW! IT IS AUTOMATICALLY UPDATED BY PRE-COMMIT. --------------------------------------------------------------------------------------------------------- -Package config hash: 279584a15bd0cec7a270b8fb85c3a6f853abca893fd4ecb419636fc2319a75d3644bd76e773008d6e3f77440fb2651a307f974a13df32191bea2c2f471c368f2 +Package config hash: f799f7c7b42d8bb6dcee79f989d4af33b96b531bcc5c9a46002e444d8f4c4b316e7ab77f9dfd6a6b396cba8226a3cbfeb450128bd55ffa443d15139a4cc74d22 --------------------------------------------------------------------------------------------------------- diff --git a/dev/breeze/setup.cfg b/dev/breeze/setup.cfg index 7075da8b4c..4e59505678 100644 --- a/dev/breeze/setup.cfg +++ b/dev/breeze/setup.cfg @@ -59,6 +59,7 @@ install_requires = inputimeout importlib-metadata>=4.4; python_version < "3.8" jinja2 + packaging pendulum pre-commit psutil @@ -73,7 +74,6 @@ install_requires = twine wheel setuptools - jinja2 [options.packages.find] where=src diff --git a/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py b/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py index 961b642aa0..35e5405d9a 100644 --- a/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py +++ b/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py @@ -262,6 +262,8 @@ def create_issue_for_testing(version, previous_version, github_token): def remove_old_releases(version, repo_root): + if confirm_action("In beta release we do not remove old RCs. Is this a beta release?"): + return if not confirm_action("Do you want to look for old RCs to remove?"): return @@ -301,18 +303,20 @@ def remove_old_releases(version, repo_root): ) @option_answer def publish_release_candidate(version, previous_version, github_token): - if "rc" not in version: - exit("Version must contain 'rc'") - if "rc" in previous_version: - exit("Previous version must not contain 'rc'") + from packaging.version import Version + + if not Version(version).is_prerelease: + exit("--version value must be a pre-release") + if Version(previous_version).is_prerelease: + exit("--previous-version value must be a release not a pre-release") if not github_token: github_token = os.environ.get("GITHUB_TOKEN") if not github_token: console_print("GITHUB_TOKEN is not set! Issue generation will fail.") confirm_action("Do you want to continue?", abort=True) - version_suffix = version[-3:] + version_suffix = version[5:] version_branch = version[:3].replace(".", "-") - version_without_rc = version[:-3] + version_without_rc = version[:5] os.chdir(AIRFLOW_SOURCES_ROOT) airflow_repo_root = os.getcwd()
