Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [ASSMT-551]: Add Skip Details in Migration Summary #132

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading