diff --git a/.github/workflows/cut_release_branch.yml b/.github/workflows/cut_release_branch.yml new file mode 100644 index 000000000000..9ef5cd5f56f5 --- /dev/null +++ b/.github/workflows/cut_release_branch.yml @@ -0,0 +1,123 @@ +# 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. + +# This workflow will update apache beam master branch with next release version +# and cut release branch for current development version. + +# To learn more about GitHub Actions in Apache Beam check the CI.md + +name: Cut Release Branch +on: + workflow_dispatch: + inputs: + RELEASE_VERSION: + description: Beam version of current release + required: true + NEXT_VERSION: + description: Next release version + required: true + +jobs: + update_master: + runs-on: [self-hosted, ubuntu-20.04] + env: + MASTER_BRANCH: master + NEXT_RELEASE: ${{ github.event.inputs.NEXT_VERSION }} + SCRIPT_DIR: ./release/src/main/scripts + steps: + - name: Validate Next Version + run: | + if [[ $NEXT_RELEASE =~ ([0-9]\.[0-9]*\.[0-9]) ]]; then + NEXT_VERSION_IN_BASE_BRANCH=${BASH_REMATCH[1]} + fi + if [[ -z "$NEXT_VERSION_IN_BASE_BRANCH" ]]; then + echo "The input for NEXT_RELEASE does not match a valid format [0-9].[0-9].[0-9]" + exit 1 + fi + echo "NEXT_VERSION_IN_BASE_BRANCH=${NEXT_VERSION_IN_BASE_BRANCH}" >> $GITHUB_ENV + - name: Echo value + run: | + echo "NEXT_VERSION_IN_BASE_BRANCH: $NEXT_VERSION_IN_BASE_BRANCH" + - name: Check out code + uses: actions/checkout@v3 + - name: Set git config + run: | + git config user.name $GITHUB_ACTOR + git config user.email actions@"$RUNNER_NAME".local + - name: Update master branch + run: | + bash "${SCRIPT_DIR}/set_version.sh" "${NEXT_VERSION_IN_BASE_BRANCH}" + echo "==============Update master branch as following================" + git diff + echo "===============================================================" + - name: Commit and Push to master branch files with Next Version + run: | + git add buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy + git add gradle.properties + git add sdks/python/apache_beam/version.py + git add sdks/go/pkg/beam/core/core.go + git commit -m "Moving to ${NEXT_VERSION_IN_BASE_BRANCH}-SNAPSHOT on master branch." + git push origin ${MASTER_BRANCH} + + update_release_branch: + runs-on: [self-hosted, ubuntu-20.04] + env: + RELEASE: ${{ github.event.inputs.RELEASE_VERSION }} + steps: + - name: Validate Release Version + run: | + if [[ ${RELEASE} =~ ([0-9]\.[0-9]*\.[0-9]) ]]; then + RELEASE_VERSION=${BASH_REMATCH[1]} + fi + if [[ -z "$RELEASE_VERSION" ]]; then + echo "The input for RELEASE does not match a valid format [0-9].[0-9].[0-9]" + exit 1 + fi + echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV + echo "RELEASE_BRANCH=release-${RELEASE}" >> $GITHUB_ENV + - name: Echo value + run: | + echo "RELEASE_VERSION: ${RELEASE_VERSION}" + - name: Check out code + uses: actions/checkout@v3 + - name: Set git config + run: | + git config user.name $GITHUB_ACTOR + git config user.email actions@"$RUNNER_NAME".local + - name: Checkout to release branch + run: | + git checkout -b ${RELEASE_BRANCH} + echo "==================Current working branch=======================" + echo ${RELEASE_BRANCH} + echo "===============================================================" + - name: Update release version for dataflow runner + run: | + sed -i -e "s/'beam-master-.*'/'${RELEASE}'/g" \ + runners/google-cloud-dataflow-java/build.gradle + echo "===============Update release branch as following==============" + git diff + echo "===============================================================" + - name: Commit and Push to release branch + run: | + git add runners/google-cloud-dataflow-java/build.gradle + git commit -m "Set Dataflow container to release version." + git push --set-upstream origin ${RELEASE_BRANCH} + + + + + diff --git a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy index 6aa2e4859c59..f8cec4b212d5 100644 --- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy +++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy @@ -390,7 +390,7 @@ class BeamModulePlugin implements Plugin { // Automatically use the official release version if we are performing a release // otherwise append '-SNAPSHOT' - project.version = '2.44.0' + project.version = '2.45.0' if (!isRelease(project)) { project.version += '-SNAPSHOT' } diff --git a/gradle.properties b/gradle.properties index d6dd324049b8..3f53986ce100 100644 --- a/gradle.properties +++ b/gradle.properties @@ -29,8 +29,8 @@ signing.gnupg.useLegacyGpg=true # buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy. # To build a custom Beam version make sure you change it in both places, see # https://github.com/apache/beam/issues/21302. -version=2.44.0-SNAPSHOT -sdk_version=2.44.0.dev +version=2.45.0-SNAPSHOT +sdk_version=2.45.0.dev javaVersion=1.8 diff --git a/sdks/go/pkg/beam/core/core.go b/sdks/go/pkg/beam/core/core.go index bec6071baba5..8dbab406f2c4 100644 --- a/sdks/go/pkg/beam/core/core.go +++ b/sdks/go/pkg/beam/core/core.go @@ -27,5 +27,5 @@ const ( // SdkName is the human readable name of the SDK for UserAgents. SdkName = "Apache Beam SDK for Go" // SdkVersion is the current version of the SDK. - SdkVersion = "2.44.0.dev" + SdkVersion = "2.45.0.dev" ) diff --git a/sdks/python/apache_beam/version.py b/sdks/python/apache_beam/version.py index 383050895938..4d21e456ce60 100644 --- a/sdks/python/apache_beam/version.py +++ b/sdks/python/apache_beam/version.py @@ -17,4 +17,4 @@ """Apache Beam SDK version information and utilities.""" -__version__ = '2.44.0.dev' +__version__ = '2.45.0.dev' diff --git a/sdks/python/setup.py b/sdks/python/setup.py index 61858fa5d978..55bc89145a3f 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -285,7 +285,7 @@ def get_portability_package_data(): 'requests_mock>=1.7,<2.0', 'tenacity>=5.0.2,<6.0', 'pytest>=7.1.2,<8.0', - 'pytest-xdist>=2.5.0,<3', + 'pytest-xdist>=2.5.0,<4', 'pytest-timeout>=2.1.0,<3', 'scikit-learn>=0.20.0', 'sqlalchemy>=1.3,<2.0',