Skip to content

Added host orchestrator endpoint for cvd status#2395

Open
SuperStrongDinosaur wants to merge 3 commits intogoogle:mainfrom
SuperStrongDinosaur:e2e_cvd_status
Open

Added host orchestrator endpoint for cvd status#2395
SuperStrongDinosaur wants to merge 3 commits intogoogle:mainfrom
SuperStrongDinosaur:e2e_cvd_status

Conversation

@SuperStrongDinosaur
Copy link
Copy Markdown
Collaborator

b/502498047

@rmuthiah rmuthiah requested review from jemoreira and ser-io April 15, 2026 21:42
}

type CVDStatusResponse struct {
Status map[string]interface{} `json:"status"`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a more specific field definition than interface{}.

Comment on lines +71 to +74
router.Handle("/cvds/{group}/:status",
httpHandler(newGetCVDGroupStatusHandler(c.Config, c.OperationManager))).Methods("GET")
router.Handle("/cvds/{group}/{name}/:status",
httpHandler(newGetCVDInstanceStatusHandler(c.Config, c.OperationManager))).Methods("GET")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The information returned by GET /cvds/{group}/status/:status is the same as that returned by GET /cvds/{group}. The only difference is that the latter (inconveniently) wraps it inside an array with a single element in a property named cvds.

Similarly, a GET /cvds/{group}/{name} endpoint could exist that returns the information related to a single instance, but it doesn't need the /:status part.

}

func (i *Instance) CVDStatus() (map[string]interface{}, error) {
func (i *Instance) CVDStatus() (interface{}, error) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't create a new commit to fix the previous two, fix the corresponding commit instead. Unless you're addressing code review feedback, in which case new commits are actually desired, but you're still expected to combine those with the original ones before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants