Skip to content

Commit

Permalink
Merge branch 'master' into no-native-bq-read
Browse files Browse the repository at this point in the history
  • Loading branch information
robertwb committed Oct 10, 2022
2 parents 08d2b38 + 0e61b02 commit bbf3b81
Show file tree
Hide file tree
Showing 190 changed files with 5,027 additions and 959 deletions.
4 changes: 4 additions & 0 deletions .github/actions/gradle-command-self-hosted-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,9 @@ runs:
- name: Run Gradle Command
shell: bash
run: |
# Removing settings.xml is a workaround to avoid a decryption issue
# of Beam's gradle-command-action plugin and github's provided
# maven settings.xml file
rm ~/.m2/settings.xml
./gradlew ${{ inputs.gradle-command }} --max-workers=${{ inputs.max-workers }} ${{ inputs.arguments }} \
${{ inputs.default-arguments }}
7 changes: 0 additions & 7 deletions .github/actions/setup-self-hosted-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,3 @@ runs:
uses: actions/setup-go@v3
with:
go-version: '1.18.0'
- name: Remove default github maven configuration
if: ${{ inputs.requires-java-8 == 'true' }}
# This step is a workaround to avoid a decryption issue of Beam's
# gradle-command-action plugin and github's provided maven
# settings.xml file
shell: bash
run: rm ~/.m2/settings.xml
6 changes: 6 additions & 0 deletions .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ on:

jobs:
cancel-duplicate-workflow-runs:
permissions:
actions: write
checks: read
contents: read
issues: write
pull-requests: write
name: "Cancel duplicate workflow runs"
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/issue-tagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ on:

jobs:
label:

runs-on: ubuntu-latest

permissions:
issues: write
steps:
- uses: actions/checkout@v3
- uses: damccorm/tag-ur-it@6fa72bbf1a2ea157b533d7e7abeafdb5855dbea5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: "./.github/issue-rules.yml"
configuration-path: "./.github/issue-rules.yml"
6 changes: 6 additions & 0 deletions .github/workflows/pr-bot-new-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ on:

jobs:
process-prs:
permissions:
contents: write
pull-requests: write
checks: read
issues: read
statuses: read
# Don't run on forks
if: github.repository == 'apache/beam'
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pr-bot-prs-needing-attention.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ on:

jobs:
process-prs:
permissions:
contents: write
pull-requests: write
checks: read
issues: read
statuses: read
# Don't run on forks
if: github.repository == 'apache/beam'
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pr-bot-update-reviewers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ on:

jobs:
update-reviewers:
permissions:
contents: write
pull-requests: write
checks: read
issues: read
statuses: read
# Don't run on forks
if: github.repository == 'apache/beam'
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/self-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ on:

jobs:
assign:
permissions:
issues: write
name: Take or close an issue
if: ${{ !github.event.issue.pull_request }}
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
pull-requests: write

steps:
- uses: actions/stale@v5
- uses: actions/stale@v6
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: 'This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions.'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/triaged-on-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ on:

jobs:
assign:
permissions:
issues: write
name: Mark issue as triaged when assigned
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,13 @@ website/www/yarn-error.log
**/node_modules

# Dart/Flutter
**/.dart_tool
**/.packages
**/.flutter-plugins
**/.flutter-plugins-dependencies
**/.dart_tool
**/generated_plugin_registrant.dart
**/*.g.dart
**/*.mocks.dart
**/.packages

