You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deferelapsed(fmt.Sprintf("time taken in discovering resources for step %d for compartment %s", i, *ctx.CompartmentId), step.getBaseStep(), Discovery)()
utils.Debugf("[DEBUG] skipping write temp config for compartment %s for step %d", *ctx.CompartmentId, i)
606
612
stateWg.Done()
607
613
continue
608
614
}
609
615
610
616
sem<-struct{}{}
611
617
612
618
gofunc(iint, stepresourceDiscoveryStep) {
613
-
utils.Debugf("[DEBUG] writing temp config and state: Running step %d", i)
614
-
deferelapsed(fmt.Sprintf("time taken by step %s to generate state", fmt.Sprint(i)), step.getBaseStep(), GeneratingState)()
619
+
utils.Debugf("[DEBUG] writing temp config and state for compartment %s: Running step %d", *ctx.CompartmentId, i)
620
+
deferelapsed(fmt.Sprintf("time taken by step %s to generate state for compartment %s", fmt.Sprint(i), *ctx.CompartmentId), step.getBaseStep(), GeneratingState)()
615
621
deferfunc() {
616
622
<-sem
617
623
ifr:=recover(); r!=nil {
618
624
utils.Logf("[ERROR] panic in writing temp config and state goroutine")
619
625
debug.PrintStack()
620
626
}
621
-
utils.Debugf("[DEBUG] stateWg done: step %d", i)
627
+
utils.Debugf("[DEBUG] stateWg done for compartment %s: step %d", *ctx.CompartmentId, i)
errorChannel<-fmt.Errorf("[ERROR] error while writing temp config for resources found in step %d: %s", i, err.Error())
636
+
errorChannel<-fmt.Errorf("[ERROR] error while writing temp config for compartment %s for resources found in step %d: %s", *ctx.CompartmentId, i, err.Error())
631
637
}
632
638
633
639
// Write temp state file for each service, this step will import resources into a separate state file for each service in parallel
utils.Logf("[INFO] resource discovery: visiting %s for compartment %s\n", root.GetTerraformReference(), root.CompartmentId)
950
+
utils.Debugf("[DEBUG] resource discovery: visiting %s for compartment %s\n", root.GetTerraformReference(), root.CompartmentId)
942
951
943
-
utils.Logf("[INFO] number of child resource types for %s: %d\n", root.GetTerraformReference(), len(childResourceTypes))
952
+
utils.Logf("[INFO] number of child resource types for %s: %d for compartment %s\n", root.GetTerraformReference(), len(childResourceTypes), root.CompartmentId)
deferelapsed(fmt.Sprintf("writing temp state for %d '%s' resources", len(r.getDiscoveredResources()), r.name), nil, 0)()
164
+
deferelapsed(fmt.Sprintf("writing temp state for %d '%s' resources for compartment %s", len(r.getDiscoveredResources()), r.name, *r.ctx.CompartmentId), nil, 0)()
165
165
// Run terraform init if not already done
166
166
if!isInitDone {
167
-
utils.Debugf("[DEBUG] acquiring lock to run terraform init")
167
+
utils.Debugf("[DEBUG] acquiring lock to run terraform init for step name %s for compartment %s", r.name, *r.ctx.CompartmentId)
168
168
initLock.Lock()
169
169
deferfunc() {
170
-
utils.Debugf("[DEBUG] releasing lock")
170
+
utils.Debugf("[DEBUG] releasing lock for step name %s for compartment %s", r.name, *r.ctx.CompartmentId)
171
171
initLock.Unlock()
172
172
}()
173
173
// Check for existence of .terraform folder to make sure init is not run already by another thread
utils.Logf("[WARN] unable to delete existing tmp state directory %s", tmpStateOutputDir)
197
+
utils.Logf("[WARN] unable to delete existing tmp state directory %s for step name %s for compartment %s", tmpStateOutputDir, r.name, *r.ctx.CompartmentId)
0 commit comments