Skip to content

Commit

Permalink
Merge pull request #523 from AlexVulaj/resize-control-plane-multi-wor…
Browse files Browse the repository at this point in the history
…d-justification

Allow multi-word justifications for resizing control plane service logs
  • Loading branch information
openshift-merge-bot[bot] authored Feb 21, 2024
2 parents 8eb6c1e + 058ef81 commit ee778cd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/cluster/resizecontrolplanenode.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,17 @@ func promptGenerateResizeSL(clusterID string, newMachineType string) error {
fmt.Print("Please enter the JIRA ID that corresponds to this resize: ")
_, _ = fmt.Scanln(&jiraID)

// Use a bufio Scanner since the fmt package cannot read in more than one word
var justification string
fmt.Print("Please enter a justification for the resize: ")
_, _ = fmt.Scanln(&justification)
scanner := bufio.NewScanner(os.Stdin)
if scanner.Scan() {
justification = scanner.Text()
} else {
errText := "failed to read justification text, send service log manually"
_, _ = fmt.Fprintf(os.Stderr, errText)
return errors.New(errText)
}

postCmd := servicelog.PostCmdOptions{
Template: "https://raw.githubusercontent.com/openshift/managed-notifications/master/osd/controlplane_resized.json",
Expand Down

0 comments on commit ee778cd

Please sign in to comment.