forked from apache/beam
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into issue23692_auth
- Loading branch information
Showing
65 changed files
with
5,262 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} |
Oops, something went wrong.