Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/workflows/beam_PreCommit_Spotless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ jobs:
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
- name: Setup environment
uses: ./.github/actions/setup-environment-action
with:
java-version: '17'
- name: run Spotless PreCommit script
uses: ./.github/actions/gradle-command-self-hosted-action
with:
Expand Down
3 changes: 2 additions & 1 deletion .test-infra/metrics/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ dependencies {
task testMetricsStack {
doLast {
// TODO(BEAM-5837): Add some actual validation of the metrics stack
println "Hello world!" }
println "Hello world!"
}
}

// Create an empty file and set DOCKER_CONFIG to ignore bad config file on Jenkins nodes. BEAM-7405
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public interface EchoRequestOrBuilder
* @return The id.
*/
java.lang.String getId();

/**
* <code>string id = 1 [json_name = "id"];</code>
*
Expand All @@ -68,6 +69,7 @@ public interface EchoRequestOrBuilder
*/
com.google.protobuf.ByteString getPayload();
}

/**
*
*
Expand All @@ -82,6 +84,7 @@ public static final class EchoRequest extends com.google.protobuf.GeneratedMessa
// @@protoc_insertion_point(message_implements:proto.echo.v1.EchoRequest)
EchoRequestOrBuilder {
private static final long serialVersionUID = 0L;

// Use EchoRequest.newBuilder() to construct.
private EchoRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
Expand Down Expand Up @@ -122,6 +125,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {

@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";

/**
* <code>string id = 1 [json_name = "id"];</code>
*
Expand All @@ -139,6 +143,7 @@ public java.lang.String getId() {
return s;
}
}

/**
* <code>string id = 1 [json_name = "id"];</code>
*
Expand All @@ -159,6 +164,7 @@ public com.google.protobuf.ByteString getIdBytes() {

public static final int PAYLOAD_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;

/**
* <code>bytes payload = 2 [json_name = "payload"];</code>
*
Expand Down Expand Up @@ -339,6 +345,7 @@ protected Builder newBuilderForType(
Builder builder = new Builder(parent);
return builder;
}

/**
*
*
Expand Down Expand Up @@ -542,6 +549,7 @@ public Builder mergeFrom(
private int bitField0_;

private java.lang.Object id_ = "";

/**
* <code>string id = 1 [json_name = "id"];</code>
*
Expand All @@ -558,6 +566,7 @@ public java.lang.String getId() {
return (java.lang.String) ref;
}
}

/**
* <code>string id = 1 [json_name = "id"];</code>
*
Expand All @@ -574,6 +583,7 @@ public com.google.protobuf.ByteString getIdBytes() {
return (com.google.protobuf.ByteString) ref;
}
}

/**
* <code>string id = 1 [json_name = "id"];</code>
*
Expand All @@ -589,6 +599,7 @@ public Builder setId(java.lang.String value) {
onChanged();
return this;
}

/**
* <code>string id = 1 [json_name = "id"];</code>
*
Expand All @@ -600,6 +611,7 @@ public Builder clearId() {
onChanged();
return this;
}

/**
* <code>string id = 1 [json_name = "id"];</code>
*
Expand All @@ -618,6 +630,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) {
}

private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;

/**
* <code>bytes payload = 2 [json_name = "payload"];</code>
*
Expand All @@ -627,6 +640,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) {
public com.google.protobuf.ByteString getPayload() {
return payload_;
}

/**
* <code>bytes payload = 2 [json_name = "payload"];</code>
*
Expand All @@ -642,6 +656,7 @@ public Builder setPayload(com.google.protobuf.ByteString value) {
onChanged();
return this;
}

/**
* <code>bytes payload = 2 [json_name = "payload"];</code>
*
Expand Down Expand Up @@ -730,6 +745,7 @@ public interface EchoResponseOrBuilder
* @return The id.
*/
java.lang.String getId();

/**
* <code>string id = 1 [json_name = "id"];</code>
*
Expand All @@ -744,6 +760,7 @@ public interface EchoResponseOrBuilder
*/
com.google.protobuf.ByteString getPayload();
}

/**
*
*
Expand All @@ -758,6 +775,7 @@ public static final class EchoResponse extends com.google.protobuf.GeneratedMess
// @@protoc_insertion_point(message_implements:proto.echo.v1.EchoResponse)
EchoResponseOrBuilder {
private static final long serialVersionUID = 0L;

// Use EchoResponse.newBuilder() to construct.
private EchoResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
Expand Down Expand Up @@ -798,6 +816,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {

@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";

/**
* <code>string id = 1 [json_name = "id"];</code>
*
Expand All @@ -815,6 +834,7 @@ public java.lang.String getId() {
return s;
}
}

/**
* <code>string id = 1 [json_name = "id"];</code>
*
Expand All @@ -835,6 +855,7 @@ public com.google.protobuf.ByteString getIdBytes() {

public static final int PAYLOAD_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;

/**
* <code>bytes payload = 2 [json_name = "payload"];</code>
*
Expand Down Expand Up @@ -1015,6 +1036,7 @@ protected Builder newBuilderForType(
Builder builder = new Builder(parent);
return builder;
}

/**
*
*
Expand Down Expand Up @@ -1218,6 +1240,7 @@ public Builder mergeFrom(
private int bitField0_;

private java.lang.Object id_ = "";

/**
* <code>string id = 1 [json_name = "id"];</code>
*
Expand All @@ -1234,6 +1257,7 @@ public java.lang.String getId() {
return (java.lang.String) ref;
}
}

/**
* <code>string id = 1 [json_name = "id"];</code>
*
Expand All @@ -1250,6 +1274,7 @@ public com.google.protobuf.ByteString getIdBytes() {
return (com.google.protobuf.ByteString) ref;
}
}

/**
* <code>string id = 1 [json_name = "id"];</code>
*
Expand All @@ -1265,6 +1290,7 @@ public Builder setId(java.lang.String value) {
onChanged();
return this;
}

/**
* <code>string id = 1 [json_name = "id"];</code>
*
Expand All @@ -1276,6 +1302,7 @@ public Builder clearId() {
onChanged();
return this;
}

/**
* <code>string id = 1 [json_name = "id"];</code>
*
Expand All @@ -1294,6 +1321,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) {
}

private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;

/**
* <code>bytes payload = 2 [json_name = "payload"];</code>
*
Expand All @@ -1303,6 +1331,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) {
public com.google.protobuf.ByteString getPayload() {
return payload_;
}

/**
* <code>bytes payload = 2 [json_name = "payload"];</code>
*
Expand All @@ -1318,6 +1347,7 @@ public Builder setPayload(com.google.protobuf.ByteString value) {
onChanged();
return this;
}

/**
* <code>bytes payload = 2 [json_name = "payload"];</code>
*
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
plugins {
`java-gradle-plugin`
groovy
id("com.diffplug.spotless") version "5.6.1"
id("com.diffplug.spotless") version "7.2.1"
}

// Define the set of repositories required to fetch and enable plugins.
Expand Down Expand Up @@ -49,7 +49,7 @@ dependencies {

runtimeOnly("com.google.protobuf:protobuf-gradle-plugin:0.8.13") // Enable proto code generation
runtimeOnly("com.github.davidmc24.gradle.plugin:gradle-avro-plugin:1.9.1") // Enable Avro code generation. Version 1.1.0 is the last supporting avro 1.10.2
runtimeOnly("com.diffplug.spotless:spotless-plugin-gradle:5.6.1") // Enable a code formatting plugin
runtimeOnly("com.diffplug.spotless:spotless-plugin-gradle:7.2.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("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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ class BeamDockerPlugin implements Plugin<Project> {
[
tagName: tagName,
tagTask: {
-> tagName }
-> tagName
}
]
]
}
Expand All @@ -201,7 +202,8 @@ class BeamDockerPlugin implements Plugin<Project> {
tags[taskName] = [
tagName: unresolvedTagName,
tagTask: {
-> computeName(ext.name, unresolvedTagName) }
-> computeName(ext.name, unresolvedTagName)
}
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1157,16 +1157,16 @@ class BeamModulePlugin implements Plugin<Project> {
// If compiled on older SDK, compile with JDK configured with compatible javaXXHome
// The order is intended here
if (requireJavaVersion.compareTo(JavaVersion.VERSION_11) <= 0 &&
project.hasProperty('java11Home')) {
project.hasProperty('java11Home')) {
forkJavaVersion = '11'
} else if (requireJavaVersion.compareTo(JavaVersion.VERSION_17) <= 0 &&
project.hasProperty('java17Home')) {
project.hasProperty('java17Home')) {
forkJavaVersion = '17'
} else if (requireJavaVersion.compareTo(JavaVersion.VERSION_21) <= 0 &&
project.hasProperty('java21Home')) {
project.hasProperty('java21Home')) {
forkJavaVersion = '21'
} else if (requireJavaVersion.compareTo(JavaVersion.VERSION_25) <= 0 &&
project.hasProperty('java25Home')) {
project.hasProperty('java25Home')) {
forkJavaVersion = '25'
} else {
logger.config("Module ${project.name} disabled. To enable, either " +
Expand Down Expand Up @@ -1459,7 +1459,7 @@ class BeamModulePlugin implements Plugin<Project> {
enforceCheck !disableSpotlessCheck
java {
licenseHeader javaLicenseHeader
googleJavaFormat('1.7')
googleJavaFormat('1.17.0')
target project.fileTree(project.projectDir) {
include 'src/*/java/**/*.java'
exclude '**/DefaultPackageTest.java'
Expand Down Expand Up @@ -1589,6 +1589,8 @@ class BeamModulePlugin implements Plugin<Project> {
project.tasks.withType(JavaCompile).configureEach {
// we configure the Java compiler to use UTF-8.
options.encoding = "UTF-8"
options.fork = true
options.forkOptions.memoryMaximumSize = '4g'
// If compiled on newer JDK, set byte code compatibility
if (requireJavaVersion.compareTo(JavaVersion.current()) < 0) {
def compatVersion = project.javaVersion == '11' ? '11' : project.javaVersion
Expand Down Expand Up @@ -2076,7 +2078,8 @@ class BeamModulePlugin implements Plugin<Project> {
} else {
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
if (it.version != null) { // bom-managed artifacts do not have their versions
if (it.version != null) {
// bom-managed artifacts do not have their versions
dependencyNode.appendNode('version', it.version)
}
dependencyNode.appendNode('scope', param.scope)
Expand Down Expand Up @@ -2443,7 +2446,8 @@ class BeamModulePlugin implements Plugin<Project> {
project.protobuf {
protoc {
// The artifact spec for the Protobuf Compiler
artifact = "com.google.protobuf:protoc:$protobuf_version" }
artifact = "com.google.protobuf:protoc:$protobuf_version"
}

// Configure the codegen plugins
plugins {
Expand Down Expand Up @@ -2525,7 +2529,8 @@ class BeamModulePlugin implements Plugin<Project> {
project.protobuf {
protoc {
// The artifact spec for the Protobuf Compiler
artifact = "com.google.protobuf:protoc:${GrpcVendoring_1_69_0.protobuf_version}" }
artifact = "com.google.protobuf:protoc:${GrpcVendoring_1_69_0.protobuf_version}"
}

// Configure the codegen plugins
plugins {
Expand Down Expand Up @@ -2722,7 +2727,8 @@ class BeamModulePlugin implements Plugin<Project> {
doLast {
def beamPythonTestPipelineOptions = [
"pipeline_opts": config.pythonPipelineOptions + (usesDataflowRunner ? [
"--sdk_location=${project.ext.sdkLocation}"]
"--sdk_location=${project.ext.sdkLocation}"
]
: []),
"test_opts": config.pytestOptions,
"suite": config.name,
Expand Down Expand Up @@ -3012,7 +3018,8 @@ class BeamModulePlugin implements Plugin<Project> {
doLast {
def beamPythonTestPipelineOptions = [
"pipeline_opts": config.pythonPipelineOptions + (usesDataflowRunner ? [
"--sdk_location=${project.ext.sdkLocation}"]
"--sdk_location=${project.ext.sdkLocation}"
]
: []),
"test_opts": config.pytestOptions,
"suite": config.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public void processElement(ProcessContext c) throws Exception {
c.output("Processed: " + element);
}
}

// [END RateLimiterSimpleJava]

public static void main(String[] args) {
Expand Down
Loading
Loading