google-nomulus/java/google/registry/tools/server
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
..
BUILD Refactor EppXmlTransformer to be in the model/ package 2018-12-12 13:22:34 -05:00
CreateGroupsAction.java Add the App Engine service used in the Action definition 2019-01-17 18:59:16 -05:00
CreateOrUpdatePremiumListAction.java Migrate to flogger (red) 2018-05-30 12:18:54 -04:00
CreatePremiumListAction.java Add the App Engine service used in the Action definition 2019-01-17 18:59:16 -05:00
DeleteEntityAction.java Catch errors when attempting to delete entities through Objectify 2019-01-24 20:02:04 -05:00
GenerateZoneFilesAction.java Add the App Engine service used in the Action definition 2019-01-17 18:59:16 -05:00
KillAllCommitLogsAction.java Fix a few stylistic issues in preparation for Checkstyle addition 2019-01-24 19:57:14 -05:00
KillAllEntitiesReducer.java Replace many Work and VoidWork usages with lambdas 2017-11-21 18:45:12 -05:00
KillAllEppResourcesAction.java Fix a few stylistic issues in preparation for Checkstyle addition 2019-01-24 19:57:14 -05:00
ListDomainsAction.java Add the App Engine service used in the Action definition 2019-01-17 18:59:16 -05:00
ListHostsAction.java Add the App Engine service used in the Action definition 2019-01-17 18:59:16 -05:00
ListObjectsAction.java Migrate to Flogger (green) 2018-05-30 12:18:54 -04:00
ListPremiumListsAction.java Add the App Engine service used in the Action definition 2019-01-17 18:59:16 -05:00
ListRegistrarsAction.java Add the App Engine service used in the Action definition 2019-01-17 18:59:16 -05:00
ListReservedListsAction.java Add the App Engine service used in the Action definition 2019-01-17 18:59:16 -05:00
ListTldsAction.java Always require acknowledgment of premium fees 2019-01-17 19:07:51 -05:00
PollMapreduceAction.java Add the App Engine service used in the Action definition 2019-01-17 18:59:16 -05:00
RefreshDnsForAllDomainsAction.java Add the App Engine service used in the Action definition 2019-01-17 18:59:16 -05:00
ResaveAllHistoryEntriesAction.java Add the App Engine service used in the Action definition 2019-01-17 18:59:16 -05:00
ToolsServerModule.java Remove transition code for set of parameter refactoring 2018-07-14 01:37:03 -04:00
UpdatePremiumListAction.java Add the App Engine service used in the Action definition 2019-01-17 18:59:16 -05:00
VerifyOteAction.java Add the App Engine service used in the Action definition 2019-01-17 18:59:16 -05:00