mirror of
https://github.com/google/nomulus.git
synced 2025-04-30 12:07:51 +02:00
The main purpose of this PR is to help debug b/234189023, where a registrar reported that in sandbox they observed seemingly successful EPP update responses to delete NS records, which are not actually deleted after the commands executed. To actually load the persisted domain resource after an update would require us to execute another transaction immediately after the update transaction and that can only be achieved outside the flow (i. e. in FlowRunner or EppController) and we need to test for the type of flows before logging, which seems unnecessarily complex. For now we are just adding logs inside the update transaction itself to validate that: 1. The NS records to delete are as expected. 2. The Current NS records are as expected. 3. The new NS records to persist are as expected. The EPP success reply is the default reply when no errors are thrown in a transaction. If we see a success reply (which means that the transaction finished successfully) and expected logs from the transaction, the only explanation could be that somewhere in the ORM layer the java representation of what the entity is is different from what is being presented to the database. I think that signals a much bigger and fundamental problem, which is quite unlikely given how isolated the issue under consideration is. In any case we would like to add the logging functionality in sandbox and ask the registrar to report again when they see similar issues. Also made some typo and linting fixes. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/google/nomulus/1663) <!-- Reviewable:end -->
69 lines
2.4 KiB
Groovy
69 lines
2.4 KiB
Groovy
// Copyright 2020 The Nomulus Authors. All Rights Reserved.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
dependencies {
|
|
def deps = rootProject.dependencyMap
|
|
|
|
compile deps['com.beust:jcommander']
|
|
compile deps['com.google.appengine:appengine-api-1.0-sdk']
|
|
compile deps['com.google.code.findbugs:jsr305']
|
|
compile deps['com.google.flogger:flogger']
|
|
compile deps['com.google.guava:guava']
|
|
compile deps['com.google.re2j:re2j']
|
|
compile project(':core')
|
|
compile project(':util')
|
|
|
|
testCompile deps['com.google.truth:truth']
|
|
testCompile deps['com.thoughtworks.qdox:qdox']
|
|
testCompile deps['junit:junit']
|
|
testCompile deps['org.junit.jupiter:junit-jupiter-api']
|
|
testCompile deps['org.junit.jupiter:junit-jupiter-engine']
|
|
testCompile deps['org.junit.platform:junit-platform-runner']
|
|
testCompile deps['org.junit.platform:junit-platform-suite-api']
|
|
testCompile deps['org.testcontainers:junit-jupiter']
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
task flowDocsTool(type: JavaExec) {
|
|
systemProperty 'test.projectRoot', rootProject.projectRootDir
|
|
jvmArgs = ['--add-exports', 'jdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED']
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
main = 'google.registry.documentation.FlowDocumentationTool'
|
|
|
|
def arguments = []
|
|
if (rootProject.flowDocsFile) {
|
|
arguments << "--output_file=${rootProject.flowDocsFile}"
|
|
} else {
|
|
arguments << "--output_file=${rootProject.projectRootDir}/docs/flows.md"
|
|
}
|
|
args arguments
|
|
}
|
|
|
|
tasks.compileJava {
|
|
options.compilerArgs = ["--add-exports",
|
|
"jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
|
|
"--add-exports",
|
|
"jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
|
|
"--add-exports",
|
|
"jdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED"]
|
|
|
|
}
|
|
|
|
tasks.test {
|
|
jvmArgs = ['--add-exports',
|
|
'jdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED']
|
|
}
|