@@ -527,6 +527,7 @@ public SupportBundleAsyncGenerator init(UUID taskId, List<Component> components)
527
527
@ Override
528
528
protected void compute () throws Exception {
529
529
if (supportBundleGenerationInProgress ) {
530
+ logger .fine ("Support bundle generation already in progress, for task id " + taskId );
530
531
return ;
531
532
}
532
533
this .supportBundleName = BundleFileName .generate ();
@@ -539,8 +540,7 @@ protected void compute() throws Exception {
539
540
}
540
541
}
541
542
542
- try (FileOutputStream fileOutputStream =
543
- new FileOutputStream (new File (outputDir , supportBundleName ))) {
543
+ try (FileOutputStream fileOutputStream = new FileOutputStream (new File (outputDir , supportBundleName ))) {
544
544
SupportPlugin .setRequesterAuthentication (Jenkins .getAuthentication2 ());
545
545
try {
546
546
try (ACLContext ignored = ACL .as2 (ACL .SYSTEM2 )) {
@@ -558,7 +558,6 @@ protected void compute() throws Exception {
558
558
pathToBundle = outputDir .getAbsolutePath () + "/" + supportBundleName ;
559
559
isCompleted = true ;
560
560
progress (1 );
561
-
562
561
}
563
562
564
563
@ NonNull
@@ -577,7 +576,8 @@ public String getSupportBundleName() {
577
576
}
578
577
579
578
public void doDownloadBundle (@ QueryParameter ("taskId" ) String taskId , StaplerResponse2 rsp ) throws IOException {
580
- String supportBundleName = generatorByTaskId .get (UUID .fromString (taskId )).getSupportBundleName ();
579
+ String supportBundleName =
580
+ generatorByTaskId .get (UUID .fromString (taskId )).getSupportBundleName ();
581
581
File bundleFile = new File (SUPPORT_BUNDLE_CREATION_FOLDER + "/" + taskId + "/" + supportBundleName );
582
582
if (!bundleFile .exists ()) {
583
583
rsp .sendError (HttpServletResponse .SC_NOT_FOUND , "Support bundle file not found" );
0 commit comments