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

   This looks resolved on current master (8582779203d), so it may be ready to 
close:
   
   - **One Python version only.** #16112 (titled `[BEAM-13373]`, this issue's 
Jira) took the native SpannerIO ITs out of `it_postcommit` and into a separate 
`spannerio_it` suite (the `spannerioIT` tasks), run only from 
`python37PostCommit`. That is the first avenue suggested above.
   - **One database per class.** The native ITs create their database once in 
`setUpClass` and drop it in `tearDownClass` 
([read](https://github.com/apache/beam/blob/8582779203dd4a8338b49b235b5783f0a1a55489/sdks/python/apache_beam/io/gcp/experimental/spannerio_read_it_test.py#L92),
 
[write](https://github.com/apache/beam/blob/8582779203dd4a8338b49b235b5783f0a1a55489/sdks/python/apache_beam/io/gcp/experimental/spannerio_write_it_test.py#L101)).
   - **The cross-language IT uses the emulator.** `xlang_spannerio_it_test.py` 
still creates a database per test, but against the Spanner emulator unless 
`--use_real_spanner` is passed 
([L99](https://github.com/apache/beam/blob/8582779203dd4a8338b49b235b5783f0a1a55489/sdks/python/apache_beam/io/gcp/tests/xlang_spannerio_it_test.py#L99)).
 Nothing in the repo passes that flag, and the test skips itself on Dataflow 
([L108](https://github.com/apache/beam/blob/8582779203dd4a8338b49b235b5783f0a1a55489/sdks/python/apache_beam/io/gcp/tests/xlang_spannerio_it_test.py#L108)).
 The Xlang GCP PostCommits collect it through its 
`uses_gcp_java_expansion_service` marker.
   
   One related thing a maintainer may want to know: when #27194 removed Python 
3.7 support, it deleted `python37PostCommit` along with its `spannerioIT` 
dependencies, and they weren't moved to another version. Today 
`python311PostCommit` through `python314PostCommit` in 
[`build.gradle.kts`](https://github.com/apache/beam/blob/8582779203dd4a8338b49b235b5783f0a1a55489/build.gradle.kts#L788-L815)
 don't depend on `spannerioIT`, and nothing else references it. So the native 
`spannerio_it` tests no longer run in any PostCommit. That fully removes the 
database load, but it also means the native IO's ITs are unexercised. Given 
#35860 plans to deprecate the native IO, that may be fine; I'm only noting it.
   
   I checked this by reading the code and the Gradle wiring; I didn't run the 
ITs, since they need GCP.
   


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