Skip to content

Commit

Permalink
Merge branch 'apache:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
kerrydc authored Oct 5, 2023
2 parents d4caf1b + 31e1c7a commit 2164eca
Show file tree
Hide file tree
Showing 58 changed files with 1,865 additions and 925 deletions.
1 change: 1 addition & 0 deletions .github/autolabeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ python: ["sdks/python/**/*", "learning/katas/python/**/*"]
typescript: ["sdks/typescript/**/*"]
vendor: ["vendor/**/*"]
website: ["website/**/*"]
yaml: ["sdks/python/apache_beam/yaml/**"]

# Extensions
extensions: ["sdks/java/extensions/**/*", "runners/extensions-java/**/*"]
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/beam_PostCommit_Java_BigQueryEarlyRollout.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# 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: PostCommit Java BigQueryEarlyRollout

on:
issue_comment:
types: [created]
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.issue.number || github.event.pull_request.head.label || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.body || github.event.sender.login}}'
cancel-in-progress: true

#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
permissions:
actions: write
pull-requests: read
checks: write
contents: read
deployments: read
id-token: none
issues: read
discussions: read
packages: read
pages: read
repository-projects: read
security-events: read
statuses: read

env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}

jobs:
beam_PostCommit_Java_BigQueryEarlyRollout:
name: ${{matrix.job_name}} (${{matrix.job_phrase}})
runs-on: [self-hosted, ubuntu-20.04, main]
timeout-minutes: 100
strategy:
matrix:
job_name: [beam_PostCommit_Java_BigQueryEarlyRollout]
job_phrase: [Run Java BigQueryEarlyRollout PostCommit]
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule' ||
github.event.comment.body == 'Run Java BigQueryEarlyRollout PostCommit'
steps:
- uses: actions/checkout@v4
- name: Setup repository
uses: ./.github/actions/setup-action
with:
comment_phrase: ${{ matrix.job_phrase }}
github_token: ${{ secrets.GITHUB_TOKEN }}
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
- name: Authenticate on GCP
uses: google-github-actions/setup-gcloud@v0
with:
service_account_email: ${{ secrets.GCP_SA_EMAIL }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ secrets.GCP_PROJECT_ID }}
export_default_credentials: true
- name: run PostCommit Java BigQueryEarlyRollout script
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :sdks:java:io:google-cloud-platform:bigQueryEarlyRolloutIntegrationTest
- name: Archive JUnit Test Results
uses: actions/upload-artifact@v3
if: failure()
with:
name: JUnit Test Results
path: "**/build/reports/tests/"
- name: Publish JUnit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
commit: '${{ env.prsha || env.GITHUB_SHA }}'
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
files: '**/build/test-results/**/*.xml'
2 changes: 1 addition & 1 deletion .github/workflows/beam_PostCommit_Python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ env:
jobs:
beam_PostCommit_Python:
name: ${{matrix.job_name}} (${{matrix.job_phrase}} ${{matrix.python_version}})
runs-on: [self-hosted, ubuntu-20.04, highmem]
runs-on: [self-hosted, ubuntu-20.04, main]
timeout-minutes: 240
strategy:
fail-fast: false
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/beam_PostCommit_Python_Arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
name: PostCommit Python Arm

on:
# issue_comment:
# types: [created]
# schedule:
# - cron: '0 */6 * * *'
issue_comment:
types: [created]
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:

