Skip to content

Commit

Permalink
Merge branch 'master' into issue23692_auth
Browse files Browse the repository at this point in the history
  • Loading branch information
darkhan.nausharipov committed Dec 26, 2022
2 parents 943391d + baa8910 commit dbcf032
Show file tree
Hide file tree
Showing 65 changed files with 5,262 additions and 231 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/git_tag_released_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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 generate the released version tag and push it to the repository

# To learn more about GitHub Actions in Apache Beam check the CI.md

name: Git Tag Released Version
on:
workflow_dispatch:
inputs:
VERSION_TAG:
description: Beam Final Version Tag
required: true
RC_TAG:
description: Beam RC Tag
required: true

jobs:
generate_tags:
runs-on: [self-hosted, ubuntu-20.04]
env:
VERSION_PATH: ${{ github.event.inputs.VERSION_TAG }}
steps:
- 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: Tag for Go SDK
run: |
git tag -a sdks/${{ github.event.inputs.VERSION_TAG }} -m ${{ github.event.inputs.RC_TAG }}
git push https://github.com/apache/beam sdks/${{ github.event.inputs.VERSION_TAG }}
- name: Tag for repo root
run: |
git tag -a ${{ github.event.inputs.VERSION_TAG }} -m ${{ github.event.inputs.RC_TAG }}
git push https://github.com/apache/beam ${{ github.event.inputs.VERSION_TAG }}
59 changes: 59 additions & 0 deletions .github/workflows/run_perf_alert_tool.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# 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.

# To learn more about GitHub Actions in Apache Beam check the CI.md

name: Run performance alerting tool on Python load/performance/benchmark tests.

on:
schedule:
- cron: '5 22 * * *'

jobs:
python_run_change_point_analysis:
name: Run Change Point Analysis.
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Get Apache Beam Build dependencies
working-directory: ./sdks/python
run: pip install pip setuptools --upgrade && pip install -r build-requirements.txt
- name: Install Apache Beam
working-directory: ./sdks/python
run: pip install -e .[gcp,test]
- name: Install signal-processing-algorithms
run: pip install signal-processing-algorithms
- name: Install pandas, yaml, requests
run: pip install pandas PyYAML requests
# - name: Run Change Point Analysis.
# working-directory: ./sdks/python/apache_beam/testing/analyzers
# shell: bash
# run: python analysis.py
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run change point analysis tests.
working-directory: ./sdks/python/apache_beam/testing/analyzers
shell: bash
run: pytest perf_analysis_test.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

