mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 01:17:14 +02:00
Temporarily change RDE to ignore bad transfer data
Because RDE reads from the commit logs to get its data, the bad transfer data resulting from a bug in the system is currently preventing proper RDE operation even for domains which have been fixed in Datastore. This CL adds a check to see if the transfer data is messed up (i.e. it doesn't have valid gaining and losing registrars), and if so, omits it. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=141074673
This commit is contained in:
parent
11584c31d8
commit
fbbcf41503
1 changed files with 14 additions and 2 deletions
|
@ -18,6 +18,7 @@ import static google.registry.model.ofy.ObjectifyService.ofy;
|
|||
|
||||
import com.google.common.base.Ascii;
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.model.contact.ContactResource;
|
||||
|
@ -223,8 +224,13 @@ final class DomainResourceToXjcConverter {
|
|||
// domain name object's validity period (expiry date) if the
|
||||
// transfer caused or causes a change in the validity period.
|
||||
if (model.getTransferData() != TransferData.EMPTY) {
|
||||
bean.setTrnData(
|
||||
convertTransferData(model.getTransferData(), model.getRegistrationExpirationTime()));
|
||||
// Temporary check to make sure that there really was a transfer. A bug caused spurious
|
||||
// empty transfer records to get generated for deleted domains.
|
||||
// TODO(b/33289763): remove the hasGainingAndLosingRegistrars check in February 2017
|
||||
if (hasGainingAndLosingRegistrars(model)) {
|
||||
bean.setTrnData(convertTransferData(model.getTransferData(),
|
||||
model.getRegistrationExpirationTime()));
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -235,6 +241,12 @@ final class DomainResourceToXjcConverter {
|
|||
return bean;
|
||||
}
|
||||
|
||||
private static boolean hasGainingAndLosingRegistrars(DomainResource model) {
|
||||
return
|
||||
!Strings.isNullOrEmpty(model.getTransferData().getGainingClientId())
|
||||
&& !Strings.isNullOrEmpty(model.getTransferData().getLosingClientId());
|
||||
}
|
||||
|
||||
/** Converts {@link TransferData} to {@link XjcRdeDomainTransferDataType}. */
|
||||
private static XjcRdeDomainTransferDataType convertTransferData(
|
||||
TransferData model, DateTime domainExpires) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue