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
svetakvsundhar authored Oct 6, 2023
2 parents e67379b + d26a782 commit 721dc4f
Show file tree
Hide file tree
Showing 806 changed files with 32,611 additions and 7,331 deletions.
1 change: 1 addition & 0 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ github:

protected_branches:
master: {}
release-2.51.0: {}
release-2.50.0: {}
release-2.49.0: {}
release-2.48.0: {}
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ body:
- label: "Component: Go SDK"
- label: "Component: Typescript SDK"
- label: "Component: IO connector"
- label: "Component: Beam YAML"
- label: "Component: Beam examples"
- label: "Component: Beam playground"
- label: "Component: Beam katas"
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/failing_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ body:
- label: "Component: Go SDK"
- label: "Component: Typescript SDK"
- label: "Component: IO connector"
- label: "Component: Beam YAML"
- label: "Component: Beam examples"
- label: "Component: Beam playground"
- label: "Component: Beam katas"
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ body:
- label: "Component: Go SDK"
- label: "Component: Typescript SDK"
- label: "Component: IO connector"
- label: "Component: Beam YAML"
- label: "Component: Beam examples"
- label: "Component: Beam playground"
- label: "Component: Beam katas"
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ body:
- label: "Component: Go SDK"
- label: "Component: Typescript SDK"
- label: "Component: IO connector"
- label: "Component: Beam YAML"
- label: "Component: Beam examples"
- label: "Component: Beam playground"
- label: "Component: Beam katas"
Expand Down
4 changes: 4 additions & 0 deletions .github/REVIEWERS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ labels:
- name: spanner
reviewers:
- nielm
- name: bigtable
reviewers:
- igorbernstein2
- mutianf
exclusionList: []
- name: Build
reviewers:
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/setup-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,5 @@ runs:
shell: bash
run: |
echo KUBELET_GCLOUD_CONFIG_PATH=/var/lib/kubelet/pods/$POD_UID/volumes/kubernetes.io~empty-dir/gcloud >> $GITHUB_ENV
- name: Setup environment
uses: ./.github/actions/setup-environment-action
Original file line number Diff line number Diff line change
Expand Up @@ -15,47 +15,42 @@
# specific language governing permissions and limitations
# under the License.

name: 'Setup environment for self-hosted runners'
description: 'Setup action to run jobs in a self-hosted runner'
name: 'Setup environment action'
description: 'Setup environment to run jobs'
inputs:
requires-py-38:
python-version:
required: false
description: 'Set as false if does not require py38 setup'
default: 'true'
requires-py-39:
description: 'Install Python version'
default: ''
java-version:
required: false
description: 'Set as false if does not require py39 setup'
default: 'true'
requires-java-8:
description: 'Install Java version'
default: ''
go-version:
required: false
description: 'Set as false if does not require java-8 setup'
default: 'true'
requires-go:
required: false
description: 'Set as false if does not require go setup'
default: 'true'
description: 'Install Go version'
default: ''

