Skip to content

Commit

Permalink
feat: [ASSMT-551]: Add Skip Details in Migration Summary
Browse files Browse the repository at this point in the history
  • Loading branch information
ritek01 committed Aug 27, 2024
1 parent ec2b5d9 commit 8e04144
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pipelines.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,14 @@ func createSpinnakerPipelines(pipelines interface{}) (reqId string, err error) {
reqId = resource.RequestId
log.Infof("The request id is - %s", reqId)
}
if resource.SkipDetails != nil && len(resource.SkipDetails) > 0 {
jsonData, err := json.MarshalIndent(resource.SkipDetails, "", " ")
if err != nil {
return "", fmt.Errorf("failed to marshal resource skip details JSON: %v", err)
}
jsonString := string(jsonData)
log.Warnf("Entity not migrated : %s", jsonString)
}
reconcilePipeline(resp, queryParams)
log.Info("Spinnaker migration completed")
return reqId, nil
Expand Down
6 changes: 6 additions & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ type SkipDetail struct {
Reason string `json:"reason"`
}

type NGSkipDetail struct {
Type string `json:"type"`
Reason string `json:"reason"`
}

type UpgradeError struct {
Message string `json:"message"`
Entity CurrentGenEntity `json:"entity"`
Expand All @@ -191,6 +196,7 @@ type Resource struct {
Errors []UpgradeError `json:"errors"`
Status string `json:"status"`
ResponsePayload interface{} `json:"responsePayload"`
SkipDetails []NGSkipDetail `json:"skipDetails"`
}

type ResponseBody struct {
Expand Down

0 comments on commit 8e04144

Please sign in to comment.