Always use JPA TM on Beam (#1474)

* Always use JPA TM on Beam

Beam does not have access to datastore. Using ofy on Beam always results
in an error. Normally we should use database migration state schedule to
determine which TM to use, but on Beam there's no point in doing so. By
hard-coding the TM on beam to be SQL we can start testing features before
we migrate to SQL mode, for example the new RDE pipeline.

Also made a change to where the manual deposits are stored. It made more
sense to store them under manual/[direcitory]/[jobname]/ instead of
[jobname]/manual/[directory]/.

TESTED=deployed the pipeline on production and ran a job.
This commit is contained in:
Lai Jiang
2021-12-22 14:43:25 -05:00
committed by GitHub
parent 156344e408
commit 7bebe46695
3 changed files with 19 additions and 13 deletions
@@ -497,13 +497,13 @@ public class RdePipelineTest {
verifyFiles(ImmutableMap.of(brdaKey, brdaFragments, rdeKey, rdeFragments), true);
assertThat(gcsUtils.listFolderObjects("gcs-bucket", "rde-job/"))
assertThat(gcsUtils.listFolderObjects("gcs-bucket", "manual/test/rde-job/"))
.containsExactly(
"manual/test/soy_2000-01-01_thin_S1_R0.xml.length",
"manual/test/soy_2000-01-01_thin_S1_R0.xml.ghostryde",
"manual/test/soy_2000-01-01_full_S1_R0.xml.length",
"manual/test/soy_2000-01-01_full_S1_R0.xml.ghostryde",
"manual/test/soy_2000-01-01_full_S1_R0-report.xml.ghostryde");
"soy_2000-01-01_thin_S1_R0.xml.length",
"soy_2000-01-01_thin_S1_R0.xml.ghostryde",
"soy_2000-01-01_full_S1_R0.xml.length",
"soy_2000-01-01_full_S1_R0.xml.ghostryde",
"soy_2000-01-01_full_S1_R0-report.xml.ghostryde");
assertThat(loadCursorTime(CursorType.BRDA)).isEquivalentAccordingToCompareTo(now);
assertThat(loadRevision(now, THIN)).isEqualTo(0);
@@ -521,7 +521,7 @@ public class RdePipelineTest {
rdePipeline.persistData(fragments);
pipeline.run().waitUntilFinish();
String prefix = manual ? "rde-job/manual/test/" : "rde-job/";
String prefix = manual ? "manual/test/rde-job/" : "rde-job/";
String revision = manual ? "R0" : "R1";
// BRDA