Skip to content

Commit d1091cc

Browse files
authored
chore: adjust download-maven-plugin usages to reduce release flakiness (#13272)
As observed in issue #13026, the download-maven-plugin's wget goal is currently flaky in release jobs. This change - checks in test protos for gapic-generator-java instead of downloading them - adjusts the plugin configuration for showcase and non-test gapic-generator-java to skip caching to prevent parallel jobs from trying to acquire the same lock Fixes #13026
1 parent d28436c commit d1091cc

11 files changed

Lines changed: 6330 additions & 105 deletions

File tree

java-showcase/gapic-showcase/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
https://raw.githubusercontent.com/googleapis/gapic-showcase/v${gapic-showcase.version}/server/services/compliance_suite.json
6969
</url>
7070
<outputDirectory>src/test/resources</outputDirectory>
71+
<skipCache>true</skipCache>
7172
<!-- Set this to always download the latest version and overwrite the existing file -->
7273
<overwrite>true</overwrite>
7374
</configuration>

sdk-platform-java/gapic-generator-java/pom.xml

Lines changed: 2 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -137,101 +137,8 @@
137137
https://raw.githubusercontent.com/googleapis/googleapis/${googleapis.commit}/gapic/metadata/gapic_metadata.proto
138138
</url>
139139
<outputDirectory>target/generated-sources/proto</outputDirectory>
140-
</configuration>
141-
</execution>
142-
<execution>
143-
<id>download-common-resources-proto</id>
144-
<phase>generate-test-sources</phase>
145-
<goals>
146-
<goal>wget</goal>
147-
</goals>
148-
<configuration>
149-
<url>
150-
https://raw.githubusercontent.com/googleapis/googleapis/${googleapis.commit}/google/cloud/common_resources.proto
151-
</url>
152-
<outputDirectory>target/generated-test-sources/proto</outputDirectory>
153-
</configuration>
154-
</execution>
155-
<execution>
156-
<id>download-pubsub-proto</id>
157-
<phase>generate-test-sources</phase>
158-
<goals>
159-
<goal>wget</goal>
160-
</goals>
161-
<configuration>
162-
<url>
163-
https://raw.githubusercontent.com/googleapis/googleapis/${googleapis.commit}/google/pubsub/v1/pubsub.proto
164-
</url>
165-
<outputDirectory>target/generated-test-sources/proto</outputDirectory>
166-
</configuration>
167-
</execution>
168-
<execution>
169-
<id>download-schema-proto</id>
170-
<phase>generate-test-sources</phase>
171-
<goals>
172-
<goal>wget</goal>
173-
</goals>
174-
<configuration>
175-
<url>
176-
https://raw.githubusercontent.com/googleapis/googleapis/${googleapis.commit}/google/pubsub/v1/schema.proto
177-
</url>
178-
<outputDirectory>target/generated-test-sources/proto/google/pubsub/v1
179-
</outputDirectory>
180-
</configuration>
181-
</execution>
182-
<execution>
183-
<id>download-logging-proto</id>
184-
<phase>generate-test-sources</phase>
185-
<goals>
186-
<goal>wget</goal>
187-
</goals>
188-
<configuration>
189-
<url>
190-
https://raw.githubusercontent.com/googleapis/googleapis/${googleapis.commit}/google/logging/v2/logging.proto
191-
</url>
192-
<outputDirectory>target/generated-test-sources/proto</outputDirectory>
193-
</configuration>
194-
</execution>
195-
<execution>
196-
<id>download-log-entry-proto</id>
197-
<phase>generate-test-sources</phase>
198-
<goals>
199-
<goal>wget</goal>
200-
</goals>
201-
<configuration>
202-
<url>
203-
https://raw.githubusercontent.com/googleapis/googleapis/${googleapis.commit}/google/logging/v2/log_entry.proto
204-
</url>
205-
<outputDirectory>target/generated-test-sources/proto/google/logging/v2
206-
</outputDirectory>
207-
</configuration>
208-
</execution>
209-
<execution>
210-
<id>download-logging-config-proto</id>
211-
<phase>generate-test-sources</phase>
212-
<goals>
213-
<goal>wget</goal>
214-
</goals>
215-
<configuration>
216-
<url>
217-
https://raw.githubusercontent.com/googleapis/googleapis/${googleapis.commit}/google/logging/v2/logging_config.proto
218-
</url>
219-
<outputDirectory>target/generated-test-sources/proto/google/logging/v2
220-
</outputDirectory>
221-
</configuration>
222-
</execution>
223-
<execution>
224-
<id>download-logging-metrics-proto</id>
225-
<phase>generate-test-sources</phase>
226-
<goals>
227-
<goal>wget</goal>
228-
</goals>
229-
<configuration>
230-
<url>
231-
https://raw.githubusercontent.com/googleapis/googleapis/${googleapis.commit}/google/logging/v2/logging_metrics.proto
232-
</url>
233-
<outputDirectory>target/generated-test-sources/proto/google/logging/v2
234-
</outputDirectory>
140+
<skipCache>true</skipCache>
141+
<overwrite>true</overwrite>
235142
</configuration>
236143
</execution>
237144
</executions>
@@ -279,16 +186,6 @@
279186
<descriptorSetFileName>test-proto.descriptorset</descriptorSetFileName>
280187
</configuration>
281188
</execution>
282-
<execution>
283-
<id>compile-downloaded-test-protos</id>
284-
<goals>
285-
<goal>test-compile</goal>
286-
</goals>
287-
<configuration>
288-
<protoTestSourceRoot>target/generated-test-sources/proto</protoTestSourceRoot>
289-
<clearOutputDirectory>false</clearOutputDirectory>
290-
</configuration>
291-
</execution>
292189
</executions>
293190
</plugin>
294191
<plugin>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Copyright 2025 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// This file contains stub messages for common resources in GCP.
16+
// It is not intended to be directly generated, and is instead used by
17+
// other tooling to be able to match common resource patterns.
18+
syntax = "proto3";
19+
20+
package google.cloud;
21+
22+
import "google/api/resource.proto";
23+
24+
25+
option (google.api.resource_definition) = {
26+
type: "cloudresourcemanager.googleapis.com/Project"
27+
pattern: "projects/{project}"
28+
};
29+
30+
31+
option (google.api.resource_definition) = {
32+
type: "cloudresourcemanager.googleapis.com/Organization"
33+
pattern: "organizations/{organization}"
34+
};
35+
36+
37+
option (google.api.resource_definition) = {
38+
type: "cloudresourcemanager.googleapis.com/Folder"
39+
pattern: "folders/{folder}"
40+
};
41+
42+
43+
option (google.api.resource_definition) = {
44+
type: "cloudbilling.googleapis.com/BillingAccount"
45+
pattern: "billingAccounts/{billing_account}"
46+
};
47+
48+
option (google.api.resource_definition) = {
49+
type: "locations.googleapis.com/Location"
50+
pattern: "projects/{project}/locations/{location}"
51+
};
52+

0 commit comments

Comments
 (0)