google-nomulus/java/google/registry/tools
mcilwain 97c2049669 Catch errors when attempting to delete entities through Objectify
This is currently erroring out on entities that fail to load properly through Objectify (e.g. because their entity type is no longer registered).  The proper thing to do is to catch the error, log it, and fall back to the raw Datastore operation, which will succeed.

The exact Exception this is designed to catch is:

com.google.apphosting.runtime.jetty9.JettyLogger warn: /_dr/admin/deleteEntity (JettyLogger.java:29)
java.lang.IllegalStateException: No registered subclass for discriminator 'DomainApplication'
	at com.googlecode.objectify.v4.impl.PolymorphicEntityMetadata.getConcrete(PolymorphicEntityMetadata.java:133)
	at com.googlecode.objectify.v4.impl.PolymorphicEntityMetadata.load(PolymorphicEntityMetadata.java:164)
	at com.googlecode.objectify.v4.impl.LoadEngine.load(LoadEngine.java:220)
	at com.googlecode.objectify.v4.impl.LoadEngine$1.nowUncached(LoadEngine.java:178)
	at com.googlecode.objectify.v4.impl.LoadEngine$1.nowUncached(LoadEngine.java:164)
	at com.googlecode.objectify.v4.util.ResultCache.now(ResultCache.java:30)
	at com.googlecode.objectify.v4.impl.Round$1.nowUncached(Round.java:73)
	at com.googlecode.objectify.v4.util.ResultCache.now(ResultCache.java:30)
	at com.googlecode.objectify.v4.LoadResult.now(LoadResult.java:25)
	at google.registry.tools.server.DeleteEntityAction.loadOfyEntity(DeleteEntityAction.java:103)
	at google.registry.tools.server.DeleteEntityAction.run(DeleteEntityAction.java:74)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=230737553
