-
Notifications
You must be signed in to change notification settings - Fork 11
Issue 61: Updated endpoint to return list of all clusters #129
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
Conversation
andresmgot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Some minor comments here.
pkg/redshift/api/api.go
Outdated
| res := []models.RedshiftCluster{} | ||
| for _, r := range out.Clusters { | ||
| res = append(res, models.RedshiftCluster{ | ||
| ClusterIdentifier: *r.ClusterIdentifier, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid we still need the nil point checks 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course! 🤭
pkg/redshift/api/api_test.go
Outdated
| expectedCluster *models.RedshiftCluster | ||
| c *API | ||
| desc string | ||
| clusterId string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove now the clusterId input
pkg/redshift/routes/routes.go
Outdated
| reqBody, err := routes.ParseBody(req.Body) | ||
| if err != nil { | ||
| rw.WriteHeader(http.StatusBadRequest) | ||
| routes.Write(rw, []byte(err.Error())) | ||
| return | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need now to parse the body, it should be a GET request (similar to the Secrets function)
andresmgot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
Backend work (second iteration) for #61
First iteration merged: #121
Description
To be more user friendly and avoid typos, we want to change Redshift's UI to use a dropdown (if permissions allow) to select a clusterID.
This PR updates the
clusterendpoint toclustersthat return the list of all clustersA next PR #127 will use it to display the dropdown and update the description on the datasource card
Test coverage