Skip to content

Commit 91c90ba

Browse files
committed
Implement review suggestions
1 parent 3c16d94 commit 91c90ba

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

iamctl/pkg/utils/apiUtils.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,10 @@ func SendGetListRequest(resourceType ResourceType, resourceLimit int, opts ...Se
521521
var reqUrl = buildRequestUrl(LIST, resourceType, "")
522522
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
523523

524-
req, _ := http.NewRequest("GET", reqUrl, bytes.NewBuffer(nil))
524+
req, err := http.NewRequest("GET", reqUrl, bytes.NewBuffer(nil))
525+
if err != nil {
526+
return nil, fmt.Errorf("error creating Get List request: %w", err)
527+
}
525528
req.Header.Set("Authorization", "Bearer "+SERVER_CONFIGS.Token)
526529
req.Header.Set("accept", "*/*")
527530

@@ -538,7 +541,7 @@ func SendGetListRequest(resourceType ResourceType, resourceLimit int, opts ...Se
538541
httpClient := &http.Client{}
539542
resp, err := httpClient.Do(req)
540543
if err != nil {
541-
return nil, fmt.Errorf("failed to retrieve available userstore list. %w", err)
544+
return nil, fmt.Errorf("failed to retrieve available resource list. %w", err)
542545
}
543546
return resp, nil
544547
}

iamctl/pkg/utils/resourceOrder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ var ResourceOrder = []ResourceType{
3636
SCRIPT_LIBRARIES,
3737
GOVERNANCE_CONNECTORS,
3838
CERTIFICATES,
39-
WORKFLOWS,
39+
WORKFLOWS, // Dependency: Roles
4040
}

iamctl/pkg/workflows/import.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ func removeDeletedDeployedWorkflows(localFiles []os.FileInfo, deployedWorkflows
247247
}
248248
}
249249

250-
func removeDeletedDeployedWfAssociations(localNames []string, deployedAssociations []workflowAssociation) map[string]struct{} {
250+
func removeDeletedDeployedWfAssociations(localNames []string, deployedAssociations []workflowAssociation) (failedWorkflows map[string]struct{}) {
251251

252-
failedWorkflows := make(map[string]struct{})
252+
failedWorkflows = make(map[string]struct{})
253253
if len(deployedAssociations) == 0 {
254254
return failedWorkflows
255255
}

iamctl/pkg/workflows/workflowUtils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ func writeWorkflowAssociationsList(outputDirPath string, formatString string) er
361361
func updateWorkflowExportSummary(success bool, successCount int) {
362362

363363
if !success {
364-
utils.UpdateFailureSummary(utils.WORKFLOW_ASSOCIATIONS, utils.WORKFLOW_ASSOCIATIONS.String())
364+
utils.UpdateFailureSummary(utils.WORKFLOWS, utils.WORKFLOW_ASSOCIATIONS.String())
365365
return
366366
}
367367
for i := 0; i < successCount; i++ {

0 commit comments

Comments
 (0)