Skip to content

[ws-manager] Remove wait from probes #14768

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

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 1 addition & 1 deletion components/ws-manager/pkg/manager/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type WorkspaceReadyProbe struct {

// NewWorkspaceReadyProbe creates a new workspace probe
func NewWorkspaceReadyProbe(workspaceID string, workspaceURL url.URL) WorkspaceReadyProbe {
workspaceURL.Path += "/_supervisor/v1/status/ide/wait/true"
workspaceURL.Path += "/_supervisor/v1/status/ide"
Copy link
Contributor

Choose a reason for hiding this comment

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

@iQQBot what do you think about removing wait/true? I ask because you initially authored #13828. Is there anything you'd recommend we explicitly test?

I ask because @utam0k did some testing here which is related.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the problem before was that ws-manager was only looking at HTTP status codes from the supervisor and didn't validate the body. I think this would increase the number of requests, is that the intent?

Copy link
Contributor

Choose a reason for hiding this comment

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

remove wait/true has no obvious benefit other than increasing the number of requests

readyURL := workspaceURL.String()

return WorkspaceReadyProbe{
Expand Down
2 changes: 1 addition & 1 deletion test/pkg/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func Instrument(component ComponentType, agentName string, namespace string, kub
closer = append(closer, func() error {
if res != nil {
err := res.Call(MethodTestAgentShutdown, new(TestAgentShutdownRequest), new(TestAgentShutdownResponse))
if err != nil && strings.Contains(err.Error(), "connection is shut down") {
if err != nil && (strings.Contains(err.Error(), "connection is shut down") || strings.Contains(err.Error(), "the client connection is closing")) {
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions test/tests/components/ws-daemon/cpu_burst_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
type DaemonConfig struct {
CpuLimitConfig struct {
Enabled bool `json:"enabled"`
Limit int64 `json:"limit,string"`
BurstLimit int64 `json:"burstLimit,string"`
Limit int64 `json:"limit"`
BurstLimit int64 `json:"burstLimit"`
} `json:"cpuLimit"`
}

Expand Down