damccorm commented on code in PR #32158:
URL: https://github.com/apache/beam/pull/32158#discussion_r1718655145
##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIOTestUtil.java:
##########
@@ -136,7 +136,7 @@ public static void tearDownTempBucket() throws IOException {
request.setReadTimeout(60000); // 1 minute read timeout
};
Storage storage =
- new Storage.Builder(new NetHttpTransport(), new JacksonFactory(),
requestInitializer)
+ new Storage.Builder(new NetHttpTransport(), new GsonFactory(),
requestInitializer)
Review Comment:
Have you tried going through
https://github.com/apache/beam/blob/master/CONTRIBUTING.md#setup-your-environment-and-learn-about-language-specific-setup?
In particular, the `./local-env-setup.sh` piece might help
If you don't want to deal with the dependencies for this, you can also just
use the suggestion from the build itself -
https://github.com/apache/beam/actions/runs/10406736496/job/28820457976?pr=32158
In this case, the relevant piece is:
```
Execution failed for task
':sdks:java:io:google-cloud-platform:spotlessJavaCheck'.
> The following files had format violations:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/HttpHealthcareApiClient.java
@@ -734,8 +734,7 @@
????????????????CloudHealthcareScopes.CLOUD_PLATFORM,?StorageScopes.CLOUD_PLATFORM_READ_ONLY));
????client?=
-????????new?CloudHealthcare.Builder(
-????????????????new?NetHttpTransport(),?new?GsonFactory(),?requestInitializer)
+????????new?CloudHealthcare.Builder(new?NetHttpTransport(),?new?GsonFactory(),?requestInitializer)
????????????.setApplicationName("apache-beam-hl7v2-io")
????????????.build();
????httpClient?=
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIOTestUtil.java
@@ -136,8 +136,7 @@
??????????request.setReadTimeout(60000);?//?1?minute?read?timeout
????????};
????Storage?storage?=
-????????new?Storage.Builder(new?NetHttpTransport(),?new?GsonFactory(),?requestInitializer)
-????????????.build();
+????????new?Storage.Builder(new?NetHttpTransport(),?new?GsonFactory(),?requestInitializer).build();
????List<StorageObject>?blobs?=?storage.objects().list(DEFAULT_TEMP_BUCKET).execute().getItems();
????if?(blobs?!=?null)?{
??????for?(StorageObject?blob?:?blobs)?{
Run './gradlew :sdks:java:io:google-cloud-platform:spotlessApply' to fix
these violations.
```
So to fix, you'd update the lines in `FhirIOTestUtil.java` and
`HttpHealthcareApiClient.java` to follow the specified format
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]