mirror of
https://github.com/google/nomulus
synced 2026-01-11 08:20:27 +00:00
Let RegistryTool proceed if MetricWriter is unavailable
This may happen with automated runs off Google Cloud. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=213462175
This commit is contained in:
@@ -234,7 +234,12 @@ final class RegistryCli implements AutoCloseable, CommandRunner {
|
||||
private void runCommand(Command command) throws Exception {
|
||||
injectReflectively(RegistryToolComponent.class, component, command);
|
||||
if (metricWriter == null && uploadMetrics) {
|
||||
metricWriter = component.metricWriter();
|
||||
try {
|
||||
metricWriter = component.metricWriter();
|
||||
} catch (Exception e) {
|
||||
System.err.format("Failed to get metricWriter. Got error:\n%s\n\n", e);
|
||||
uploadMetrics = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (command instanceof CommandWithConnection) {
|
||||
|
||||
Reference in New Issue
Block a user