feat: bake gapic-generator-java into the hermetic build docker image
Built on top of https://github.com/googleapis/sdk-platform-java/pull/3045 (needs to be merged first)
@blakeli0 I removed gapic_generator_version altogether. We now only rely on DOCKER_GAPIC_GENERATOR_LOCATION that will point to the jar we need and not care about the location.
This however brought many changes in the test folder but most of them are simple.
@JoeWang1127 @blakeli0 the integration tests now can't be locked to a specific generator version, so we will constantly need to update them.
A few ideas:
- Add an
--updateflag to the integration tests - Keep a locked-in jar in the test resources folder and override the generator version
- Add test-only logic in the Dockerfile (e.g. figure out if the jar should be downloaded or
mvn install-ed by converting this version into an overridable ARG)
spring downstream check failing because the release job still doesn't publish the maven artifacts
https://github.com/GoogleCloudPlatform/spring-cloud-gcp/pull/3138#issuecomment-2318598130
cc: @mpeddada1
the integration tests now can't be locked to a specific generator version, so we will constantly need to update them
I think it's fine to test the snapshot version of the generator.
Ideally, running the generation can produce the same file even if the generator updates, though some changes in the generator can produce different code and we can update the golden file accordingly, just like the showcase integration test.
At this point, I think it's fine. However, we need to improvement the integration test:
- Use golden file rather than branch in google-cloud-java
- Provide an easy way to update the golden file
@blakeli0 WDYT?
From discussion with @blakeli0 and @JoeWang1127, we can lock in a specific version string of the generator, download it in our integration test and then override the well-known location via volumes
@JoeWang1127 I modified the integration test to lock-in a specific generator jar downloaded via mvn. PTAL when you have a chance :)
@JoeWang1127 I modified the integration test to lock-in a specific generator jar downloaded via
mvn. PTAL when you have a chance :)
Thanks, could you change the pr body since this is no longer a pending issue.
Quality Gate passed for 'gapic-generator-java-root'
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Quality Gate passed for 'java_showcase_integration_tests'
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code