# This allows a subsequently queued workflow run to interrupt previous runs
Expand Down Expand Up @@ -81,21 +81,35 @@ jobs:
run: |
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: GCloud Docker credential helper
run: |
gcloud auth configure-docker us.gcr.io
- name: Set PY_VER_CLEAN
id: set_py_ver_clean
run: |
PY_VER=${{ matrix.python_version }}
PY_VER_CLEAN=${PY_VER//.}
echo "py_ver_clean=$PY_VER_CLEAN" >> $GITHUB_OUTPUT
- name: Generate TAG unique variable based on timestamp
id: set_tag
run: echo "TAG=$(date +'%Y%m%d-%H%M%S%N')" >> $GITHUB_OUTPUT
- name: run PostCommit Python ${{ matrix.python_version }} script
uses: ./.github/actions/gradle-command-self-hosted-action
with:
gradle-command: :sdks:python:test-suites:dataflow:py${{steps.set_py_ver_clean.outputs.py_ver_clean}}:postCommitArmIT
arguments: |
-PuseWheelDistribution \
-PpythonVersion=${{ matrix.python_version }} \
-Pcontainer-architecture-list=arm64,amd64 \
-Pdocker-repository-root=us.gcr.io/apache-beam-testing/github-actions \
-Pdocker-tag=${{ steps.set_tag.outputs.TAG }} \
-Ppush-containers \
env:
CLOUDSDK_CONFIG: ${{ env.KUBELET_GCLOUD_CONFIG_PATH}}
MULTIARCH_TAG: ${{ steps.set_tag.outputs.TAG }}
USER: github-actions
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/beam_PreCommit_CommunityMetrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ on:
push:
tags: ['v*']
branches: ['master', 'release-*']
paths: ['.test-infra/metrics/**', '.github/workflows/beam_PreCommit_CommunityMetrics.yml']
paths: ['.test-infra/metrics/**', 'buildSrc/build.gradle.kts', '.github/workflows/beam_PreCommit_CommunityMetrics.yml']
pull_request_target:
branches: ['master', 'release-*']
paths: ['.test-infra/metrics/**']
paths: ['.test-infra/metrics/**', 'buildSrc/build.gradle.kts']
issue_comment:
types: [created]
schedule:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/beam_PreCommit_Java_GCP_IO_Direct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
github.event.comment.body == 'Run Java_GCP_IO_Direct PreCommit'
runs-on: [self-hosted, ubuntu-20.04, highmem]
runs-on: [self-hosted, ubuntu-20.04, main]
steps:
- uses: actions/checkout@v4
- name: Setup repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_perf_alert_tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ on:
jobs:
python_run_change_point_analysis:
name: Run Change Point Analysis.
runs-on: ubuntu-latest
runs-on: [self-hosted, ubuntu-20.04, main]
permissions:
issues: write
steps:
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/metrics/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ task deploy {
standardOutput = stdout
}

// All images have the same tag, it doesn't matter which we choose.
// All images have the same tag, it doesn't matter which we choose.
String image = (stdout.toString().split(' ') as List)[0]
String currentImageTag = (image.split(':') as List)[1]
println "Current image tag: ${currentImageTag}"
Expand Down
17 changes: 8 additions & 9 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,19 @@ dependencies {
implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.1")
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.14")

runtimeOnly("com.google.protobuf:protobuf-gradle-plugin:0.8.13") // Enable proto code generation
runtimeOnly("com.github.davidmc24.gradle-avro-plugin:gradle-avro-plugin:0.16.0") // Enable Avro code generation
runtimeOnly("com.diffplug.spotless:spotless-plugin-gradle:5.6.1") // Enable a code formatting plugin
runtimeOnly("com.palantir.gradle.docker:gradle-docker:0.34.0") // Enable building Docker containers
runtimeOnly("gradle.plugin.com.dorongold.plugins:task-tree:1.5") // Adds a 'taskTree' task to print task dependency tree
runtimeOnly("gradle.plugin.com.github.johnrengelman:shadow:7.1.1") // Enable shading Java dependencies
runtimeOnly("com.google.protobuf:protobuf-gradle-plugin:0.8.13") // Enable proto code generation
runtimeOnly("com.github.davidmc24.gradle-avro-plugin:gradle-avro-plugin:0.16.0") // Enable Avro code generation
runtimeOnly("com.diffplug.spotless:spotless-plugin-gradle:5.6.1") // Enable a code formatting plugin
runtimeOnly("gradle.plugin.com.dorongold.plugins:task-tree:1.5") // Adds a 'taskTree' task to print task dependency tree
runtimeOnly("gradle.plugin.com.github.johnrengelman:shadow:7.1.1") // Enable shading Java dependencies
runtimeOnly("net.linguica.gradle:maven-settings-plugin:0.5")
runtimeOnly("gradle.plugin.io.pry.gradle.offline_dependencies:gradle-offline-dependencies-plugin:0.5.0") // Enable creating an offline repository
runtimeOnly("net.ltgt.gradle:gradle-errorprone-plugin:1.2.1") // Enable errorprone Java static analysis
runtimeOnly("net.ltgt.gradle:gradle-errorprone-plugin:3.1.0") // Enable errorprone Java static analysis
runtimeOnly("org.ajoberstar.grgit:grgit-gradle:4.1.1") // Enable website git publish to asf-site branch
runtimeOnly("com.avast.gradle:gradle-docker-compose-plugin:0.17.5") // Enable docker compose tasks
runtimeOnly("com.avast.gradle:gradle-docker-compose-plugin:0.16.12") // Enable docker compose tasks
runtimeOnly("ca.cutterslade.gradle:gradle-dependency-analyze:1.8.3") // Enable dep analysis
runtimeOnly("gradle.plugin.net.ossindex:ossindex-gradle-plugin:0.4.11") // Enable dep vulnerability analysis
runtimeOnly("org.checkerframework:checkerframework-gradle-plugin:0.6.33") // Enable enhanced static checking plugin
runtimeOnly("org.checkerframework:checkerframework-gradle-plugin:0.6.33") // Enable enhanced static checking plugin
}

// Because buildSrc is built and tested automatically _before_ gradle
Expand Down
Loading

0 comments on commit 2164eca

Please sign in to comment.