If I understand correctly, the original version of your app engine application which previously threw "java.net.UnknownHostException, ServiceConfigException: java.net.UnknownHostException:
servicemanagement.googleapis.com" still fails to deploy. Also, if I understood correctly after migrating traffic to the "test" version of the service, traffic is still occasionally routed to the master version.
If this is indeed the case, it is likely that the issue with App Engine may have some residual effects on the affected service, and thus I would recommend creating a new Public Tracker via the
Issue Tracker so that Support Representatives can investigate the cause accordingly.