Skip to content

Commit 3257df6

Browse files
dependabot[bot]dvoet
andauthoredJan 13, 2025
[CORE-69]: Bump com.diffplug.spotless:spotless-plugin-gradle from 6.25.0 to 7.0.1 (#1821)
* [CORE-69]: Bump com.diffplug.spotless:spotless-plugin-gradle Bumps [com.diffplug.spotless:spotless-plugin-gradle](https://github.com/diffplug/spotless) from 6.25.0 to 7.0.1. - [Release notes](https://github.com/diffplug/spotless/releases) - [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md) - [Commits](diffplug/spotless@gradle/6.25.0...gradle/7.0.1) --- updated-dependencies: - dependency-name: com.diffplug.spotless:spotless-plugin-gradle dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * spotless --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Douglas Voet <dvoet@users.noreply.github.com>
1 parent ca4ea0b commit 3257df6

File tree

7 files changed

+44
-31
lines changed

7 files changed

+44
-31
lines changed
 

‎azureDatabaseUtils/src/main/java/bio/terra/workspace/azureDatabaseUtils/database/DatabaseDao.java

+17-6
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ public boolean createRole(String roleName) {
7474
jdbcTemplate.update(
7575
"""
7676
CREATE ROLE "%s"
77-
""".formatted(roleName), Map.of());
77+
"""
78+
.formatted(roleName),
79+
Map.of());
7880
return true;
7981
} catch (BadSqlGrammarException e) {
8082
// ignore if the role already exists
@@ -97,7 +99,9 @@ public boolean deleteRole(String roleName) {
9799
jdbcTemplate.update(
98100
"""
99101
DROP ROLE "%s"
100-
""".formatted(roleName), Map.of());
102+
"""
103+
.formatted(roleName),
104+
Map.of());
101105
return true;
102106
} catch (BadSqlGrammarException e) {
103107
// ignore if the role already deleted
@@ -114,14 +118,17 @@ public void grantRole(String roleName, String targetRoleName) {
114118
jdbcTemplate.update(
115119
"""
116120
GRANT "%s" TO "%s"
117-
""".formatted(targetRoleName, roleName), Map.of());
121+
"""
122+
.formatted(targetRoleName, roleName),
123+
Map.of());
118124
}
119125

120126
public void reassignOwner(String roleName, String targetRoleName) {
121127
jdbcTemplate.update(
122128
"""
123129
REASSIGN OWNED BY "%s" TO "%s"
124-
""".formatted(roleName, targetRoleName),
130+
"""
131+
.formatted(roleName, targetRoleName),
125132
Map.of());
126133
}
127134

@@ -150,7 +157,9 @@ public void revokeLoginPrivileges(String roleName) {
150157
jdbcTemplate.update(
151158
"""
152159
ALTER ROLE "%s" NOLOGIN
153-
""".formatted(roleName), Map.of());
160+
"""
161+
.formatted(roleName),
162+
Map.of());
154163
}
155164

156165
public void restoreLoginPrivileges(String roleName) {
@@ -159,7 +168,9 @@ public void restoreLoginPrivileges(String roleName) {
159168
jdbcTemplate.update(
160169
"""
161170
ALTER ROLE "%s" LOGIN
162-
""".formatted(roleName), Map.of());
171+
"""
172+
.formatted(roleName),
173+
Map.of());
163174
}
164175