6 changes: 6 additions & 0 deletions CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ Service Account shall have following permissions ([IAM roles](https://cloud.goog
|------------------------------|-----------------------------------------------------------------------------------------------|------------------|-----------------------|---------------|--------------------------|
| Verify Release Build | Verifies full life cycle of Gradle Build and all PostCommit/PreCommit tests against Release Branch on CI. | No | No | No | No |

#### Git tag Release Version - [git_tag_released_version.yml](.github/workflows/git_tag_released_version.yml)

| Job | Description | Pull Request Run | Direct Push/Merge Run | Scheduled Run | Requires GCP Credentials |
|---------------------------------|----------------------------------------------------------------------------------------------------------------|------------------|-----------------------|---------------|--------------------------|
| Git Tag Release Version | Create and push a new tag for the released version by copying the tag for the final release candidate. | No | No | No | No |

#### Run RC Validation - [run_rc_validation.yml](.github/workflows/run_rc_validation.yml)

| Job | Description | Pull Request Run | Direct Push/Merge Run | Scheduled Run | Requires GCP Credentials |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ class BeamModulePlugin implements Plugin<Project> {
joda_time : "joda-time:joda-time:2.10.10",
jsonassert : "org.skyscreamer:jsonassert:1.5.0",
jsr305 : "com.google.code.findbugs:jsr305:$jsr305_version",
json_org : "org.json:json", // Try to keep in sync with google_cloud_platform_libraries_bom transitive deps.
json_org : "org.json:json:20220320", // Keep in sync with everit-json-schema / google_cloud_platform_libraries_bom transitive deps.
everit_json_schema : "com.github.erosb:everit-json-schema:${everit_json_version}",
junit : "junit:junit:4.13.1",
kafka : "org.apache.kafka:kafka_2.11:$kafka_version",
Expand Down
4 changes: 2 additions & 2 deletions examples/java/cdap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ from a [CDAP plugin](https://github.com/data-integrations) and write data into .
Supported CDAP plugins:
- [ServiceNow](https://github.com/data-integrations/servicenow-plugins). More info in the ServiceNow example [README](servicenow/src/main/java/org/apache/beam/examples/complete/cdap/servicenow/README.md).
- [Salesforce](https://github.com/data-integrations/salesforce)
- [Hubspot](https://github.com/data-integrations/hubspot)
- [Zendesk](https://github.com/data-integrations/zendesk). More info in the ServiceNow example [README](zendesk/src/main/java/org/apache/beam/examples/complete/cdap/zendesk/README.md).
- [Hubspot](https://github.com/data-integrations/hubspot). More info in the Hubspot example [README](hubspot/src/main/java/org/apache/beam/examples/complete/cdap/hubspot/README.md).
- [Zendesk](https://github.com/data-integrations/zendesk). More info in the Zendesk example [README](zendesk/src/main/java/org/apache/beam/examples/complete/cdap/zendesk/README.md).
112 changes: 112 additions & 0 deletions examples/java/cdap/hubspot/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/*
* 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.
*/

import groovy.json.JsonOutput

plugins {
id 'java'
id 'org.apache.beam.module'
id 'com.github.johnrengelman.shadow'
}

applyJavaNature(
exportJavadoc: false,
automaticModuleName: 'org.apache.beam.examples.complete.cdap.hubspot',
)

description = "Apache Beam :: Examples :: Java :: CDAP :: Hubspot"
ext.summary = """Apache Beam SDK provides a simple, Java-based
interface for processing virtually any size data. This
artifact includes CDAP Hubspot Apache Beam Java SDK examples."""

/** Define the list of runners which execute a precommit test.
* Some runners are run from separate projects, see the preCommit task below
* for details.
*/
def preCommitRunners = ["directRunner", "flinkRunner"]
for (String runner : preCommitRunners) {
configurations.create(runner + "PreCommit")
}

dependencies {
implementation enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
implementation project(path: ":sdks:java:core", configuration: "shadow")
implementation project(":examples:java:cdap")
implementation project(":sdks:java:io:cdap")
implementation project(":sdks:java:io:hadoop-common")
implementation library.java.cdap_api
implementation library.java.cdap_api_commons
permitUnusedDeclared library.java.cdap_api_commons
implementation library.java.cdap_etl_api
permitUnusedDeclared library.java.cdap_etl_api
implementation library.java.cdap_etl_api_spark
permitUnusedDeclared library.java.cdap_etl_api_spark
implementation library.java.cdap_hydrator_common
//TODO: modify to 'implementation library.java.cdap_plugin_hubspot',
// when new release with HasOffset interface will be published
implementation "com.akvelon:cdap-hubspot-plugins:1.1.0"
implementation library.java.google_code_gson
implementation library.java.hadoop_common
implementation library.java.slf4j_api
implementation library.java.vendored_guava_26_0_jre
runtimeOnly project(path: ":runners:direct-java", configuration: "shadow")

// Add dependencies for the PreCommit configurations
// For each runner a project level dependency on the examples project.
for (String runner : preCommitRunners) {
delegate.add(runner + "PreCommit", project(":examples:java:cdap:hubspot"))
delegate.add(runner + "PreCommit", project(path: ":examples:java:cdap:hubspot", configuration: "testRuntimeMigration"))
}
directRunnerPreCommit project(path: ":runners:direct-java", configuration: "shadow")
flinkRunnerPreCommit project(":runners:flink:${project.ext.latestFlinkVersion}")
}

/*
* Create a ${runner}PreCommit task for each runner which runs a set
* of integration tests for WordCount and WindowedWordCount.
*/
def preCommitRunnerClass = [
directRunner: "org.apache.beam.runners.direct.DirectRunner",
flinkRunner: "org.apache.beam.runners.flink.TestFlinkRunner"
]

for (String runner : preCommitRunners) {
tasks.create(name: runner + "PreCommit", type: Test) {
def preCommitBeamTestPipelineOptions = [
"--runner=" + preCommitRunnerClass[runner],
]
classpath = configurations."${runner}PreCommit"
forkEvery 1
maxParallelForks 4
systemProperty "beamTestPipelineOptions", JsonOutput.toJson(preCommitBeamTestPipelineOptions)
}
}

/* Define a common precommit task which depends on all the individual precommits. */
task preCommit() {
for (String runner : preCommitRunners) {
dependsOn runner + "PreCommit"
}
}

task executeCdap (type:JavaExec) {
mainClass = System.getProperty("mainClass")
classpath = sourceSets.main.runtimeClasspath
systemProperties System.getProperties()
args System.getProperty("exec.args", "").split()
}
Loading

0 comments on commit dbcf032

Please sign in to comment.