googleapis / googleapis/google-cloud-go
workstations: unsupported result type from DeleteWorkstationOperation.Wait
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 1.6k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 109
Description
## Client
Workstation apiv1beta
## Environment
Go 1.24.5 on Linux
## Code and Dependencies
```go
package main
func main() {
c, err := workstations.NewClient(context.Background())
if err != nil {
panic(err)
}
cop, err := c.CreateWorkstation(context.Background(), &workstationspb.CreateWorkstationRequest{
Parent: "",
WorkstationId: "test",
Workstation: &workstationspb.Workstation{
Name: "/workstations/test",
},
})
if err != nil {
panic(err)
}
ws, err := cop.Wait(context.Background())
if err != nil {
panic(err)
}
sop, err := c.DeleteWorkstation(context.Background(), &workstationspb.DeleteWorkstationRequest{
Name: ws.Name,
})
if err != nil {
panic(err)
}
_, err = sop.Wait(context.Background())
// returns "unsupported result type : " error
if err != nil {
// returns "unsupported result type : " error
panic(err)
}
}
```
## Expected behavior
Expected `Wait(ctx)` to not return an error.
## Actual behavior
`Wait(ctx)` returns `unsupported result type : ` because the delete operation has no result.
## Additional context
The backend seems to not be returning the correct `Empty` response for this operation which is causing an error in the `longrunning.Operation` code.
However it seems like `DeleteWorkstationOperation` should have an updated signature to not return a `Workstation` and instead just return a single `error` result.
Contributor guide
Assessment
This issue has not been assessed yet.