Skip to content

Commit d5b4a89

Browse files
varshavaradarajanbdpiprava
authored andcommitted
Add log statements while downloading remote file spec.
1 parent 489ba10 commit d5b4a89

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ on Windows.
5858
- Remote File
5959
1. Specify the file name and type (`json` or `yaml`)
6060
61-
![Create elastic profile using pod configuration][8]
61+
![Create elastic profile using remote file configuration][8]
6262
6363
4. Save your profile.
6464

src/main/java/cd/go/contrib/elasticagent/KubernetesAgentInstances.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,13 @@
2525
import org.joda.time.DateTime;
2626
import org.joda.time.Period;
2727

28-
import java.io.IOException;
2928
import java.util.ArrayList;
3029
import java.util.Date;
3130
import java.util.Map;
3231
import java.util.concurrent.ConcurrentHashMap;
3332
import java.util.concurrent.Semaphore;
3433

3534
import static cd.go.contrib.elasticagent.KubernetesPlugin.LOG;
36-
import static cd.go.contrib.elasticagent.executors.GetProfileMetadataExecutor.SPECIFIED_USING_POD_CONFIGURATION;
3735
import static cd.go.contrib.elasticagent.utils.Util.getSimpleDateFormat;
3836
import static java.text.MessageFormat.format;
3937

src/main/java/cd/go/contrib/elasticagent/KubernetesInstanceFactory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,11 @@ else if ("yaml".equalsIgnoreCase(fileType)) {
266266
File podSpecFile = new File(String.format("pod_spec_%s", UUID.randomUUID().toString()));
267267
try {
268268
FileUtils.copyURLToFile(new URL(fileToDownload), podSpecFile);
269+
LOG.debug(format("Finished downloading %s to %s", fileToDownload, podSpecFile));
269270
String spec = FileUtils.readFileToString(podSpecFile, UTF_8);
270271
elasticAgentPod = mapper.readValue(spec, Pod.class);
271272
FileUtils.deleteQuietly(podSpecFile);
273+
LOG.debug(format("Deleted %s", podSpecFile));
272274

273275
} catch (IOException e) {
274276
//ignore error here, handle this inside validate profile!

0 commit comments

Comments
 (0)