2019-01-24 20:02:04 -05:00
..
javascrap Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
params Add GenerateSpec11Action and SafeBrowsing evaluation 2018-08-10 13:46:48 -04:00
server Catch errors when attempting to delete entities through Objectify 2019-01-24 20:02:04 -05:00
soy Delete end-date sunrise, landrush, and sunrush phases 2019-01-10 16:23:35 -05:00
AppEngineAdminApiModule.java Use local credential to deploy beam pipelines 2018-12-05 16:07:54 -05:00
AppEngineConnection.java Add the App Engine service used in the Action definition 2019-01-17 18:59:16 -05:00
AuthModule.java Add the ability to provide credential JSON file to the nomulus tool 2018-12-20 07:46:33 -05:00
BigqueryCommand.java Use @DefaultCredential for Cloud API access in GAE 2018-09-20 11:19:36 -04:00
BigqueryParameters.java Use @DefaultCredential for Cloud API access in GAE 2018-09-20 11:19:36 -04:00
BUILD Use Guava instead of Apache Commons for file ops in Ghostryde 2019-01-11 11:00:33 -05:00
CanonicalizeLabelsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CheckDomainClaimsCommand.java Default to admin registrar in check_domain commands 2018-09-08 00:19:53 -04:00
CheckDomainCommand.java Default to admin registrar in check_domain commands 2018-09-08 00:19:53 -04:00
Command.java Allow AppEngineConnection to target services other than "tools" 2018-09-08 00:10:06 -04:00
CommandRunner.java Add a "shell" pseudo-command to nomulus tool 2018-03-19 18:22:01 -04:00
CommandUtilities.java Delete end-date sunrise, landrush, and sunrush phases 2019-01-10 16:23:35 -05:00
CommandWithConnection.java Refactor AppEngineConnection 2018-10-29 15:34:12 -04:00
CommandWithRemoteApi.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
ComparableEntity.java Implement ComparableEntity class 2017-09-12 15:51:50 -04:00
CompareDbBackups.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
ConfirmingCommand.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
ConvertIdnCommand.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
CountDomainsCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
CreateAnchorTenantCommand.java Consolidate Dagger modules for utils classes 2019-01-17 19:20:52 -05:00
CreateCdnsTld.java Use @DefaultCredential for Cloud API access in GAE 2018-09-20 11:19:36 -04:00
CreateContactCommand.java Consolidate Dagger modules for utils classes 2019-01-17 19:20:52 -05:00
CreateDomainCommand.java Consolidate Dagger modules for utils classes 2019-01-17 19:20:52 -05:00
CreateHostCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreateOrUpdateDomainCommand.java Allow square bracket expansion when specifying nameservers 2018-08-10 13:44:25 -04:00
CreateOrUpdatePremiumListCommand.java Refactor AppEngineConnection 2018-10-29 15:34:12 -04:00
CreateOrUpdateRegistrarCommand.java Always require acknowledgment of premium fees 2019-01-17 19:07:51 -05:00
CreateOrUpdateReservedListCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
CreateOrUpdateTldCommand.java Always require acknowledgment of premium fees 2019-01-17 19:07:51 -05:00
CreatePremiumListCommand.java Clean up some code quality issues 2017-12-01 22:14:06 -05:00
CreateRegistrarCommand.java Refactor AppEngineConnection 2018-10-29 15:34:12 -04:00
CreateRegistrarGroupsCommand.java Refactor AppEngineConnection 2018-10-29 15:34:12 -04:00
CreateReservedListCommand.java Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
CreateSandboxTldCommand.java Add a command-line tool suitable for tech support usage 2018-09-20 11:19:36 -04:00
CreateTldCommand.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
CurlCommand.java Add the App Engine service used in the Action definition 2019-01-17 18:59:16 -05:00
DeleteAllocationTokensCommand.java Fix stdout of DeleteAllocationTokensCommand 2019-01-08 10:51:55 -05:00
DeleteDomainCommand.java Add flag to delete domain immediately in nomulus too 2018-05-30 12:18:54 -04:00
DeleteHostCommand.java Add delete_host nomulus tool command 2017-05-03 11:08:02 -04:00
DeletePremiumListCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
DeleteReservedListCommand.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
DeleteTldCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
DeployInvoicingPipelineCommand.java Refactor beam invoicing pipeline into its own package 2018-07-17 22:08:13 -04:00
DeploySpec11PipelineCommand.java Correct wrong description of command 2018-09-14 11:50:43 -04:00
EncryptEscrowDepositCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
EppToolCommand.java Refactor AppEngineConnection 2018-10-29 15:34:12 -04:00
EscrowDepositEncryptor.java Simplify the RyDE API 2018-07-17 22:03:53 -04:00
ExecuteEppCommand.java Do not use InjectRule to mock stdin in ExecuteEppCommandTest 2018-10-22 18:46:36 -04:00
GenerateAllocationTokensCommand.java Consolidate Dagger modules for utils classes 2019-01-17 19:20:52 -05:00
GenerateDnsReportCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
GenerateEscrowDepositCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
GenerateLordnCommand.java Refactor LordnTask to LordnTaskUtils 2018-10-22 18:59:48 -04:00
GenerateZoneFilesCommand.java Send a plaintext link to the mapreduce console in fluent style 2019-01-10 17:14:06 -05:00
GetClaimsListCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
GetContactCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GetDomainCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
GetEppResourceCommand.java Make loadByForeignKey() and related methods return Optional 2018-12-14 11:24:49 -05:00
GetHistoryEntriesCommand.java Delete end-date sunrise, landrush, and sunrush phases 2019-01-10 16:23:35 -05:00
GetHostCommand.java Make loadByForeignKey() and related methods return Optional 2018-12-14 11:24:49 -05:00
GetKeyringSecretCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
GetOperationStatusCommand.java Support datastore restore in Nomulus tool 2019-01-10 16:23:35 -05:00
GetRegistrarCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
GetResourceByKeyCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
GetRoutingMapCommand.java Add golden files for request component routing maps 2017-06-05 18:17:09 -04:00
GetSchemaCommand.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
GetSchemaTreeCommand.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
GetTldCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
GhostrydeCommand.java Use Guava instead of Apache Commons for file ops in Ghostryde 2019-01-11 11:00:33 -05:00
GtechTool.java Delete end-date sunrise, landrush, and sunrush phases 2019-01-10 16:23:35 -05:00
HashCertificateCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
HelpCommand.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
ImportDatastoreCommand.java Support datastore restore in Nomulus tool 2019-01-10 16:23:35 -05:00
Injector.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
LevelDbLogReader.java Create a LevelDBLogReader class for java 2017-08-29 16:25:33 -04:00
ListCursorsCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
ListDatastoreOperationsCommand.java Add a Nomulus command to list Datastore operations 2019-01-14 16:31:18 -05:00
ListDomainsCommand.java Default to REAL TLDs in nomulus list_domains command 2018-10-22 18:53:16 -04:00
ListHostsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListObjectsCommand.java Refactor AppEngineConnection 2018-10-29 15:34:12 -04:00
ListPremiumListsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListRegistrarsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListReservedListsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
ListTldsCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
LoadSnapshotCommand.java Remove more unnecessary "throws" declarations 2018-06-27 15:28:52 -04:00
LoadTestCommand.java Refactor AppEngineConnection 2018-10-29 15:34:12 -04:00
LockDomainCommand.java Make loadByForeignKey() and related methods return Optional 2018-12-14 11:24:49 -05:00
LockOrUnlockDomainCommand.java Default clientId to registry's registrar in domain lock commands 2018-06-06 15:17:36 -04:00
logging.properties Automated g4 rollback of changelist 212879670. 2018-10-03 11:50:47 -04:00
LoggingParameters.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
LoginCommand.java Add an option to perform login on remote machines 2018-12-12 13:22:34 -05:00
LogoutCommand.java Migrate to Flogger (green) 2018-05-30 12:18:54 -04:00
MutatingCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
MutatingEppToolCommand.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
NonMutatingEppToolCommand.java Don't prompt to confirm non-mutating nomulus EPP tool commands 2018-04-10 16:53:18 -04:00
package-info.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
PendingEscrowCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
RecordAccumulator.java Create an entity record accumulator 2017-09-12 15:51:50 -04:00
RegistrarContactCommand.java Fix a few stylistic issues in preparation for Checkstyle addition 2019-01-24 19:57:14 -05:00
RegistryCli.java Exit with error code when user is not logged in 2018-12-21 15:55:08 -05:00
RegistryTool.java Remove deprecated Datastore backup code 2019-01-24 19:58:54 -05:00
RegistryToolComponent.java Remove deprecated Datastore backup code 2019-01-24 19:58:54 -05:00
RegistryToolEnvironment.java Restore original System Properties after tests 2018-11-14 11:57:23 -05:00
RemoteApiOptionsUtil.java Use self-managed credential in remote api installer 2018-12-05 16:02:28 -05:00
RenewDomainCommand.java Make loadByForeignKey() and related methods return Optional 2018-12-14 11:24:49 -05:00
RequestFactoryModule.java Add the ability to provide credential JSON file to the nomulus tool 2018-12-20 07:46:33 -05:00
ResaveEntitiesCommand.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
ResaveEnvironmentEntitiesCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
ResaveEppResourceCommand.java Delete end-date sunrise, landrush, and sunrush phases 2019-01-10 16:23:35 -05:00
SendEscrowReportToIcannCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
SetNumInstancesCommand.java Add the App Engine service used in the Action definition 2019-01-17 18:59:16 -05:00
SetupOteCommand.java Consolidate Dagger modules for utils classes 2019-01-17 19:20:52 -05:00
ShellCommand.java Fix @VisibleForTesting given the newly deployed enforcement 2019-01-10 16:23:35 -05:00
UniformRapidSuspensionCommand.java Make loadByForeignKey() and related methods return Optional 2018-12-14 11:24:49 -05:00
UnlockDomainCommand.java Make loadByForeignKey() and related methods return Optional 2018-12-14 11:24:49 -05:00
UnrenewDomainCommand.java Make loadByForeignKey() and related methods return Optional 2018-12-14 11:24:49 -05:00
UpdateCursorsCommand.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
UpdateDomainCommand.java Make loadByForeignKey() and related methods return Optional 2018-12-14 11:24:49 -05:00
UpdateKmsKeyringCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
UpdatePremiumListCommand.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
UpdateRegistrarCommand.java Make Registrar load methods return Optionals instead of Nullables 2017-08-01 16:58:59 -04:00
UpdateReservedListCommand.java Switch from Guava Optionals to Java 8 Optionals 2017-10-24 16:53:47 -04:00
UpdateSandboxTldCommand.java Add a command-line tool suitable for tech support usage 2018-09-20 11:19:36 -04:00
UpdateServerLocksCommand.java Fix a few stylistic issues in preparation for Checkstyle addition 2019-01-24 19:57:14 -05:00
UpdateTldCommand.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
UploadClaimsListCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00
ValidateEscrowDepositCommand.java Simplify the Ghostryde API 2018-06-27 15:28:53 -04:00
ValidateLoginCredentialsCommand.java Require SSL certificate hash on login by default 2018-12-12 13:22:34 -05:00
VerifyOteCommand.java Make the verify OT&E action more performant 2018-12-03 19:07:36 -05:00
WhoisQueryCommand.java Rename RemoteApiCommand to CommandWithRemoteApi 2018-09-08 00:12:31 -04:00