# Ignore Beam Playground Terraform
**/.terraform
Expand Down
8 changes: 7 additions & 1 deletion .test-infra/jenkins/job_Java_Jmh.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ CronJobBuilder.cronJob('beam_Java_Jmh', 'H 0 * * 0', this) {

gradle {
rootBuildScriptDir(commonJobProperties.checkoutDir)
tasks(':javaJmh')
tasks(':sdks:java:harness:jmh:jmh')
commonJobProperties.setGradleSwitches(delegate)
}

gradle {
rootBuildScriptDir(commonJobProperties.checkoutDir)
tasks(':sdks:java:core:jmh:jmh')
commonJobProperties.setGradleSwitches(delegate)
}
}
Expand Down
2 changes: 1 addition & 1 deletion .test-infra/jenkins/job_Release_NightlySnapshot.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ job('beam_Release_NightlySnapshot') {
}
/*
* Skipping verification on 'ubuntu' labelled nodes since they don't have access to the
* some required GCP resouces.
* some required GCP resources.
* TODO: Uncomment this after we publishing snapshots on 'beam' nodes.
gradle {
rootBuildScriptDir(commonJobProperties.checkoutDir)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,6 @@
},
"timezone": "",
"title": "Python ML RunInference Benchmarks",
"uid": "1cnwVDkGk",
"version": 47
"uid": "ZpS8Uf44z",
"version": 1
}
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
* Fixed bug when using SpannerIO with RuntimeValueProvider options (Java) ([#22146](https://github.com/apache/beam/issues/22146)).
* Fixed issue for unicode rendering on WriteToBigQuery ([#10785](https://github.com/apache/beam/issues/10785))
* Remove obsolete variant of BigQuery Read ([#23559](https://github.com/apache/beam/issues/23559)).
* Bumped google-cloud-spanner dependency version to 3.x for Python SDK ([#21198](https://github.com/apache/beam/issues/21198)).

## New Features / Improvements

Expand All @@ -79,6 +80,8 @@
## Bugfixes

* Fixed X (Java/Python) ([#X](https://github.com/apache/beam/issues/X)).
* Fixed Python cross-language JDBC IO Connector cannot read or write rows containing Numeric/Decimal type values ([#19817](https://github.com/apache/beam/issues/19817)).

## Known Issues

* ([#X](https://github.com/apache/beam/issues/X)).
Expand Down
5 changes: 0 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,6 @@ tasks.register("javaHadoopVersionsTest") {
dependsOn(":runners:spark:3:hadoopVersionsTest")
}

tasks.register("javaJmh"){
dependsOn(":sdks:java:harness:jmh:jmh")
dependsOn(":sdks:java:core:jmh:jmh")
}

tasks.register("sqlPostCommit") {
dependsOn(":sdks:java:extensions:sql:postCommit")
dependsOn(":sdks:java:extensions:sql:jdbc:postCommit")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,15 +464,15 @@ class BeamModulePlugin implements Plugin<Project> {
def classgraph_version = "4.8.104"
def errorprone_version = "2.10.0"
// Try to keep gax_version consistent with gax-grpc version in google_cloud_platform_libraries_bom
def gax_version = "2.18.7"
def gax_version = "2.19.2"
def google_clients_version = "2.0.0"
def google_cloud_bigdataoss_version = "2.2.8"
// Try to keep google_cloud_spanner_version consistent with google_cloud_spanner_bom in google_cloud_platform_libraries_bom
def google_cloud_spanner_version = "6.29.0"
def google_cloud_spanner_version = "6.31.2"
def google_code_gson_version = "2.9.1"
def google_oauth_clients_version = "1.34.1"
// Try to keep grpc_version consistent with gRPC version in google_cloud_platform_libraries_bom
def grpc_version = "1.48.0"
def grpc_version = "1.49.2"
def guava_version = "31.1-jre"
def hadoop_version = "2.10.2"
def hamcrest_version = "2.1"
Expand All @@ -488,7 +488,7 @@ class BeamModulePlugin implements Plugin<Project> {
def postgres_version = "42.2.16"
def powermock_version = "2.0.9"
// Try to keep protobuf_version consistent with the protobuf version in google_cloud_platform_libraries_bom
def protobuf_version = "3.21.4"
def protobuf_version = "3.21.7"
def quickcheck_version = "1.0"
def sbe_tool_version = "1.25.1"
def slf4j_version = "1.7.30"
Expand Down Expand Up @@ -600,7 +600,7 @@ class BeamModulePlugin implements Plugin<Project> {
// The GCP Libraries BOM dashboard shows the versions set by the BOM:
// https://storage.googleapis.com/cloud-opensource-java-dashboard/com.google.cloud/libraries-bom/25.2.0/artifact_details.html
// Update libraries-bom version on sdks/java/container/license_scripts/dep_urls_java.yaml
google_cloud_platform_libraries_bom : "com.google.cloud:libraries-bom:26.1.1",
google_cloud_platform_libraries_bom : "com.google.cloud:libraries-bom:26.1.3",
google_cloud_spanner : "com.google.cloud:google-cloud-spanner", // google_cloud_platform_libraries_bom sets version
google_cloud_spanner_test : "com.google.cloud:google-cloud-spanner:$google_cloud_spanner_version:tests",
google_code_gson : "com.google.code.gson:gson:$google_code_gson_version",
Expand Down
994 changes: 994 additions & 0 deletions examples/notebooks/beam-ml/run_inference_multi_model.ipynb

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions learning/tour-of-beam/backend/internal/entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ type Unit struct {
Hints []string `json:"hints,omitempty"`
TaskSnippetId string `json:"taskSnippetId,omitempty"`
SolutionSnippetId string `json:"solutionSnippetId,omitempty"`
TaskName string `json:"-"`
SolutionName string `json:"-"`

// optional, user-specific
UserSnippetId string `json:"userSnippetId,omitempty"`
Expand All @@ -50,6 +48,7 @@ const (
)

type Group struct {
Id string `json:"id"`
Title string `json:"title"`
Nodes []Node `json:"nodes"`
}
Expand Down
27 changes: 22 additions & 5 deletions learning/tour-of-beam/backend/internal/fs_content/builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,36 @@
package fs_content

import (
"fmt"

tob "beam.apache.org/learning/tour-of-beam/backend/internal"
)

const OriginTbExamples = "TB_EXAMPLES"

// Construct example/snippet_id from (sdk, name)
// according to the convention defined
// in Playground datastore
func makeTbSnippetId(sdk tob.Sdk, name string) string {
// leave blank if not defined
if name == "" {
return ""
}
return fmt.Sprintf("%s_%s_%s", OriginTbExamples, sdk.StorageID(), name)
}

type UnitBuilder struct {
tob.Unit
}

func NewUnitBuilder(info learningUnitInfo) UnitBuilder {
func NewUnitBuilder(info learningUnitInfo, sdk tob.Sdk) UnitBuilder {
taskSnippetId := makeTbSnippetId(sdk, info.TaskName)
solutionSnippetId := makeTbSnippetId(sdk, info.SolutionName)
return UnitBuilder{tob.Unit{
Id: info.Id,
Title: info.Name,
TaskName: info.TaskName,
SolutionName: info.SolutionName,
Id: info.Id,
Title: info.Name,
TaskSnippetId: taskSnippetId,
SolutionSnippetId: solutionSnippetId,
}}
}

Expand Down
Loading

0 comments on commit bbf3b81

Please sign in to comment.