jonathansudhakar1 commented on issue #23175:
URL: https://github.com/apache/beam/issues/23175#issuecomment-6724436279

   This looks done. #23377 ("Add database role to SpannerConfig for role-based 
access control", merged 2022-10-11) added it, but the PR didn't link this 
issue, so it stayed open.
   
   On current master (84a02fe905c):
   - `SpannerConfig.withDatabaseRole(ValueProvider<String>)` sets the role 
([SpannerConfig.java#L355](https://github.com/apache/beam/blob/84a02fe905c/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerConfig.java#L355)).
   - `SpannerAccessor` passes a non-empty role to 
`SpannerOptions.Builder.setDatabaseRole` when it creates the client 
([SpannerAccessor.java#L305-L308](https://github.com/apache/beam/blob/84a02fe905c/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerAccessor.java#L305-L308)).
   - Pipelines use it with 
`SpannerIO.read()/write().withSpannerConfig(SpannerConfig.create()...withDatabaseRole(...))`.
   
   `./gradlew :sdks:java:io:google-cloud-platform:test --tests 
'*.spanner.SpannerAccessorTest'` passes on that commit: 12 tests, 0 failures. 
That includes `testCreateWithValidDatabaseRole` and 
`testCreateWithEmptyDatabaseRole`.
   


-- 
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]

Reply via email to