runs:
using: "composite"
steps:
- name: Install python 3.8
if: ${{ inputs.requires-py-38 == 'true' }}
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install python 3.9
if: ${{ inputs.requires-py-39 == 'true' }}
- name: Install Python
if: ${{ inputs.python-version != '' }}
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Set Java Version
if: ${{ inputs.requires-java-8 == 'true' }}
python-version: ${{ inputs.python-version }}
- name: Install Java
if: ${{ inputs.java-version != '' }}
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
- name: Set Go Version
if: ${{ inputs.requires-go == 'true' }}
java-version: ${{ inputs.java-version }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
cache-read-only: false
- name: Install Go
if: ${{ inputs.go-version != '' }}
uses: actions/setup-go@v3
with:
go-version: '1.21' # never set patch, to get latest patch releases.
go-version: ${{ inputs.go-version }} # never set patch, to get latest patch releases.
73 changes: 73 additions & 0 deletions .github/actions/setup-k8s-access/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# 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.


#Action used to trigger a failed check re-run within a PR using a comment. Add this action to your workflow with an if condition
#to check if the comment is present
#If the check is failed this will trigger it again. If its not failed a new instance of workflow will run which will not show in the status box or checks tab in the PR and can be found in the actions tab https://github.com/apache/beam/actions

name: "Setup Kuberenetes Access"
description: Sets up kuberenetes access in gcp for the current workflow
inputs:
cluster_name:
description: "Name of the cluster to be created"
required: true
default: "io-datastores"
k8s_namespace:
description: "Name of the namespace to be created"
required: true
cluster_zone:
description: "Zone of the cluster to be created"
required: true
default: "us-central1-a"


runs:
using: composite
steps:
- name: Check if inputs were provided
shell: bash
run: |
if [ -z "${{ inputs.k8s_namespace }}" ]; then
echo "Kubernetes namespace not provided"
exit 1
fi
- name: replace '_' with '-' in namespace
shell: bash
id: replace_namespace
run: |
TEST_NAMESPACE=$(echo "${{ inputs.k8s_namespace }}" | tr '_' '-' | tr '[:upper:]' '[:lower:]')
echo TEST_NAMESPACE=$TEST_NAMESPACE >> $GITHUB_OUTPUT
- name: Get the kubeconfig using gcloud
shell: bash
run: |
gcloud container clusters get-credentials ${{ inputs.cluster_name }} --zone ${{ inputs.cluster_zone }} --project apache-beam-testing
- name: Create namespace
shell: bash
run: |
kubectl create namespace ${{ steps.replace_namespace.outputs.TEST_NAMESPACE }}
- name: Set default namespace
shell: bash
run: |
kubectl config set-context --current --namespace=${{ steps.replace_namespace.outputs.TEST_NAMESPACE }}
- name: Post cleanup
uses: pyTooling/Actions/[email protected]
with:
main: echo "Post Cleanup"
post: |
echo "Post Cleanup"
kubectl delete namespace ${{ steps.replace_namespace.outputs.TEST_NAMESPACE }}
96 changes: 96 additions & 0 deletions .github/actions/test-arguments-action/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# 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: 'Set test arguments action'
description: 'Set test arguments action to run the test'
inputs:
argument-file-paths:
required: true
description: 'List of paths to files with test arguments'
default: ''
arguments:
required: false
description: 'Test arguments generated at runtime'
default: ''
test-type:
required: true
description: 'Specify if this is a "load" or "performance" test'
test-language:
required: true
description: 'Specify if this is a "java", "python" or "go" test'

runs:
using: composite
steps:
- name: Check if test-type was provided
shell: bash
run: |
if [ -z "${{ inputs.test-type }}" ]; then
echo "Test type was not provided"
exit 1
fi
- name: Check if test-language was provided
shell: bash
run: |
if [ -z "${{ inputs.test-language }}" ]; then
echo "Test language was not provided"
exit 1
fi
- name: Set common arguments
id: common_arguments
shell: bash
run: |
echo project="apache-beam-testing" >> $GITHUB_OUTPUT
echo influx_db_name="beam_test_metrics" >> $GITHUB_OUTPUT
echo influx_host="http://10.128.0.96:8086" >> $GITHUB_OUTPUT
- name: Get default ${{ inputs.test-language }} test arguments
id: default_arguments
shell: bash
run: |
DEFAULT_ARGUMENTS=""
if ${{ inputs.test-language == 'java' }}; then
DEFAULT_ARGUMENTS=$(echo "
--project=${{ steps.common_arguments.outputs.project }}
--influxDatabase=${{ steps.common_arguments.outputs.influx_db_name }}
--influxHost=${{ steps.common_arguments.outputs.influx_host }}
")
elif ${{ inputs.test-language == 'python' || inputs.test-language == 'go' }}; then
DEFAULT_ARGUMENTS=$(echo "
--project=${{ steps.common_arguments.outputs.project }}
--influx_db_name=${{ steps.common_arguments.outputs.influx_db_name }}
--influx_hostname=${{ steps.common_arguments.outputs.influx_host }}
")
fi
echo arguments=$DEFAULT_ARGUMENTS >> $GITHUB_OUTPUT
- name: Group arguments
shell: bash
run: |
PATHS=($(echo "${{ inputs.argument-file-paths }}" | tr '\n' ' '))
for index in "${!PATHS[@]}"; do
CONFIG=$(grep -v "^#.*" ${PATHS[index]})
ARGUMENTS=$(echo "${{ steps.default_arguments.outputs.arguments }} ${{ inputs.arguments }} $CONFIG" | tr '\n' ' ')
ARGUMENTS="${ARGUMENTS% }"
if ${{ inputs.test-type == 'performance' }}; then
arguments=""
read -ra args <<< "$ARGUMENTS"
for arg in "${args[@]}"; do
arguments="${arguments}\"${arg}\","
done
ARGUMENTS="${arguments%,}"
fi
echo "${{ github.job }}_test_arguments_$((index + 1))=$ARGUMENTS" >> $GITHUB_ENV
done
2 changes: 2 additions & 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 Expand Up @@ -68,6 +69,7 @@ io: ["sdks/go/pkg/beam/io/**/*", "sdks/java/io/**/*", "sdks/python/apache_beam/
"redis": ["sdks/java/io/redis/**/*"]
"solr": ["sdks/java/io/solr/**/*"]
"spanner": ["sdks/go/pkg/beam/io/spannerio/**/*", "sdks/python/apache_beam/io/gcp/spanner.py", "sdks/python/apache_beam/io/gcp/experimental/spannerio.py", "sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/**/*"]
"bigtable": ["sdks/go/pkg/beam/io/bigtableio/**/*", "sdks/go/pkg/beam/io/xlang/bigtableio/**/*", "sdks/python/apache_beam/io/gcp/bigtableio.py", "sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/**/*"]
"synthetic": ["sdks/java/io/synthetic/**/*"]
"tests": ["sdks/java/io/file-based-io-tests/**/*"]
"thrift": ["sdks/java/io/thrift/**/*"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ deploy_webhook = "true"
runner_group = "beam"
main_runner = {
name = "main-runner"
runner_image = "us-central1-docker.pkg.dev/apache-beam-testing/beam-github-actions/beam-arc-runner:60d397ecfbd2b10a1929615c70d500eb71a2c053"
runner_image = "us-central1-docker.pkg.dev/apache-beam-testing/beam-github-actions/beam-arc-runner:2b20e26bb3b99d8e4f41a3d1d9d2e7080043de5c"
machine_type = "e2-standard-16"
min_node_count = "1"
max_node_count = "24"
Expand All @@ -47,7 +47,7 @@ main_runner = {
additional_runner_pools = [{
name = "small-runner"
machine_type = "e2-standard-2"
runner_image = "us-central1-docker.pkg.dev/apache-beam-testing/beam-github-actions/beam-arc-runner:60d397ecfbd2b10a1929615c70d500eb71a2c053"
runner_image = "us-central1-docker.pkg.dev/apache-beam-testing/beam-github-actions/beam-arc-runner:2b20e26bb3b99d8e4f41a3d1d9d2e7080043de5c"
min_node_count = "1"
max_node_count = "10"
min_replicas = "1"
Expand All @@ -64,7 +64,7 @@ additional_runner_pools = [{
{
name = "highmem-runner"
machine_type = "c3-highmem-8"
runner_image = "us-central1-docker.pkg.dev/apache-beam-testing/beam-github-actions/beam-arc-runner:60d397ecfbd2b10a1929615c70d500eb71a2c053"
runner_image = "us-central1-docker.pkg.dev/apache-beam-testing/beam-github-actions/beam-arc-runner:2b20e26bb3b99d8e4f41a3d1d9d2e7080043de5c"
min_node_count = "1"
max_node_count = "10"
min_replicas = "1"
Expand Down
8 changes: 7 additions & 1 deletion .github/gh-actions-self-hosted-runners/arc/images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,15 @@ RUN curl -OL https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-c
rm google-cloud-sdk-367.0.0-linux-x86_64.tar.gz && \
mv google-cloud-sdk /usr/local/google-cloud-sdk && \
/usr/local/google-cloud-sdk/install.sh --quiet && \
/usr/local/google-cloud-sdk/bin/gcloud components install kubectl && \
/usr/local/google-cloud-sdk/bin/gcloud components install gke-gcloud-auth-plugin && \
#revert permission
chown -R runner:runner /home/runner/.config
ENV USE_GKE_GCLOUD_AUTH_PLUGIN=True
ENV PATH="${PATH}:/usr/local/google-cloud-sdk/bin"
#Install Kubectl
RUN curl -OL https://dl.k8s.io/release/v1.28.1/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin/kubectl
#Install Apache Maven
RUN curl -OL https://dlcdn.apache.org/maven/maven-3/3.9.4/binaries/apache-maven-3.9.4-bin.tar.gz && \
tar -xvf apache-maven-3.9.4-bin.tar.gz && \
Expand All @@ -73,4 +78,5 @@ ENV MAVEN_HOME="/usr/local/maven"

# Needed to transfer path addtitions to runner environment
RUN echo PATH=$PATH >> /runnertmp/.env
RUN echo USE_GKE_GCLOUD_AUTH_PLUGIN=$USE_GKE_GCLOUD_AUTH_PLUGIN >> /runnertmp/.env
USER runner
2 changes: 2 additions & 0 deletions .github/issue-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ rules:
addLabels: ['typescript']
- contains: '[x] Component: IO'
addLabels: ['io']
- contains: '[x] Component: Beam YAML'
addLabels: ['yaml']
- contains: '[x] Component: Beam examples'
addLabels: ['examples']
- contains: '[x] Component: Beam playground'
Expand Down
Loading

0 comments on commit 721dc4f

Please sign in to comment.