mirror of
https://github.com/google/nomulus
synced 2026-01-07 14:05:44 +00:00
Validate SQL with Datastore being Primary (#1436)
* Validate SQL with Datastore being primary Validates the data asynchronously replicated from Datastore to SQL. This is a short term tool optimized for the current production database. Tested in production.
This commit is contained in:
@@ -703,6 +703,12 @@ createToolTask(
|
||||
'google.registry.tools.DevTool',
|
||||
sourceSets.nonprod)
|
||||
|
||||
createToolTask(
|
||||
'initSqlPipeline', 'google.registry.beam.initsql.InitSqlPipeline')
|
||||
|
||||
createToolTask(
|
||||
'validateSqlPipeline', 'google.registry.beam.comparedb.ValidateSqlPipeline')
|
||||
|
||||
|
||||
createToolTask(
|
||||
'jpaDemoPipeline', 'google.registry.beam.common.JpaDemoPipeline')
|
||||
@@ -711,30 +717,6 @@ createToolTask(
|
||||
'createSyntheticHistoryEntries',
|
||||
'google.registry.tools.javascrap.CreateSyntheticHistoryEntriesPipeline')
|
||||
|
||||
project.tasks.create('initSqlPipeline', JavaExec) {
|
||||
main = 'google.registry.beam.initsql.InitSqlPipeline'
|
||||
|
||||
doFirst {
|
||||
getToolArgsList().ifPresent {
|
||||
args it
|
||||
}
|
||||
|
||||
def isDirectRunner =
|
||||
args.contains('DirectRunner') || args.contains('--runner=DirectRunner')
|
||||
// The dependency containing DirectRunner is intentionally excluded from the
|
||||
// production binary, so that it won't be chosen by mistake: we definitely do
|
||||
// not want to use it for the real jobs, yet DirectRunner is the default if
|
||||
// the user forgets to override it.
|
||||
// DirectRunner is required for tests and is already on testRuntimeClasspath.
|
||||
// For simplicity, we add testRuntimeClasspath to this task's classpath instead
|
||||
// of defining a new configuration just for the DirectRunner dependency.
|
||||
classpath =
|
||||
isDirectRunner
|
||||
? sourceSets.main.runtimeClasspath.plus(sourceSets.test.runtimeClasspath)
|
||||
: sourceSets.main.runtimeClasspath
|
||||
}
|
||||
}
|
||||
|
||||
// Caller must provide projectId, GCP region, runner, and the kinds to delete
|
||||
// (comma-separated kind names or '*' for all). E.g.:
|
||||
// nom_build :core:bulkDeleteDatastore --args="--project=domain-registry-crash \
|
||||
|
||||
Reference in New Issue
Block a user