165176
/**

‎buildSrc/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies {
1212
implementation 'org.apache.commons:commons-compress:1.27.1'
1313
implementation 'io.spring.dependency-management:io.spring.dependency-management.gradle.plugin:1.1.7'
1414
implementation 'org.springframework.boot:spring-boot-gradle-plugin:3.4.1'
15-
implementation group: 'com.diffplug.spotless', name: 'spotless-plugin-gradle', version: '6.25.0'
15+
implementation group: 'com.diffplug.spotless', name: 'spotless-plugin-gradle', version: '7.0.1'
1616
implementation 'com.srcclr.gradle:com.srcclr.gradle.gradle.plugin:3.1.12'
1717
testImplementation group: 'org.jacoco', name: 'org.jacoco.agent', version: '0.8.12'
1818
}

‎service/src/main/java/bio/terra/workspace/app/controller/ResourceApiController.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ private WsmResource validateWorkspaceOrResourceReadAccess(
148148
throw workspaceException;
149149
}
150150
}
151-
// there's no valid case where the user will be able to access a referenced resource,
152-
// but not the workspace itself
151+
// there's no valid case where the user will be able to access a referenced resource,
152+
// but not the workspace itself
153153
case REFERENCED -> throw workspaceException;
154-
// if no access, throw original exception to avoid leaking information on resource
154+
// if no access, throw original exception to avoid leaking information on resource
155155
default -> throw workspaceException;
156156
}
157157
}

‎service/src/main/java/bio/terra/workspace/common/utils/GcpUtils.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,16 @@ public static void pollAndRetry(
9797
Code code = Code.values()[intCode];
9898
String errorMessage = operation.getOperationAdapter().getError().getMessage();
9999
switch (code) {
100-
// 400
100+
// 400
101101
case INVALID_ARGUMENT, OUT_OF_RANGE, FAILED_PRECONDITION ->
102102
throw new BadRequestException(errorMessage);
103-
// 401
103+
// 401
104104
case UNAUTHENTICATED -> throw new UnauthorizedException(errorMessage);
105-
// 403 - This includes the "CPU quota limit exceeded" error for AI notebooks.
105+
// 403 - This includes the "CPU quota limit exceeded" error for AI notebooks.
106106
case PERMISSION_DENIED -> throw new ForbiddenException(errorMessage);
107-
// 409
107+
// 409
108108
case ALREADY_EXISTS, ABORTED -> throw new ConflictException(errorMessage);
109-
// 429
109+
// 429
110110
case RESOURCE_EXHAUSTED -> throw new BadRequestException(errorMessage);
111111
default ->
112112
throw new RetryException(

‎service/src/main/java/bio/terra/workspace/db/WorkspaceDao.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,14 @@ WHERE W.workspace_id IN (:workspace_ids)
152152
""";
153153

154154
private static final String WORKSPACE_CONTEXT_BY_WORKSPACE_ID_QUERY =
155-
WORKSPACE_CONTEXT_SELECT + """
155+
WORKSPACE_CONTEXT_SELECT
156+
+ """
156157
WHERE W.workspace_id = :workspace_id
157158
""";
158159

159160
private static final String WORKSPACE_CONTEXT_BY_USER_FACING_ID_QUERY =
160-
WORKSPACE_CONTEXT_SELECT + """
161+
WORKSPACE_CONTEXT_SELECT
162+
+ """
161163
WHERE user_facing_id = :user_facing_id
162164
""";
163165

‎service/src/main/java/bio/terra/workspace/service/resource/controlled/flight/clone/workspace/CloneAllResourcesFlight.java

+11-11
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private void addFlightLaunchStepsForResource(
6161
break;
6262
case CONTROLLED:
6363
switch (resourceCloneInputs.getResource().getResourceType()) {
64-
// GCP
64+
// GCP
6565
case CONTROLLED_GCP_GCS_BUCKET -> {
6666
addStep(
6767
new LaunchCloneGcsBucketResourceFlightStep(
@@ -88,11 +88,11 @@ private void addFlightLaunchStepsForResource(
8888
resourceCloneInputs.getFlightId()),
8989
RetryRules.cloudLongRunning());
9090
}
91-
// CONTROLLED_GCP_AI_NOTEBOOK_INSTANCE: not supported
92-
// CONTROLLED_GCP_GCE_INSTANCE: not supported
93-
// CONTROLLED_GCP_DATAPROC_CLUSTER: not supported
91+
// CONTROLLED_GCP_AI_NOTEBOOK_INSTANCE: not supported
92+
// CONTROLLED_GCP_GCE_INSTANCE: not supported
93+
// CONTROLLED_GCP_DATAPROC_CLUSTER: not supported
9494

95-
// Azure
95+
// Azure
9696
case CONTROLLED_AZURE_STORAGE_CONTAINER -> {
9797
addStep(
9898
new LaunchCloneControlledAzureStorageContainerResourceFlightStep(
@@ -133,14 +133,14 @@ private void addFlightLaunchStepsForResource(
133133
RetryRules.shortDatabase());
134134
}
135135

136-
// CONTROLLED_AZURE_DISK, CONTROLLED_AZURE_VM, CONTROLLED_AZURE_BATCH_POOL: not
137-
// supported / implemented
136+
// CONTROLLED_AZURE_DISK, CONTROLLED_AZURE_VM, CONTROLLED_AZURE_BATCH_POOL: not
137+
// supported / implemented
138138

139-
// AWS
140-
// TODO(BENCH-694): support clone CONTROLLED_AWS_S3_STORAGE_FOLDER
141-
// CONTROLLED_AWS_SAGEMAKER_NOTEBOOK: not supported
139+
// AWS
140+
// TODO(BENCH-694): support clone CONTROLLED_AWS_S3_STORAGE_FOLDER
141+
// CONTROLLED_AWS_SAGEMAKER_NOTEBOOK: not supported
142142

143-
// Flexible
143+
// Flexible
144144
case CONTROLLED_FLEXIBLE_RESOURCE -> {
145145
addStep(
146146
new LaunchCloneControlledFlexibleResourceFlightStep(

‎service/src/test/java/bio/terra/workspace/common/mocks/MockGcpApi.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,9 @@ public ApiCloneControlledGcpGcsBucketResult cloneControlledGcsBucketAsyncAndExpe
266266
failureSteps.put(
267267
SetNoOpBucketCloneResponseStep.class.getName(), StepStatus.STEP_RESULT_FAILURE_FATAL);
268268
}
269-
// Avoid undoing creation of a bucket we have copied data into by failing the flight
270-
// earlier
271-
// as the deletion can often take > 1h on the GCP side.
269+
// Avoid undoing creation of a bucket we have copied data into by failing the flight
270+
// earlier
271+
// as the deletion can often take > 1h on the GCP side.
272272
case RESOURCE, DEFINITION -> {
273273
failureSteps.put(
274274
CopyGcsBucketDefinitionStep.class.getName(), StepStatus.STEP_RESULT_FAILURE_FATAL);

0 commit comments

Comments
 (0)