[Java] Move GCP-related secret classes and tests from sdks/java/core to google-cloud-platform-core - #40019
[Java] Move GCP-related secret classes and tests from sdks/java/core to google-cloud-platform-core#40019shunping wants to merge 12 commits into
Conversation
|
r: @damccorm |
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment |
damccorm
left a comment
There was a problem hiding this comment.
Please take a look at the precommit failure which looks related to the change:
1: Task failed with an exception.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
-----------
* What went wrong:
Execution failed for task ':sdks:java:core:analyzeClassesDependencies'.
> Dependency analysis found issues.
unusedDeclaredArtifacts
- com.google.protobuf:protobuf-java:4.33.6@jar
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org./
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':sdks:java:extensions:google-cloud-platform-core:analyzeClassesDependencies'.
> Dependency analysis found issues.
usedUndeclaredArtifacts
- com.google.protobuf:protobuf-java:4.33.6@jar
-
- ```
|
Otherwise, this LGTM, thanks |
…XlangTest - Add TestSecretRegistrar in sdks/java/core/src/test for testing secret options - Update GroupByKeyWithGbekTest in ValidateRunnerXlangTest to use type:testsecret so cross-language tests run unconditionally without GCP Secret Manager
|
Note that I also replace the use of GCP secret manager in XVR gbek test with a test secret manager so we won't have gcp deps in java/core. We already have integration tests for GBEK in |
0a8c318 to
1224ebf
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #40019 +/- ##
============================================
- Coverage 58.40% 57.23% -1.18%
+ Complexity 13570 3658 -9912
============================================
Files 2576 1195 -1381
Lines 268929 193636 -75293
Branches 11056 3835 -7221
============================================
- Hits 157077 110832 -46245
+ Misses 105899 79230 -26669
+ Partials 5953 3574 -2379
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Moves Google Cloud Platform (GCP) secret manager implementations (
GcpSecret,GcpHsmGeneratedSecret) and theirSecretRegistrars (GcpSecretRegistrar,GcpHsmGeneratedSecretRegistrar) out ofsdks/java/coreintosdks/java/extensions/google-cloud-platform-core.This decouples
beam-sdks-java-corefrom GCP Secret Manager, Cloud KMS, and Tink dependencies, keepingcorelightweight while still supporting dynamic secret registration whengoogle-cloud-platform-coreis on the classpath viaServiceLoader.Notice that there is no functional change in this PR.
Follow-up to #39940 (comment)
Changes
GcpSecret,GcpHsmGeneratedSecret,GcpSecretRegistrar, andGcpHsmGeneratedSecretRegistrarfromorg.apache.beam.sdk.util(sdks/java/core) toorg.apache.beam.sdk.extensions.gcp.util(sdks/java/extensions/google-cloud-platform-core).SecretTestintoGcpSecretTestingoogle-cloud-platform-core.GcpSecretRegistrarTesttogoogle-cloud-platform-core.GroupByKeyandGroupByEncryptedKeyfromGroupByKeyTestandGroupByEncryptedKeyTestintoGcpGroupByEncryptedKeyTest.GroupByKeyITfromsdks/java/coretoGcpGroupByKeyITingoogle-cloud-platform-core.