From 8f0c24af66f340bbcc37bdabfa6f03da41c80e77 Mon Sep 17 00:00:00 2001 From: Gero Posmyk-Leinemann Date: Thu, 24 Jun 2021 12:13:30 +0000 Subject: [PATCH] [ws-manager, supervisor, bridge] Prebuild workspaces are done when their container stops --- .../supervisor/pkg/supervisor/supervisor.go | 46 +- components/supervisor/pkg/supervisor/tasks.go | 6 +- .../supervisor/pkg/supervisor/tasks_test.go | 3 +- components/workspacekit/cmd/rings.go | 72 +- components/ws-manager-api/core.proto | 3 + components/ws-manager-api/go/core.pb.go | 328 ++++---- .../typescript/src/core_pb.d.ts | 3 + .../ws-manager-api/typescript/src/core_pb.js | 32 +- components/ws-manager-bridge/ee/src/bridge.ts | 6 +- .../ws-manager/cmd/debug-headless-log.go | 77 -- components/ws-manager/cmd/root.go | 22 - components/ws-manager/pkg/manager/create.go | 2 +- components/ws-manager/pkg/manager/headless.go | 309 ------- .../ws-manager/pkg/manager/headless_test.go | 356 --------- components/ws-manager/pkg/manager/manager.go | 11 +- components/ws-manager/pkg/manager/monitor.go | 190 ++--- components/ws-manager/pkg/manager/status.go | 52 +- .../manager/testdata/cdwp_admission.golden | 2 +- .../testdata/cdwp_empty_resource_req.golden | 2 +- .../testdata/cdwp_fixedresources.golden | 2 +- .../testdata/cdwp_fullworkspacebackup.golden | 2 +- .../pkg/manager/testdata/cdwp_ghost.golden | 2 +- .../pkg/manager/testdata/cdwp_prebuild.golden | 2 +- .../testdata/cdwp_prebuild_template.golden | 2 +- ...rebuild_template_override_resources.golden | 2 +- .../pkg/manager/testdata/cdwp_probe.golden | 2 +- .../testdata/cdwp_readinessprobe.golden | 2 +- .../pkg/manager/testdata/cdwp_tasks.golden | 2 +- .../pkg/manager/testdata/cdwp_template.golden | 2 +- .../pkg/manager/testdata/cdwp_timeout.golden | 2 +- .../pkg/manager/testdata/cdwp_userns.golden | 2 +- .../status_containerd4214_STOPPING00.json | 2 +- .../testdata/status_disposal_STOPPED01.json | 2 +- .../testdata/status_disposal_STOPPED02.json | 2 +- .../testdata/status_disposal_STOPPED03.json | 2 +- .../testdata/status_disposal_STOPPING01.json | 2 +- .../testdata/status_disposal_STOPPING02.json | 2 +- .../testdata/status_failedLogs_UNKNOWN00.json | 2 +- .../status_prebuildFail_STOPPED00.golden | 95 +++ .../status_prebuildFail_STOPPED00.json | 755 ++++++++++++++++++ .../status_prebuildFail_STOPPING00.golden | 94 +++ .../status_prebuildFail_STOPPING00.json | 740 +++++++++++++++++ .../status_prebuildSuccess2_CREATING01.golden | 95 +++ .../status_prebuildSuccess2_CREATING01.json | 1 + .../status_prebuildSuccess_RUNNING01.golden | 29 - .../status_prebuildSuccess_RUNNING01.json | 259 ------ .../status_prebuildSuccess_STOPPED00.golden | 95 +++ .../status_prebuildSuccess_STOPPED00.json | 1 + .../status_prebuildSuccess_STOPPING00.golden | 94 +++ .../status_prebuildSuccess_STOPPING00.json | 1 + test/go.sum | 12 - test/pkg/integration/workspace.go | 72 +- test/tests/examples/server_test.go | 2 +- test/tests/workspace/contexts_test.go | 2 +- test/tests/workspace/ghost_test.go | 31 + test/tests/workspace/git_test.go | 2 +- test/tests/workspace/prebuild_test.go | 51 ++ 57 files changed, 2527 insertions(+), 1464 deletions(-) delete mode 100644 components/ws-manager/cmd/debug-headless-log.go delete mode 100644 components/ws-manager/pkg/manager/headless.go delete mode 100644 components/ws-manager/pkg/manager/headless_test.go create mode 100644 components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPED00.golden create mode 100644 components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPED00.json create mode 100644 components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPING00.golden create mode 100644 components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPING00.json create mode 100644 components/ws-manager/pkg/manager/testdata/status_prebuildSuccess2_CREATING01.golden create mode 100644 components/ws-manager/pkg/manager/testdata/status_prebuildSuccess2_CREATING01.json delete mode 100644 components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_RUNNING01.golden delete mode 100644 components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_RUNNING01.json create mode 100644 components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPED00.golden create mode 100644 components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPED00.json create mode 100644 components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPING00.golden create mode 100644 components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPING00.json create mode 100644 test/tests/workspace/ghost_test.go create mode 100644 test/tests/workspace/prebuild_test.go diff --git a/components/supervisor/pkg/supervisor/supervisor.go b/components/supervisor/pkg/supervisor/supervisor.go index 4942a6c25283d4..1716fb691384be 100644 --- a/components/supervisor/pkg/supervisor/supervisor.go +++ b/components/supervisor/pkg/supervisor/supervisor.go @@ -95,6 +95,13 @@ const ( KindGit = "git" ) +type ShutdownReason int16 + +const ( + ShutdownReasonSuccess ShutdownReason = 0 + ShutdownReasonExecutionError ShutdownReason = 1 +) + // Run serves as main entrypoint to the supervisor func Run(options ...RunOption) { defer log.Info("supervisor shut down") @@ -148,7 +155,7 @@ func Run(options ...RunOption) { ctx, cancel := context.WithCancel(context.Background()) var ( - shutdown = make(chan struct{}) + shutdown = make(chan ShutdownReason, 1) ideReady = &ideReadyState{cond: sync.NewCond(&sync.Mutex{})} cstate = NewInMemoryContentState(cfg.RepoRoot) gitpodService = createGitpodService(cfg, tokenService) @@ -202,7 +209,7 @@ func Run(options ...RunOption) { // When in terminating mode, the reaper will send SIGTERM to each child that gets reparented // to us and is still running. We use this mechanism to send SIGTERM to a shell child processes // that get reparented once their parent shell terminates during shutdown. - terminatingReaper := make(chan bool) + terminatingReaper := make(chan bool, 1) // We keep the reaper until the bitter end because: // - it doesn't need graceful shutdown // - we want to do as much work as possible (SIGTERM'ing reparented processes during shutdown). @@ -220,11 +227,15 @@ func Run(options ...RunOption) { wg.Add(1) go startSSHServer(ctx, cfg, &wg) wg.Add(1) - go taskManager.Run(ctx, &wg) + tasksSuccessChan := make(chan bool, 1) + go taskManager.Run(ctx, &wg, tasksSuccessChan) wg.Add(1) go socketActivationForDocker(ctx, &wg, termMux) - if !cfg.isHeadless() { + if cfg.isHeadless() { + wg.Add(1) + go stopWhenTasksAreDone(ctx, &wg, shutdown, tasksSuccessChan) + } else { wg.Add(1) go portMgmt.Run(ctx, &wg) } @@ -236,18 +247,20 @@ func Run(options ...RunOption) { } log.Error("metadata access is possible - shutting down") - close(shutdown) + shutdown <- ShutdownReasonExecutionError }() } sigChan := make(chan os.Signal, 1) signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM) + var exitCode int select { case <-sigChan: - case <-shutdown: + case shutdownReason := <-shutdown: + exitCode = int(shutdownReason) } - log.Info("received SIGTERM - tearing down") + log.Info("received SIGTERM (or shutdown) - tearing down") terminatingReaper <- true cancel() err = termMux.Close() @@ -260,6 +273,9 @@ func Run(options ...RunOption) { terminateChildProcesses() wg.Wait() + + log.WithField("exitCode", exitCode).Debug("supervisor exit") + os.Exit(exitCode) } func createGitpodService(cfg *Config, tknsrv api.TokenServiceServer) *gitpod.APIoverJSONRPC { @@ -772,6 +788,22 @@ func tunnelOverSSH(ctx context.Context, tunneled *ports.TunneledPortsService, ne <-ctx.Done() } +func stopWhenTasksAreDone(ctx context.Context, wg *sync.WaitGroup, shutdown chan ShutdownReason, successChan <-chan bool) { + defer wg.Done() + defer close(shutdown) + + success := <-successChan + if !success { + // we signal task failure via kubernetes termination log + msg := []byte("headless task failed") + err := ioutil.WriteFile("/dev/termination-log", msg, 0644) + if err != nil { + log.WithError(err).Error("err while writing termination log") + } + } + shutdown <- ShutdownReasonSuccess +} + func startSSHServer(ctx context.Context, cfg *Config, wg *sync.WaitGroup) { defer wg.Done() diff --git a/components/supervisor/pkg/supervisor/tasks.go b/components/supervisor/pkg/supervisor/tasks.go index e4aa8dc40c5113..eab1ba6e4496dc 100644 --- a/components/supervisor/pkg/supervisor/tasks.go +++ b/components/supervisor/pkg/supervisor/tasks.go @@ -205,7 +205,7 @@ func (tm *tasksManager) init(ctx context.Context) { } } -func (tm *tasksManager) Run(ctx context.Context, wg *sync.WaitGroup) { +func (tm *tasksManager) Run(ctx context.Context, wg *sync.WaitGroup, successChan chan bool) { defer wg.Done() defer log.Debug("tasksManager shutdown") @@ -275,7 +275,8 @@ func (tm *tasksManager) Run(ctx context.Context, wg *sync.WaitGroup) { for _, task := range tm.tasks { select { case <-ctx.Done(): - return + success = false + break case taskSuccess := <-task.successChan: if !taskSuccess { success = false @@ -286,6 +287,7 @@ func (tm *tasksManager) Run(ctx context.Context, wg *sync.WaitGroup) { if tm.config.isHeadless() { tm.reporter.done(success) } + successChan <- success } func (tm *tasksManager) getCommand(task *task) string { diff --git a/components/supervisor/pkg/supervisor/tasks_test.go b/components/supervisor/pkg/supervisor/tasks_test.go index 3da98db3d9d223..7b2cd01386f0a8 100644 --- a/components/supervisor/pkg/supervisor/tasks_test.go +++ b/components/supervisor/pkg/supervisor/tasks_test.go @@ -131,7 +131,8 @@ func TestTaskManager(t *testing.T) { contentState.MarkContentReady(test.Source) var wg sync.WaitGroup wg.Add(1) - go taskManager.Run(context.Background(), &wg) + tasksSuccessChan := make(chan bool, 1) + go taskManager.Run(context.Background(), &wg, tasksSuccessChan) wg.Wait() if diff := cmp.Diff(test.ExpectedReporter, reporter); diff != "" { t.Errorf("unexpected output (-want +got):\n%s", diff) diff --git a/components/workspacekit/cmd/rings.go b/components/workspacekit/cmd/rings.go index c32ea1aa64829a..8d40179a6072de 100644 --- a/components/workspacekit/cmd/rings.go +++ b/components/workspacekit/cmd/rings.go @@ -53,13 +53,8 @@ var ring0Cmd = &cobra.Command{ log.Init(ServiceName, Version, true, true) log := log.WithField("ring", 0) - var failed bool - defer func() { - if !failed { - return - } - sleepForDebugging() - }() + exitCode := 1 + defer handleExit(&exitCode) ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() @@ -83,7 +78,6 @@ var ring0Cmd = &cobra.Command{ _, err = client.Teardown(ctx, &daemonapi.TeardownRequest{}) if err != nil { log.WithError(err).Error("cannot trigger teardown") - failed = true return } }() @@ -103,7 +97,6 @@ var ring0Cmd = &cobra.Command{ if err := cmd.Start(); err != nil { log.WithError(err).Error("failed to start ring0") - failed = true return } @@ -150,10 +143,13 @@ var ring0Cmd = &cobra.Command{ } } if err != nil { + if eerr, ok := err.(*exec.ExitError); ok { + exitCode = eerr.ExitCode() + } log.WithError(err).Error("unexpected exit") - failed = true return } + exitCode = 0 // once we get here everythings good }, } @@ -168,13 +164,8 @@ var ring1Cmd = &cobra.Command{ log := log.WithField("ring", 1) defer log.Info("done") - var failed bool - defer func() { - if !failed { - return - } - sleepForDebugging() - }() + exitCode := 1 + defer handleExit(&exitCode) ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() @@ -182,7 +173,6 @@ var ring1Cmd = &cobra.Command{ client, conn, err := connectToInWorkspaceDaemonService(ctx) if err != nil { log.WithError(err).Error("cannot connect to daemon") - failed = true return } defer conn.Close() @@ -195,19 +185,16 @@ var ring1Cmd = &cobra.Command{ _, err = client.WriteIDMapping(ctx, &daemonapi.WriteIDMappingRequest{Pid: int64(os.Getpid()), Gid: false, Mapping: mapping}) if err != nil { log.WithError(err).Error("cannot establish UID mapping") - failed = true return } _, err = client.WriteIDMapping(ctx, &daemonapi.WriteIDMappingRequest{Pid: int64(os.Getpid()), Gid: true, Mapping: mapping}) if err != nil { log.WithError(err).Error("cannot establish GID mapping") - failed = true return } err = syscall.Exec("/proc/self/exe", append(os.Args, "--mapping-established"), os.Environ()) if err != nil { log.WithError(err).Error("cannot exec /proc/self/exe") - failed = true return } return @@ -293,7 +280,6 @@ var ring1Cmd = &cobra.Command{ err = unix.Mount(m.Source, dst, m.FSType, m.Flags, "") if err != nil { log.WithError(err).WithField("dest", dst).Error("cannot establish mount") - failed = true return } } @@ -310,7 +296,6 @@ var ring1Cmd = &cobra.Command{ skt, err := net.Listen("unix", socketFN) if err != nil { log.WithError(err).Error("cannot create socket for ring2") - failed = true return } defer skt.Close() @@ -327,7 +312,6 @@ var ring1Cmd = &cobra.Command{ cmd.Env = env if err := cmd.Start(); err != nil { log.WithError(err).Error("failed to start the child process") - failed = true return } sigc := sigproxy.ForwardAllSignals(context.Background(), cmd.Process.Pid) @@ -337,7 +321,6 @@ var ring1Cmd = &cobra.Command{ err = os.MkdirAll(procLoc, 0755) if err != nil { log.WithError(err).Error("cannot mount proc") - failed = true return } _, err = client.MountProc(ctx, &daemonapi.MountProcRequest{ @@ -346,7 +329,6 @@ var ring1Cmd = &cobra.Command{ }) if err != nil { log.WithError(err).Error("cannot mount proc") - failed = true return } @@ -393,7 +375,6 @@ var ring1Cmd = &cobra.Command{ } if err != nil { log.WithError(err).Error("ring2 did not connect successfully") - failed = true return } @@ -405,7 +386,6 @@ var ring1Cmd = &cobra.Command{ }) if err != nil { log.WithError(err).Error("cannot send ring sync msg to ring2") - failed = true return } @@ -413,7 +393,6 @@ var ring1Cmd = &cobra.Command{ scmpfd, err := receiveSeccmpFd(ring2Conn) if err != nil { log.WithError(err).Error("did not receive seccomp fd from ring2") - failed = true return } @@ -456,10 +435,13 @@ var ring1Cmd = &cobra.Command{ err = cmd.Wait() if err != nil { + if eerr, ok := err.(*exec.ExitError); ok { + exitCode = eerr.ExitCode() + } log.WithError(err).Error("unexpected exit") - failed = true return } + exitCode = 0 // once we get here everythings good }, } @@ -514,19 +496,13 @@ var ring2Cmd = &cobra.Command{ log := log.WithField("ring", 2) defer log.Info("done") - var failed bool - defer func() { - if !failed { - return - } - sleepForDebugging() - }() + exitCode := 1 + defer handleExit(&exitCode) // we talk to ring1 using a Unix socket, so that we can send the seccomp fd across. rconn, err := net.Dial("unix", args[0]) if err != nil { log.WithError(err).Error("cannot connect to parent") - failed = true return } conn := rconn.(*net.UnixConn) @@ -537,19 +513,16 @@ var ring2Cmd = &cobra.Command{ _, err = msgutil.UnmarshalFromReader(conn, &msg) if err != nil { log.WithError(err).Error("cannot read parent message") - failed = true return } if msg.Stage != 1 { log.WithError(err).WithField("msg", fmt.Sprintf("%+q", msg)).Error("expected stage 1 sync message") - failed = true return } err = pivotRoot(msg.Rootfs, msg.FSShift) if err != nil { log.WithError(err).Error("cannot pivot root") - failed = true return } @@ -558,13 +531,11 @@ var ring2Cmd = &cobra.Command{ scmpFd, err := seccomp.LoadFilter() if err != nil { log.WithError(err).Error("cannot load seccomp filter - syscall handling would be broken") - failed = true return } connf, err := conn.File() if err != nil { log.WithError(err).Error("cannot get parent socket fd") - failed = true return } defer connf.Close() @@ -574,16 +545,18 @@ var ring2Cmd = &cobra.Command{ connf.Close() if err != nil { log.WithError(err).Error("cannot send seccomp fd") - failed = true return } err = unix.Exec(ring2Opts.SupervisorPath, []string{"supervisor", "run"}, os.Environ()) if err != nil { + if eerr, ok := err.(*exec.ExitError); ok { + exitCode = eerr.ExitCode() + } log.WithError(err).WithField("cmd", ring2Opts.SupervisorPath).Error("cannot exec") - failed = true return } + exitCode = 0 // once we get here everythings good }, } @@ -663,6 +636,14 @@ func pivotRoot(rootfs string, fsshift api.FSShiftMethod) error { return nil } +func handleExit(ec *int) { + exitCode := *ec + if exitCode != 0 { + sleepForDebugging() + } + os.Exit(exitCode) +} + func sleepForDebugging() { log.Info("sleeping five minutes to allow debugging") sigChan := make(chan os.Signal, 1) @@ -671,7 +652,6 @@ func sleepForDebugging() { case <-sigChan: case <-time.After(5 * time.Minute): } - os.Exit(1) } type ringSyncMsg struct { diff --git a/components/ws-manager-api/core.proto b/components/ws-manager-api/core.proto index ba2562447966a1..044384bbf5cc67 100644 --- a/components/ws-manager-api/core.proto +++ b/components/ws-manager-api/core.proto @@ -303,6 +303,9 @@ message WorkspaceConditions { // first_user_activity is the time when MarkActive was first called on the workspace google.protobuf.Timestamp first_user_activity = 9; + + // headless_task_failed indicates that a headless workspace task failed + string headless_task_failed = 10; } // WorkspaceConditionBool is a trinary bool: true/false/empty diff --git a/components/ws-manager-api/go/core.pb.go b/components/ws-manager-api/go/core.pb.go index 82fd6d33994be3..76dc4ee2137651 100644 --- a/components/ws-manager-api/go/core.pb.go +++ b/components/ws-manager-api/go/core.pb.go @@ -1796,6 +1796,8 @@ type WorkspaceConditions struct { NetworkNotReady WorkspaceConditionBool `protobuf:"varint,8,opt,name=network_not_ready,json=networkNotReady,proto3,enum=wsman.WorkspaceConditionBool" json:"network_not_ready,omitempty"` // first_user_activity is the time when MarkActive was first called on the workspace FirstUserActivity *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=first_user_activity,json=firstUserActivity,proto3" json:"first_user_activity,omitempty"` + // headless_task_failed indicates that a headless workspace task failed + HeadlessTaskFailed string `protobuf:"bytes,10,opt,name=headless_task_failed,json=headlessTaskFailed,proto3" json:"headless_task_failed,omitempty"` } func (x *WorkspaceConditions) Reset() { @@ -1893,6 +1895,13 @@ func (x *WorkspaceConditions) GetFirstUserActivity() *timestamppb.Timestamp { return nil } +func (x *WorkspaceConditions) GetHeadlessTaskFailed() string { + if x != nil { + return x.HeadlessTaskFailed + } + return "" +} + // WorkspaceMetadata is data associated with a workspace that's required for other parts of the system to function type WorkspaceMetadata struct { state protoimpl.MessageState @@ -2554,7 +2563,7 @@ var file_core_proto_rawDesc = []byte{ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x94, 0x04, 0x0a, 0x13, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0xc6, 0x04, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, @@ -2588,164 +2597,167 @@ var file_core_proto_rawDesc = []byte{ 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x66, 0x69, 0x72, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, - 0x74, 0x79, 0x22, 0x7d, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x17, 0x0a, - 0x07, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x6d, 0x65, 0x74, 0x61, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x22, 0x67, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, - 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x70, 0x22, 0x6f, 0x0a, 0x17, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, - 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, - 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8e, 0x04, 0x0a, 0x12, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x70, - 0x65, 0x63, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, - 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, - 0x64, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x69, 0x64, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x66, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, - 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x0c, 0x66, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x46, 0x0a, 0x0b, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x72, 0x12, 0x25, 0x0a, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x53, 0x70, - 0x65, 0x63, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x6e, 0x76, - 0x76, 0x61, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x77, 0x73, 0x6d, - 0x61, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, - 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x76, 0x61, 0x72, 0x73, 0x12, - 0x2b, 0x0a, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x6f, 0x75, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x03, 0x67, - 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, - 0x2e, 0x47, 0x69, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x03, 0x67, 0x69, 0x74, 0x12, 0x18, 0x0a, - 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x73, 0x6d, + 0x74, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x68, 0x65, 0x61, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, + 0x61, 0x73, 0x6b, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x12, 0x68, 0x65, 0x61, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x22, 0x7d, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, + 0x17, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x6d, 0x65, 0x74, 0x61, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x22, 0x67, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6f, 0x64, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x70, 0x22, 0x6f, 0x0a, 0x17, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x52, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x07, - 0x47, 0x69, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x3f, 0x0a, 0x13, 0x45, 0x6e, 0x76, - 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x75, 0x0a, 0x13, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x34, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x2a, 0x34, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x52, 0x4d, - 0x41, 0x4c, 0x4c, 0x59, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4d, 0x4d, 0x45, 0x44, 0x49, - 0x41, 0x54, 0x45, 0x4c, 0x59, 0x10, 0x01, 0x2a, 0x3a, 0x0a, 0x0e, 0x41, 0x64, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x44, 0x4d, - 0x49, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x00, 0x12, - 0x12, 0x0a, 0x0e, 0x41, 0x44, 0x4d, 0x49, 0x54, 0x5f, 0x45, 0x56, 0x45, 0x52, 0x59, 0x4f, 0x4e, - 0x45, 0x10, 0x01, 0x2a, 0x49, 0x0a, 0x0e, 0x50, 0x6f, 0x72, 0x74, 0x56, 0x69, 0x73, 0x69, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x56, 0x49, - 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, - 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, - 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x2a, 0x38, - 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x41, 0x4c, 0x53, - 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x52, 0x55, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, - 0x05, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x10, 0x02, 0x2a, 0x83, 0x01, 0x0a, 0x0e, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, - 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, - 0x47, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, - 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, - 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x45, - 0x44, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, - 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x06, 0x2a, 0x68, - 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4f, 0x50, 0x10, 0x00, - 0x12, 0x19, 0x0a, 0x15, 0x46, 0x55, 0x4c, 0x4c, 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, - 0x43, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x55, 0x50, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x46, - 0x49, 0x58, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x53, 0x10, 0x05, - 0x22, 0x04, 0x08, 0x01, 0x10, 0x01, 0x22, 0x04, 0x08, 0x02, 0x10, 0x02, 0x22, 0x04, 0x08, 0x03, - 0x10, 0x03, 0x22, 0x04, 0x08, 0x06, 0x10, 0x06, 0x2a, 0x40, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x47, - 0x55, 0x4c, 0x41, 0x52, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x45, 0x42, 0x55, 0x49, - 0x4c, 0x44, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x10, 0x02, 0x12, - 0x09, 0x0a, 0x05, 0x47, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x03, 0x32, 0x91, 0x06, 0x0a, 0x10, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, - 0x4c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x12, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, - 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, - 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, - 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, - 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x77, - 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x11, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x1f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x12, 0x17, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x77, - 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x43, 0x0a, 0x0a, 0x4d, 0x61, - 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, - 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x43, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x18, 0x2e, - 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, - 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, - 0x6f, 0x72, 0x74, 0x12, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, - 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, - 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0c, - 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1a, 0x2e, 0x77, - 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, - 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x77, 0x73, - 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x73, - 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2c, - 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, - 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x77, 0x73, - 0x2d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x52, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8e, 0x04, + 0x0a, 0x12, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x53, 0x70, 0x65, 0x63, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, + 0x09, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x69, 0x64, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x0c, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x46, 0x0a, 0x0b, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x50, 0x6f, 0x72, 0x74, + 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x65, + 0x6e, 0x76, 0x76, 0x61, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x77, + 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x76, 0x61, 0x72, + 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x5f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, + 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, + 0x03, 0x67, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x77, 0x73, 0x6d, + 0x61, 0x6e, 0x2e, 0x47, 0x69, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x03, 0x67, 0x69, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x64, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x77, + 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x52, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3b, + 0x0a, 0x07, 0x47, 0x69, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x3f, 0x0a, 0x13, 0x45, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x75, 0x0a, 0x13, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2a, 0x34, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, + 0x52, 0x4d, 0x41, 0x4c, 0x4c, 0x59, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4d, 0x4d, 0x45, + 0x44, 0x49, 0x41, 0x54, 0x45, 0x4c, 0x59, 0x10, 0x01, 0x2a, 0x3a, 0x0a, 0x0e, 0x41, 0x64, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x10, 0x41, + 0x44, 0x4d, 0x49, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, + 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x44, 0x4d, 0x49, 0x54, 0x5f, 0x45, 0x56, 0x45, 0x52, 0x59, + 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x2a, 0x49, 0x0a, 0x0e, 0x50, 0x6f, 0x72, 0x74, 0x56, 0x69, 0x73, + 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4f, 0x52, 0x54, 0x5f, + 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x41, + 0x54, 0x45, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x56, 0x49, 0x53, + 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, + 0x2a, 0x38, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x41, + 0x4c, 0x53, 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x52, 0x55, 0x45, 0x10, 0x01, 0x12, + 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x10, 0x02, 0x2a, 0x83, 0x01, 0x0a, 0x0e, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x0b, 0x0a, + 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, + 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, + 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, + 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, + 0x4e, 0x47, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, + 0x54, 0x45, 0x44, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x49, 0x4e, + 0x47, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x06, + 0x2a, 0x68, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4f, 0x50, + 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x46, 0x55, 0x4c, 0x4c, 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x53, + 0x50, 0x41, 0x43, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x55, 0x50, 0x10, 0x04, 0x12, 0x13, 0x0a, + 0x0f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x53, + 0x10, 0x05, 0x22, 0x04, 0x08, 0x01, 0x10, 0x01, 0x22, 0x04, 0x08, 0x02, 0x10, 0x02, 0x22, 0x04, + 0x08, 0x03, 0x10, 0x03, 0x22, 0x04, 0x08, 0x06, 0x10, 0x06, 0x2a, 0x40, 0x0a, 0x0d, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x52, + 0x45, 0x47, 0x55, 0x4c, 0x41, 0x52, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x45, 0x42, + 0x55, 0x49, 0x4c, 0x44, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x10, + 0x02, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x03, 0x32, 0x91, 0x06, 0x0a, + 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x12, 0x4c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4f, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x4c, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, + 0x0a, 0x11, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x17, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, + 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x43, 0x0a, 0x0a, + 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x18, 0x2e, 0x77, 0x73, 0x6d, + 0x61, 0x6e, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x4d, 0x61, 0x72, + 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x43, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, + 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, + 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1a, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x50, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, + 0x0a, 0x0c, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1a, + 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x77, 0x73, 0x6d, + 0x61, 0x6e, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x10, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, + 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, + 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, + 0x77, 0x73, 0x2d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/components/ws-manager-api/typescript/src/core_pb.d.ts b/components/ws-manager-api/typescript/src/core_pb.d.ts index 7d7a37874ef6a9..6ed6a1f7cf5904 100644 --- a/components/ws-manager-api/typescript/src/core_pb.d.ts +++ b/components/ws-manager-api/typescript/src/core_pb.d.ts @@ -616,6 +616,8 @@ export class WorkspaceConditions extends jspb.Message { clearFirstUserActivity(): void; getFirstUserActivity(): google_protobuf_timestamp_pb.Timestamp | undefined; setFirstUserActivity(value?: google_protobuf_timestamp_pb.Timestamp): WorkspaceConditions; + getHeadlessTaskFailed(): string; + setHeadlessTaskFailed(value: string): WorkspaceConditions; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): WorkspaceConditions.AsObject; @@ -638,6 +640,7 @@ export namespace WorkspaceConditions { deployed: WorkspaceConditionBool, networkNotReady: WorkspaceConditionBool, firstUserActivity?: google_protobuf_timestamp_pb.Timestamp.AsObject, + headlessTaskFailed: string, } } diff --git a/components/ws-manager-api/typescript/src/core_pb.js b/components/ws-manager-api/typescript/src/core_pb.js index b21df72ad62a95..057ed2b197cc5d 100644 --- a/components/ws-manager-api/typescript/src/core_pb.js +++ b/components/ws-manager-api/typescript/src/core_pb.js @@ -4783,7 +4783,8 @@ proto.wsman.WorkspaceConditions.toObject = function(includeInstance, msg) { finalBackupComplete: jspb.Message.getFieldWithDefault(msg, 6, 0), deployed: jspb.Message.getFieldWithDefault(msg, 7, 0), networkNotReady: jspb.Message.getFieldWithDefault(msg, 8, 0), - firstUserActivity: (f = msg.getFirstUserActivity()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + firstUserActivity: (f = msg.getFirstUserActivity()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + headlessTaskFailed: jspb.Message.getFieldWithDefault(msg, 10, "") }; if (includeInstance) { @@ -4857,6 +4858,10 @@ proto.wsman.WorkspaceConditions.deserializeBinaryFromReader = function(msg, read reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setFirstUserActivity(value); break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setHeadlessTaskFailed(value); + break; default: reader.skipField(); break; @@ -4950,6 +4955,13 @@ proto.wsman.WorkspaceConditions.serializeBinaryToWriter = function(message, writ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } + f = message.getHeadlessTaskFailed(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } }; @@ -5134,6 +5146,24 @@ proto.wsman.WorkspaceConditions.prototype.hasFirstUserActivity = function() { }; +/** + * optional string headless_task_failed = 10; + * @return {string} + */ +proto.wsman.WorkspaceConditions.prototype.getHeadlessTaskFailed = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.wsman.WorkspaceConditions} returns this + */ +proto.wsman.WorkspaceConditions.prototype.setHeadlessTaskFailed = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + diff --git a/components/ws-manager-bridge/ee/src/bridge.ts b/components/ws-manager-bridge/ee/src/bridge.ts index 3b48ca48152983..25d1cdab259403 100644 --- a/components/ws-manager-bridge/ee/src/bridge.ts +++ b/components/ws-manager-bridge/ee/src/bridge.ts @@ -75,8 +75,12 @@ export class WorkspaceManagerBridgeEE extends WorkspaceManagerBridge { prebuild.error = status.conditions!.timeout; headlessUpdateType = HeadlessWorkspaceEventType.AbortedTimedOut; } else if (!!status.conditions!.failed) { - prebuild.state = "aborted"; + prebuild.state = "aborted" prebuild.error = status.conditions!.failed; + headlessUpdateType = HeadlessWorkspaceEventType.Aborted; + } else if (!!status.conditions!.headlessTaskFailed) { + prebuild.state = "aborted" + prebuild.error = status.conditions!.headlessTaskFailed; headlessUpdateType = HeadlessWorkspaceEventType.FinishedButFailed; } else { prebuild.state = "available"; diff --git a/components/ws-manager/cmd/debug-headless-log.go b/components/ws-manager/cmd/debug-headless-log.go deleted file mode 100644 index f3a962edb5d877..00000000000000 --- a/components/ws-manager/cmd/debug-headless-log.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2020 Gitpod GmbH. All rights reserved. -// Licensed under the GNU Affero General Public License (AGPL). -// See License-AGPL.txt in the project root for license information. - -package cmd - -import ( - "context" - "fmt" - "os" - "os/signal" - "syscall" - "time" - - "github.com/spf13/cobra" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/gitpod-io/gitpod/common-go/log" - "github.com/gitpod-io/gitpod/ws-manager/pkg/manager" -) - -var debugHeadlessLogNS string - -// debugHeadlessLogCmd represents the debugHeadlessLog command -var debugHeadlessLogCmd = &cobra.Command{ - Use: "headless-log ", - Short: "Starts a headless log listener on any pod and prints to stdout", - Args: cobra.ExactArgs(1), - Run: func(cmd *cobra.Command, args []string) { - clientset, err := newClientSet() - if err != nil { - log.WithError(err).Fatal("cannot connect to Kubernetes") - } - log.Info("connected to Kubernetes") - - pod, err := clientset.CoreV1().Pods(debugHeadlessLogNS).Get(context.Background(), args[0], metav1.GetOptions{}) - if err != nil { - log.WithError(err).Fatal("cannot start listener") - return - } - if pod == nil { - log.Fatal("pod is nil - this should not happen without an error") - return - } - log.WithField("status", pod.Status).Info("debugging") - - listener := manager.NewHeadlessListener(clientset, debugHeadlessLogNS) - var c uint64 - listener.LogLineHandler = func(pod *corev1.Pod, line string) (continueListening bool) { - fmt.Printf("[%d %s] %s\n", c, time.Now().UTC().Format(time.RFC3339Nano), line) - c++ - // log.WithField("pod", pod.Name).Info(line) - return true - } - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - err = listener.Listen(ctx, pod) - if err != nil { - log.WithError(err).Fatal("cannot listen to pod") - return - } - - sigChan := make(chan os.Signal, 1) - signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM) - log.Info("Log listener is running. Stop with SIGINT or CTRL+C") - <-sigChan - log.Info("Received SIGINT - shutting down") - }, -} - -func init() { - debugCmd.AddCommand(debugHeadlessLogCmd) - - debugHeadlessLogCmd.PersistentFlags().StringVar(&debugHeadlessLogNS, "namespace", "", "Kubernetes namespace to work with") -} diff --git a/components/ws-manager/cmd/root.go b/components/ws-manager/cmd/root.go index 6acf0fc0813a1b..93621558beb269 100644 --- a/components/ws-manager/cmd/root.go +++ b/components/ws-manager/cmd/root.go @@ -12,12 +12,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/spf13/cobra" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/clientcmd" "github.com/gitpod-io/gitpod/common-go/grpc" - wsk8s "github.com/gitpod-io/gitpod/common-go/kubernetes" "github.com/gitpod-io/gitpod/common-go/log" "github.com/gitpod-io/gitpod/common-go/tracing" "github.com/gitpod-io/gitpod/content-service/pkg/storage" @@ -114,21 +110,3 @@ type config struct { Addr string `json:"addr"` } `json:"prometheus"` } - -func newClientSet() (*kubernetes.Clientset, error) { - if kubeconfig != "" { - res, err := clientcmd.BuildConfigFromFlags("", kubeconfig) - if err != nil { - return nil, err - } - res.RateLimiter = &wsk8s.UnlimitedRateLimiter{} - return kubernetes.NewForConfig(res) - } - - k8s, err := rest.InClusterConfig() - if err != nil { - return nil, err - } - k8s.RateLimiter = &wsk8s.UnlimitedRateLimiter{} - return kubernetes.NewForConfig(k8s) -} diff --git a/components/ws-manager/pkg/manager/create.go b/components/ws-manager/pkg/manager/create.go index 30860cad0da0fc..b13bb7fea877c2 100644 --- a/components/ws-manager/pkg/manager/create.go +++ b/components/ws-manager/pkg/manager/create.go @@ -489,7 +489,7 @@ func (m *Manager) createWorkspaceContainer(startContext *startWorkspaceContext) ReadinessProbe: readinessProbe, Env: env, Command: command, - TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError, + TerminationMessagePolicy: corev1.TerminationMessageReadFile, }, nil } func (m *Manager) createWorkspaceEnvironment(startContext *startWorkspaceContext) ([]corev1.EnvVar, error) { diff --git a/components/ws-manager/pkg/manager/headless.go b/components/ws-manager/pkg/manager/headless.go deleted file mode 100644 index 2a75cfe657311d..00000000000000 --- a/components/ws-manager/pkg/manager/headless.go +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright (c) 2020 Gitpod GmbH. All rights reserved. -// Licensed under the GNU Affero General Public License (AGPL). -// See License-AGPL.txt in the project root for license information. - -package manager - -import ( - "bufio" - "context" - "encoding/json" - "io" - "strings" - "sync" - "time" - - "golang.org/x/xerrors" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/kubernetes" - - wsk8s "github.com/gitpod-io/gitpod/common-go/kubernetes" - "github.com/gitpod-io/gitpod/common-go/log" -) - -// HeadlessListener can listen to workspace pods, parse the Theia produced output and notify a consumer -type HeadlessListener struct { - OnHeadlessDone func(pod *corev1.Pod, failed bool) - OnHeadlessLog func(pod *corev1.Pod, log string) - LogLineHandler func(pod *corev1.Pod, line string) (continueListening bool) - - clientset kubernetes.Interface - namespace string - - listeners map[string]bool - listenersLock *sync.Mutex - - logStreamProvider func(pod *corev1.Pod, container string, from time.Time) (io.ReadCloser, error) - listenerTimeout time.Duration -} - -// NewHeadlessListener creates a structure that maintains a group of listeners which interprete Theia output for headless workspaces -func NewHeadlessListener(clientset kubernetes.Interface, namespace string) *HeadlessListener { - hl := &HeadlessListener{ - clientset: clientset, - namespace: namespace, - listeners: make(map[string]bool), - listenersLock: &sync.Mutex{}, - listenerTimeout: listenerTimeout, - OnHeadlessDone: func(pod *corev1.Pod, failed bool) {}, - OnHeadlessLog: func(pod *corev1.Pod, log string) {}, - } - hl.logStreamProvider = hl.kubernetesLogStreamProvider - hl.LogLineHandler = hl.handleLogLine - return hl -} - -func (hl *HeadlessListener) kubernetesLogStreamProvider(pod *corev1.Pod, container string, from time.Time) (io.ReadCloser, error) { - req := hl.clientset.CoreV1().Pods(hl.namespace).GetLogs(pod.Name, &corev1.PodLogOptions{ - Container: container, - Previous: false, - Timestamps: true, // we need timestamps to tell whether we have read a certain line already - Follow: true, - SinceTime: &metav1.Time{Time: from}, - }) - logs, err := req.Stream(context.Background()) - if err != nil { - return nil, err - } - - return logs, nil -} - -// Listen starts listening to a pod until the pod is stopped or the context is canceled -func (hl *HeadlessListener) Listen(ctx context.Context, pod *corev1.Pod) error { - hl.listenersLock.Lock() - if _, alreadyListening := hl.listeners[pod.Name]; alreadyListening { - hl.listenersLock.Unlock() - return nil - } - hl.listeners[pod.Name] = true - hl.listenersLock.Unlock() - - err := hl.listenAndRetry(ctx, pod, "workspace") - if err != nil { - return err - } - - return nil -} - -func (hl *HeadlessListener) handleLogLine(pod *corev1.Pod, line string) (continueListening bool) { - var taskMsg taskLogMessage - var originalMsg workspaceLogMessage - err := json.Unmarshal([]byte(line), &originalMsg) - if err != nil { - var legacyOriginalMsg theiaLogMessage - err := json.Unmarshal([]byte(line), &legacyOriginalMsg) - if err != nil || legacyOriginalMsg.Component != "workspace" { - return true - } - taskMsg = legacyOriginalMsg.Message - } else { - if originalMsg.Component != "workspace" { - return true - } - taskMsg = originalMsg.Message - } - if taskMsg.Type == "workspaceTaskOutput" { - hl.OnHeadlessLog(pod, taskMsg.Data) - return true - } - - log.WithFields(wsk8s.GetOWIFromObject(&pod.ObjectMeta)).WithField("type", taskMsg.Type).Info("headless workspace is done") - if taskMsg.Type == "workspaceTaskFailed" || taskMsg.Type == "workspaceTaskDone" { - hl.OnHeadlessDone(pod, taskMsg.Type == "workspaceTaskFailed") - return false - } - - log.WithField("type", taskMsg.Type).Warn("unknown headless log type") - return true -} - -type taskLogMessage struct { - Type string `json:"type"` - Data string `json:"data"` -} - -type workspaceLogMessage struct { - Message taskLogMessage `json:"taskLogMsg"` - Component string `json:"component"` -} - -//region backward compatibility -type theiaLogMessage struct { - Message taskLogMessage `json:"message"` - Component string `json:"component"` -} - -//endregion - -const ( - // timeout in seconds, default 3 seconds. Actual timeout is this number multiplied by the number of retries. - listenerTimeout = 3 * time.Second - - // number of retries after timeout without data being send - // with 50 retries and 3 seconds timeout we cover ~60 minutes of inactivity - listenerAttempts = 50 -) - -type channelCloser struct { - Delegate io.Closer - C chan struct{} - - once sync.Once -} - -func (cc *channelCloser) Close() (err error) { - cc.once.Do(func() { - close(cc.C) - err = cc.Delegate.Close() - }) - return -} - -// The Kubernetes log stream just stops sending new content at some point without any notice or error (see see https://github.com/kubernetes/kubernetes/issues/59477). -// This function times out if we don't see any log output in a certain amount of time (with linear back off). Upon timeout, we try and reconnect -// to the log output. -func (hl *HeadlessListener) listenAndRetry(ctx context.Context, pod *corev1.Pod, container string) (err error) { - owi := wsk8s.GetOWIFromObject(&pod.ObjectMeta) - err = ctx.Err() - if err != nil { - return err - } - - // We have two Go routines here: one that tries to read from the pod and gets restarted every now and then, - // and the "gouvernor" which initiates said restarting (defined below). - lastLineReadChan := make(chan string) - startListener := func(from time.Time) (stopListening io.Closer, err error) { - logs, err := hl.logStreamProvider(pod, container, from) - if err != nil { - return nil, err - } - - closer := &channelCloser{ - C: make(chan struct{}), - Delegate: logs, - } - go func() { - log.Debug("Start listener") - scanner := bufio.NewScanner(logs) - for scanner.Scan() { - l := scanner.Text() - if len(l) == 0 { - continue - } - select { - case lastLineReadChan <- l: - case <-closer.C: - // logs were closed while we were trying to send to lastLineReadChan. - // This is as good as if the scanner were closed and Scan() returned false. - break - } - } - - // Note: we deliberately do not handle a scanner error here. That's because - // err'ing here is not much of a problem as the timeout will catch this. We're not even logging errors here - // as they have little to say. If a pod disappears or we fail to read its logs, we'll just retry the next time around. - // - // It's dangerous to explicitely restart the the listener if the scanner fails (e.g. using a channel to the gouvernor), - // as this easily results in an infinite loop. A previous design of this program suffered from exactly this issue. - }() - - return closer, nil - } - - // try and connect for the first time - if that fails, we're done - if pod.Status.StartTime == nil { - return xerrors.Errorf("pod is not running") - } - fromPodStartup := pod.Status.StartTime.Time - logs, err := startListener(fromPodStartup) - if err != nil { - return err - } - - // the gouvernor checks if the log read timed out of err'd. In either case it restarts the listener. - timeout := time.NewTimer(hl.listenerTimeout) - go func() { - var ( - attempts = 0 - - from = fromPodStartup - oldLogs = logs - err error - ) - - for { - select { - case <-ctx.Done(): - // context has finished/was canceled ... tear things down - if oldLogs != nil { - oldLogs.Close() - } - return - - case <-timeout.C: - log.WithFields(owi).WithField("attempt", attempts).Debug("log listener timed out") - - // the timout timer has hit - tear things down and maybe restart - if oldLogs != nil { - oldLogs.Close() - } - - attempts++ - if attempts >= listenerAttempts { - // we're exhaused - let's stop trying - log.WithFields(owi).WithError(err).WithField("attempt", attempts).Error("exhausted all attempts listening for log output") - return - } - - // reconnect (code duplication due to https://github.com/golang/go/issues/23196) - oldLogs, err = startListener(from) - if err != nil { - // we failed to connect - wait for the timeout (without back-off) to try again - log.WithFields(owi).WithError(err).WithField("attempt", attempts).Warn("failed while attempting to re-connect to pod log output") - } - timeout.Reset(time.Duration(attempts) * hl.listenerTimeout) - - case line := <-lastLineReadChan: - // we split on the first whitespace. format is " " - parts := strings.SplitN(line, " ", 2) - - ts, err := time.Parse(time.RFC3339Nano, parts[0]) - if err != nil { - log.WithFields(owi).WithError(err).WithField("attempt", attempts).WithField("line", line).Error("cannot parse last log timestamp - discarding line") - continue - } - - // Kubernetes isn't precise when retrieving logs starting from a certain point in time (see https://github.com/kubernetes/kubernetes/issues/77856). - // Thus we have to filter ourselves to prevent duplicate log lines. - if ts.Sub(from) <= 0*time.Second { - // line is older than the one we last read - ignore it - continue - } - - payload := parts[1] - continueListening := hl.LogLineHandler(pod, payload) - if !continueListening { - log.WithFields(owi).Info("finished listening to log output") - oldLogs.Close() - return - } - - from = ts - attempts = 0 - - // we've just seen a line - reset the timer after draining it. This is not done conccurent with other receives as only this - // goroutine receives from the timer channel. - if !timeout.Stop() { - <-timeout.C - } - timeout.Reset(hl.listenerTimeout) - } - - } - }() - - return nil -} diff --git a/components/ws-manager/pkg/manager/headless_test.go b/components/ws-manager/pkg/manager/headless_test.go deleted file mode 100644 index 9f16ee553390ba..00000000000000 --- a/components/ws-manager/pkg/manager/headless_test.go +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright (c) 2020 Gitpod GmbH. All rights reserved. -// Licensed under the GNU Affero General Public License (AGPL). -// See License-AGPL.txt in the project root for license information. - -package manager - -import ( - "bytes" - "context" - "fmt" - "io" - "strings" - "sync" - "testing" - "time" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func newDummyCloser(r io.Reader) io.ReadCloser { - return &dummyRC{ - Reader: r, - } -} - -type dummyRC struct { - io.Reader - - Closed bool -} - -func (r *dummyRC) Close() error { - r.Closed = true - return nil -} - -func TestHeadlessLogFirstAttempt(t *testing.T) { - shouldFailErr := fmt.Errorf("stream provider fail") - - cases := []struct { - Name string - StreamProviderErr error - ExpectedErr error - }{ - {"should-fail", shouldFailErr, shouldFailErr}, - {"should-succeed", nil, nil}, - } - - for _, c := range cases { - mgr := forTestingOnlyGetManager(t) - listener := NewHeadlessListener(mgr.RawClient, "") - listener.listenerTimeout = 100 * time.Millisecond - listener.logStreamProvider = func(pod *corev1.Pod, container string, from time.Time) (io.ReadCloser, error) { - if c.StreamProviderErr != nil { - return nil, c.StreamProviderErr - } - - return newDummyCloser(bytes.NewReader([]byte{})), nil - } - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - err := listener.Listen(ctx, &corev1.Pod{ - Status: corev1.PodStatus{ - StartTime: &metav1.Time{Time: time.Now()}, - }, - }) - if err != c.ExpectedErr { - t.Errorf("expected error when establishing listener: expected %v, got %v", c.ExpectedErr, err) - } - } -} - -//nolint:unused -func newSegmentedStream(segments []string) *segmentedStream { - return &segmentedStream{ - Segments: segments, - Seg: -1, - Done: make(chan struct{}), - OnEvt: func(block, closed bool) {}, - c: make(chan struct{}), - } -} - -// segmentedStream simulates the kubernetes behaviour where the log output suddenly stops until we reconnect -type segmentedStream struct { - Segments []string - Seg int - Done chan struct{} - OnEvt func(block, closed bool) - - mu sync.Mutex - r io.Reader - c chan struct{} -} - -func (s *segmentedStream) Read(b []byte) (n int, err error) { - s.mu.Lock() - - if s.Seg < 0 { - s.mu.Unlock() - return 0, fmt.Errorf("missing call to Advance()") - } - if s.Seg >= len(s.Segments) { - s.mu.Unlock() - return 0, io.EOF - } - - if s.r == nil { - s.r = bytes.NewReader([]byte(s.Segments[s.Seg])) - } - - n, err = s.r.Read(b) - s.mu.Unlock() - - if err == io.EOF { - if n == 0 { - // wait for closure - s.OnEvt(true, false) - <-s.c - } - - // reset io error to simulate blocking k8s - err = nil - } - - return -} - -func (s *segmentedStream) Close() error { - s.mu.Lock() - if s.r == nil { - s.mu.Unlock() - return fmt.Errorf("not open") - } - s.mu.Unlock() - - s.c <- struct{}{} - s.OnEvt(false, true) - return nil -} - -func (s *segmentedStream) Advance() { - s.mu.Lock() - defer s.mu.Unlock() - - if s.Seg >= len(s.Segments) { - return - } - - s.r = nil - s.Seg++ - - if s.Seg >= len(s.Segments) { - close(s.Done) - } -} - -func TestHeadlessLogTimeout(t *testing.T) { - t.Skipf("skipping flaky log timeout test") - - mgr := forTestingOnlyGetManager(t) - listener := NewHeadlessListener(mgr.RawClient, "") - listener.listenerTimeout = 100 * time.Millisecond - - t0, err := time.Parse(time.RFC3339Nano, "2009-11-10T23:00:00Z") - if err != nil { - t.Errorf("invalid test fixture: %v", err) - return - } - - segs := make([]string, 2) - t1 := t0 - for si := range segs { - var seg string - - if si > 0 { - // to test if the log listener rejects old messages we prepent some of the previous segment to this one - origin := strings.Split(segs[si-1], "\n") - for li := len(origin) / 2; li < len(origin); li++ { - seg += origin[li] + "\n" - } - } - - for li := 0; li < 10; li++ { - t1 = t1.Add(50 * time.Millisecond) - seg += fmt.Sprintf("%s seg:%d line:%d\n", t1.Format(time.RFC3339Nano), si, li) - } - segs[si] = seg - } - - type PType struct { - Blocked bool - Closed bool - NewStream bool - Line bool - } - type P struct { - Type PType - Line string - } - var ( - p []P - pm sync.Mutex - ) - - in := newSegmentedStream(segs) - in.OnEvt = func(blocked, closed bool) { - pm.Lock() - p = append(p, P{Type: PType{Blocked: blocked, Closed: closed}}) - pm.Unlock() - } - listener.logStreamProvider = func(pod *corev1.Pod, container string, from time.Time) (io.ReadCloser, error) { - pm.Lock() - p = append(p, P{Type: PType{NewStream: true}}) - pm.Unlock() - - in.Advance() - return in, nil - } - listener.LogLineHandler = func(pod *corev1.Pod, line string) (continueListening bool) { - pm.Lock() - p = append(p, P{Type: PType{Line: true}, Line: line}) - pm.Unlock() - return true - } - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - err = listener.Listen(ctx, &corev1.Pod{ - Status: corev1.PodStatus{ - StartTime: &metav1.Time{Time: t0}, - }, - }) - if err != nil { - t.Errorf("cannot start listening to pod: %v", err) - return - } - - select { - case <-in.Done: - case <-time.After(5 * time.Second): - t.Errorf("timeout") - return - } - - // verify protocol - if len(p) == 0 { - t.Errorf("missing test protocol") - return - } - - pi := 0 - if !p[pi].Type.NewStream { - t.Errorf("logStreamProvider isn't asked for a new stream") - } - pi++ - for li := 0; li < 10; li++ { - exp := fmt.Sprintf("seg:0 line:%d", li) - if !p[pi].Type.Line || p[pi].Line != exp { - t.Errorf("line mismatch: expected line == \"%s\" in %+v", exp, p[pi]) - } - pi++ - } - if !p[pi].Type.Blocked { - t.Errorf("segmentedReader did not block when it should have") - } - pi++ - - // once blocked we expect that the stream be closed and a new opened (in no particular order) - var closed, opened bool - for i := 0; i < 2; i++ { - closed = closed || p[pi].Type.Closed - opened = opened || p[pi].Type.NewStream - pi++ - } - if !closed { - t.Errorf("headless listener did not close old stream") - } - if !opened { - t.Errorf("logStreamProvider wasn't asked for a new stream") - } - - for li := 0; li < 10; li++ { - // we only expect seg1 lines as the seg0 lines (although emitted by our mock reader) are too old - // at this point. - exp := fmt.Sprintf("seg:1 line:%d", li) - - if p[pi].Type.Blocked { - // we have a stray block in here because we have no control over the read behaviour of the scanner. - // ignore the block - li-- - } else if !p[pi].Type.Line || p[pi].Line != exp { - t.Errorf("line mismatch: expected line == \"%s\" in %+v", exp, p[pi]) - } - pi++ - } -} - -type blockingReader struct { - Closer chan struct{} -} - -func (r *blockingReader) Read(b []byte) (n int, err error) { - <-r.Closer - return 0, io.EOF -} - -func (r *blockingReader) Close() error { - close(r.Closer) - return nil -} - -func TestHeadlessLogTotalTimeout(t *testing.T) { - mgr := forTestingOnlyGetManager(t) - listener := NewHeadlessListener(mgr.RawClient, "") - listener.listenerTimeout = 1 * time.Millisecond - - var ( - mu sync.Mutex - lsc int - done = make(chan struct{}) - ) - listener.logStreamProvider = func(pod *corev1.Pod, container string, from time.Time) (io.ReadCloser, error) { - mu.Lock() - lsc++ - if lsc >= listenerAttempts { - close(done) - } - mu.Unlock() - - return &blockingReader{make(chan struct{})}, nil - } - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - err := listener.Listen(ctx, &corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - workspaceIDAnnotation: "TestHeadlessLogTotalTimeout", - }, - }, - Status: corev1.PodStatus{ - StartTime: &metav1.Time{Time: time.Now()}, - }, - }) - if err != nil { - t.Errorf("cannot establish initial listener: %v", err) - } - - select { - case <-time.After(15 * time.Second): - t.Errorf("timeout. logStreamProvider call count: %d", lsc) - case <-done: - } -} diff --git a/components/ws-manager/pkg/manager/manager.go b/components/ws-manager/pkg/manager/manager.go index 1f35053ce42707..176fff24c9dad4 100644 --- a/components/ws-manager/pkg/manager/manager.go +++ b/components/ws-manager/pkg/manager/manager.go @@ -365,7 +365,7 @@ func (m *Manager) stopWorkspace(ctx context.Context, workspaceID string, gracePe // If the status is nil (e.g. because an error occured), we'll still try and stop the workspace // This is merely an optimization that prevents deleting the workspace pod multiple times. // If we do try and delete the pod a few times though, that's ok, too. - if status.Phase == api.WorkspacePhase_STOPPING { + if isPodBeingDeleted(pod) { return nil } } @@ -949,15 +949,6 @@ func (m *Manager) onChange(ctx context.Context, status *api.WorkspaceStatus) { } } -// OnWorkspaceLog notifies subscribers about a headless log message -func (m *Manager) OnWorkspaceLog(ctx context.Context, log *api.WorkspaceLogMessage) { - // We do not extract trace header for log messages to keep the effort/CPU load/bandwidth minimal. - // We wouldn't want any of this in Jaeger anyways to keep the load on Jaeger low. - m.publishToSubscribers(ctx, &api.SubscribeResponse{ - Payload: &api.SubscribeResponse_Log{Log: log}, - }) -} - // GetWorkspaces produces a list of running workspaces and their status func (m *Manager) GetWorkspaces(ctx context.Context, req *api.GetWorkspacesRequest) (res *api.GetWorkspacesResponse, err error) { span, ctx := tracing.FromContext(ctx, "GetWorkspaces") diff --git a/components/ws-manager/pkg/manager/monitor.go b/components/ws-manager/pkg/manager/monitor.go index c57fd53fe482c3..5ccb579a9efafe 100644 --- a/components/ws-manager/pkg/manager/monitor.go +++ b/components/ws-manager/pkg/manager/monitor.go @@ -74,8 +74,6 @@ type Monitor struct { finalizerMap map[string]context.CancelFunc finalizerMapLock sync.Mutex - headlessListener *HeadlessListener - OnError func(error) } @@ -88,24 +86,16 @@ func (m *Manager) CreateMonitor() (*Monitor, error) { log.WithField("interval", monitorInterval).Info("starting workspace monitor") res := Monitor{ - manager: m, - ticker: time.NewTicker(monitorInterval), - probeMap: make(map[string]context.CancelFunc), - initializerMap: make(map[string]struct{}), - finalizerMap: make(map[string]context.CancelFunc), - headlessListener: NewHeadlessListener(m.RawClient, m.Config.Namespace), + manager: m, + ticker: time.NewTicker(monitorInterval), + probeMap: make(map[string]context.CancelFunc), + initializerMap: make(map[string]struct{}), + finalizerMap: make(map[string]context.CancelFunc), OnError: func(err error) { log.WithError(err).Error("workspace monitor error") }, } - res.headlessListener.OnHeadlessLog = res.handleHeadlessLog - res.headlessListener.OnHeadlessDone = func(pod *corev1.Pod, failed bool) { - err := res.actOnHeadlessDone(pod, failed) - if err != nil { - log.WithFields(wsk8s.GetOWIFromObject(&pod.ObjectMeta)).WithError(err).Error("cannot handle headless workspace event") - } - } res.eventpool = workpool.NewEventWorkerPool(res.handleEvent) return &res, nil @@ -289,10 +279,6 @@ func (m *Monitor) actOnPodEvent(ctx context.Context, status *api.WorkspaceStatus } if status.Phase == api.WorkspacePhase_INITIALIZING { - if wso.IsWorkspaceHeadless() { - return - } - // workspace is initializing (i.e. running but without the ready annotation yet). Start probing and depending on // the result add the appropriate annotation or stop the workspace. waitForWorkspaceReady takes care that it does not // run for the same workspace multiple times. @@ -317,15 +303,6 @@ func (m *Monitor) actOnPodEvent(ctx context.Context, status *api.WorkspaceStatus return xerrors.Errorf("cannot add gitpod finalizer: %w", err) } - if tpe, _ := wso.WorkspaceType(); wso.IsWorkspaceHeadless() && tpe != api.WorkspaceType_GHOST { - // this is a headless workspace, which means that instead of probing for it becoming available, we'll listen to its log - // output, parse it and forward it. Listen() is idempotent. - err := m.headlessListener.Listen(context.Background(), pod) - if err != nil { - return xerrors.Errorf("cannot establish listener: %w", err) - } - } - // once a regular workspace is up and running, we'll remove the traceID information so that the parent span // ends once the workspace has started. // @@ -338,6 +315,15 @@ func (m *Monitor) actOnPodEvent(ctx context.Context, status *api.WorkspaceStatus } if status.Phase == api.WorkspacePhase_STOPPING { + if !isPodBeingDeleted(pod) { + // this might be the case if a headless workspace has just completed but has not been deleted by anyone, yet + err := m.manager.stopWorkspace(ctx, workspaceID, stopWorkspaceNormallyGracePeriod) + if err != nil && !isKubernetesObjNotFoundError(err) { + return xerrors.Errorf("cannot stop workspace: %w", err) + } + return nil + } + var terminated bool for _, c := range wso.Pod.Status.ContainerStatuses { if c.Name == "workspace" { @@ -365,101 +351,6 @@ func (m *Monitor) actOnPodEvent(ctx context.Context, status *api.WorkspaceStatus return nil } -// actOnHeadlessDone performs actions when a headless workspace finishes. -func (m *Monitor) actOnHeadlessDone(pod *corev1.Pod, failed bool) (err error) { - wso := workspaceObjects{Pod: pod} - - // This timeout is really a catch-all safety net in case any of the ws-daemon interaction - // goes out of hand. Really it should never play a role. - ctx, cancel := context.WithTimeout(context.Background(), 1*time.Hour) - defer cancel() - - span := m.traceWorkspace("actOnHeadlessDone", &wso) - ctx = opentracing.ContextWithSpan(ctx, span) - defer tracing.FinishSpan(span, &err) - log := log.WithFields(wsk8s.GetOWIFromObject(&pod.ObjectMeta)) - - id, ok := pod.Annotations[workspaceIDAnnotation] - if !ok { - return xerrors.Errorf("cannot get %s annotation from %s", workspaceIDAnnotation, pod.Name) - } - - // Headless workspaces need to maintain their "failure state" so that we can provide feedback to users down the road. - // That means that the moment anything goes wrong with headless workspaces we need to fail the workspace to issue a status update. - handleFailure := func(msg string) error { - // marking the workspace as tasked failed will cause the workspace to fail as a whole which in turn will make the monitor actually stop it - err := m.manager.markWorkspace(context.Background(), id, addMark(workspaceExplicitFailAnnotation, msg)) - if err == nil || isKubernetesObjNotFoundError(err) { - // workspace is gone - we're good - return nil - } - - // log error and try to stop the workspace - log.WithError(err).Warn("cannot mark headless workspace as failed - stopping myself") - err = m.manager.stopWorkspace(context.Background(), id, stopWorkspaceNormallyGracePeriod) - if err == nil || isKubernetesObjNotFoundError(err) { - // workspace is gone - we're good - return nil - } - - // we've failed to mark the workspace or remove it - that's bad - log.WithError(err).Error("was unable to mark workspace as failed or stop it") - return err - } - - // headless build is done - if this is a prebuild take a snapshot and tell the world - tpe, err := wso.WorkspaceType() - if err != nil { - // We know we're working with a headless workspace, but don't know its type. This really should never happen. - // For now we'll just assume this is a headless workspace. Better we create one snapshot too many that too few. - tracing.LogError(span, err) - log.WithError(err).Warn("cannot determine workspace type - assuming this is a prebuild") - tpe = api.WorkspaceType_PREBUILD - } - if tpe == api.WorkspaceType_PREBUILD { - snc, err := m.manager.connectToWorkspaceDaemon(ctx, wso) - if err != nil { - tracing.LogError(span, err) - return handleFailure(fmt.Sprintf("cannot take snapshot: %v", err)) - } - res, err := snc.TakeSnapshot(ctx, &wsdaemon.TakeSnapshotRequest{Id: id}) - if err != nil { - tracing.LogError(span, err) - return handleFailure(fmt.Sprintf("cannot take snapshot: %v", err)) - } - - err = m.manager.markWorkspace(context.Background(), id, addMark(workspaceSnapshotAnnotation, res.Url)) - if err != nil { - tracing.LogError(span, err) - log.WithError(err).Warn("cannot mark headless workspace with snapshot - that's one prebuild lost") - return handleFailure(fmt.Sprintf("cannot remember snapshot: %v", err)) - } - } - - // healthy prebuilds don't fail the workspace, thus we have to stop them ourselves - err = m.manager.stopWorkspace(ctx, id, stopWorkspaceNormallyGracePeriod) - if err != nil { - log.WithError(err).Error("unable to stop finished headless workspace") - } - - return nil -} - -func (m *Monitor) handleHeadlessLog(pod *corev1.Pod, msg string) { - id, ok := pod.Annotations[workspaceIDAnnotation] - if !ok { - log.WithFields(wsk8s.GetOWIFromObject(&pod.ObjectMeta)).Errorf("cannot get %s annotation from %s", workspaceIDAnnotation, pod.Name) - return - } - - evt := &api.WorkspaceLogMessage{ - Id: id, - Metadata: getWorkspaceMetadata(pod), - Message: msg, - } - m.manager.OnWorkspaceLog(context.Background(), evt) -} - // doHouskeeping is called regularly by the monitor and removes timed out or dangling workspaces/services func (m *Monitor) doHousekeeping(ctx context.Context) { span, ctx := tracing.FromContext(ctx, "doHousekeeping") @@ -834,15 +725,16 @@ func retryIfUnavailable(ctx context.Context, op func(ctx context.Context) error) return grpc_status.Error(codes.Unavailable, "workspace content initialization is currently unavailable") } -// finalizeWorkspaceContent talks to a ws-daemon daemon on the node of the pod and initializes the workspace content. +// finalizeWorkspaceContent talks to a ws-daemon daemon on the node of the pod and creates a backup of the workspace content. func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceObjects) { span, ctx := tracing.FromContext(ctx, "finalizeWorkspaceContent") defer tracing.FinishSpan(span, nil) + log := log.WithFields(wso.GetOWI()) workspaceID, ok := wso.WorkspaceID() if !ok { tracing.LogError(span, xerrors.Errorf("cannot find %s annotation", workspaceIDAnnotation)) - log.WithFields(wso.GetOWI()).Errorf("cannot find %s annotation", workspaceIDAnnotation) + log.Errorf("cannot find %s annotation", workspaceIDAnnotation) } var disposalStatus *workspaceDisposalStatus @@ -853,17 +745,25 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb b, err := json.Marshal(disposalStatus) if err != nil { - log.WithError(err).WithFields(wso.GetOWI()).Error("unable to marshal disposalStatus - this will break someone's experience") + log.WithError(err).Error("unable to marshal disposalStatus - this will break someone's experience") return } err = m.manager.markWorkspace(ctx, workspaceID, addMark(disposalStatusAnnotation, string(b))) if err != nil { - log.WithError(err).WithFields(wso.GetOWI()).Error("was unable to update pod's disposal state - this will break someone's experience") + log.WithError(err).Error("was unable to update pod's disposal state - this will break someone's experience") } }() + tpe, err := wso.WorkspaceType() + if err != nil { + tracing.LogError(span, err) + log.WithError(err).Warn("cannot determine workspace type - assuming this is a regular") + tpe = api.WorkspaceType_REGULAR + } + doBackup := wso.WasEverReady() && !wso.IsWorkspaceHeadless() + doSnapshot := tpe == api.WorkspaceType_PREBUILD doFinalize := func() (worked bool, gitStatus *csapi.GitStatus, err error) { m.finalizerMapLock.Lock() _, alreadyFinalizing := m.finalizerMap[workspaceID] @@ -877,7 +777,7 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb // we don't have a nodeName we don't need to dipose the workspace. // Obviously that only holds if we do not require a backup. If we do require one, we want to // fail as loud as we can in this case. - if !doBackup && wso.NodeName() == "" { + if !doBackup && !doSnapshot && wso.NodeName() == "" { // we don't need a backup and have never spoken to ws-daemon: we're good here. m.finalizerMapLock.Unlock() return true, &csapi.GitStatus{}, nil @@ -893,6 +793,32 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb ctx, cancelReq := context.WithTimeout(ctx, time.Duration(m.manager.Config.Timeouts.ContentFinalization)) m.finalizerMap[workspaceID] = cancelReq m.finalizerMapLock.Unlock() + defer func() { + // we're done disposing - remove from the finalizerMap + m.finalizerMapLock.Lock() + delete(m.finalizerMap, workspaceID) + m.finalizerMapLock.Unlock() + }() + + if doSnapshot { + // if this is a prebuild take a snapshot and mark the workspace + var res *wsdaemon.TakeSnapshotResponse + res, err = snc.TakeSnapshot(ctx, &wsdaemon.TakeSnapshotRequest{Id: workspaceID}) + if err != nil { + tracing.LogError(span, err) + log.WithError(err).Warn("cannot take snapshot") + err = fmt.Errorf("cannot take snapshot: %v", err) + } + + if res != nil { + err = m.manager.markWorkspace(context.Background(), workspaceID, addMark(workspaceSnapshotAnnotation, res.Url)) + if err != nil { + tracing.LogError(span, err) + log.WithError(err).Warn("cannot mark headless workspace with snapshot - that's one prebuild lost") + err = fmt.Errorf("cannot remember snapshot: %v", err) + } + } + } // DiposeWorkspace will "degenerate" to a simple wait if the finalization/disposal process is already running. // This is unlike the initialization process where we wait for things to finish in a later phase. @@ -903,12 +829,6 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb if resp != nil { gitStatus = resp.GitStatus } - - // we're done disposing - remove from the finalizerMap - m.finalizerMapLock.Lock() - delete(m.finalizerMap, workspaceID) - m.finalizerMapLock.Unlock() - return true, gitStatus, err } @@ -948,7 +868,7 @@ func (m *Monitor) finalizeWorkspaceContent(ctx context.Context, wso *workspaceOb } // service was available, we've tried to do the work and failed. Tell the world about it. - if doBackup && isGRPCError { + if (doBackup || doSnapshot) && isGRPCError { switch st.Code() { case codes.DataLoss: // ws-daemon told us that it's lost data diff --git a/components/ws-manager/pkg/manager/status.go b/components/ws-manager/pkg/manager/status.go index c70eda17e108ba..b092654066bce0 100644 --- a/components/ws-manager/pkg/manager/status.go +++ b/components/ws-manager/pkg/manager/status.go @@ -86,14 +86,7 @@ func (wso *workspaceObjects) WorkspaceType() (api.WorkspaceType, error) { lbl, ok := meta.Labels[wsk8s.TypeLabel] if !ok { - // LEGACY - // this is a legacy pod without explicit workspace type. If it's headless it must be a prebuild, otherwise it's a regular workspace - var tpe api.WorkspaceType - if wso.IsWorkspaceHeadless() { - tpe = api.WorkspaceType_PREBUILD - } else { - tpe = api.WorkspaceType_REGULAR - } + tpe := api.WorkspaceType_REGULAR log.WithFields(wsk8s.GetOWIFromObject(meta)).WithField("workspaceType", tpe).Info("determining type of legacy pod") return tpe, nil } @@ -373,6 +366,14 @@ func (m *Manager) extractStatusFromPod(result *api.WorkspaceStatus, wso workspac } result.Conditions.Timeout = reason } + if wso.IsWorkspaceHeadless() { + for _, cs := range pod.Status.ContainerStatuses { + if cs.State.Terminated != nil && cs.State.Terminated.Message != "" { + result.Conditions.HeadlessTaskFailed = cs.State.Terminated.Message + break + } + } + } if isPodBeingDeleted(pod) { result.Phase = api.WorkspacePhase_STOPPING @@ -509,8 +510,14 @@ func (m *Manager) extractStatusFromPod(result *api.WorkspaceStatus, wso workspac } } - if wso.IsWorkspaceHeadless() { - // headless workspaces don't expose a public service and thus cannot be asked about their status. + tpe, err := wso.WorkspaceType() + if err != nil { + log.WithError(err).Warn("cannot determine workspace type - assuming this is a regular") + tpe = api.WorkspaceType_REGULAR + } + + if wso.IsWorkspaceHeadless() && tpe != api.WorkspaceType_PREBUILD { + // headless workspaces (except prebuilds) don't expose a public service and thus cannot be asked about their status. // once kubernetes reports the workspace running, so do we. result.Phase = api.WorkspacePhase_RUNNING return nil @@ -526,6 +533,10 @@ func (m *Manager) extractStatusFromPod(result *api.WorkspaceStatus, wso workspac result.Phase = api.WorkspacePhase_INITIALIZING result.Message = "workspace initializer is running" return nil + } else if isCompletedHeadless(&wso) { + result.Phase = api.WorkspacePhase_STOPPING + result.Message = "headless workspace is stopping" + return nil } else if status.Phase == corev1.PodUnknown { result.Phase = api.WorkspacePhase_UNKNOWN result.Message = "Kubernetes reports workspace phase as unknown" @@ -557,6 +568,12 @@ func extractFailure(wso workspaceObjects) (string, *api.WorkspacePhase) { return reason, nil } + tpe, err := wso.WorkspaceType() + if err != nil { + log.WithError(err).Warn("cannot determine workspace type - assuming this is a regular") + tpe = api.WorkspaceType_REGULAR + } + status := pod.Status if status.Phase == corev1.PodFailed && (status.Reason != "" || status.Message != "") { // Don't force the phase to UNKNONWN here to leave a chance that we may detect the actual phase of @@ -596,6 +613,10 @@ func extractFailure(wso workspaceObjects) (string, *api.WorkspacePhase) { return fmt.Sprintf("container %s ran with an error: exit code %d", cs.Name, terminationState.ExitCode), nil } } else if terminationState.Reason == "Completed" { + if tpe == api.WorkspaceType_PREBUILD { + // default way for prebuilds to be done + return "", nil + } return fmt.Sprintf("container %s completed; containers of a workspace pod are not supposed to do that", cs.Name), nil } else if !isPodBeingDeleted(pod) && terminationState.ExitCode != containerUnknownExitCode { // if a container is terminated and it wasn't because of either: @@ -666,12 +687,17 @@ func extractFailureFromLogs(logs []byte) string { return string(logs) } -// isPodBeingDeleted returns true if the pod is currently being stopped/deleted +// isPodBeingDeleted returns true if the pod is currently being deleted func isPodBeingDeleted(pod *corev1.Pod) bool { // if the pod is being deleted the only marker we have is that the deletionTimestamp is set return pod.ObjectMeta.DeletionTimestamp != nil } +// isCompletedHeadless returns true if the pod is a headless workspace and either succeeded or failed (e.g., ran to completion) +func isCompletedHeadless(wso *workspaceObjects) bool { + return wso.IsWorkspaceHeadless() && (wso.Pod.Status.Phase == corev1.PodSucceeded || wso.Pod.Status.Phase == corev1.PodFailed) +} + type activity string const ( @@ -763,6 +789,10 @@ func (m *Manager) isWorkspaceTimedOut(wso workspaceObjects) (reason string, err if status.Conditions.FinalBackupComplete != api.WorkspaceConditionBool_TRUE { activity = activityBackup } + if !isPodBeingDeleted(wso.Pod) { + // pods that have not been deleted have never timed out + return "", nil + } return decide(wso.Pod.DeletionTimestamp.Time, m.Config.Timeouts.Stopping, activity) default: diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_admission.golden b/components/ws-manager/pkg/manager/testdata/cdwp_admission.golden index 8e8727e7622a64..b5384fdf65ed6c 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_admission.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_admission.golden @@ -167,7 +167,7 @@ "successThreshold": 1, "failureThreshold": 600 }, - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_empty_resource_req.golden b/components/ws-manager/pkg/manager/testdata/cdwp_empty_resource_req.golden index 351f00531882f2..63cab27787e6e1 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_empty_resource_req.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_empty_resource_req.golden @@ -161,7 +161,7 @@ "successThreshold": 1, "failureThreshold": 600 }, - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_fixedresources.golden b/components/ws-manager/pkg/manager/testdata/cdwp_fixedresources.golden index 69d2471a0a1e44..a6d6d62fa5eb26 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_fixedresources.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_fixedresources.golden @@ -164,7 +164,7 @@ "successThreshold": 1, "failureThreshold": 600 }, - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_fullworkspacebackup.golden b/components/ws-manager/pkg/manager/testdata/cdwp_fullworkspacebackup.golden index 742bdcbc3ec93f..6dcac7c5f8dbdf 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_fullworkspacebackup.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_fullworkspacebackup.golden @@ -153,7 +153,7 @@ "successThreshold": 1, "failureThreshold": 600 }, - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_ghost.golden b/components/ws-manager/pkg/manager/testdata/cdwp_ghost.golden index 67d0115bc16f99..34fd2aa5bd0620 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_ghost.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_ghost.golden @@ -156,7 +156,7 @@ "mountPropagation": "HostToContainer" } ], - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_prebuild.golden b/components/ws-manager/pkg/manager/testdata/cdwp_prebuild.golden index b46d7d7dee2286..eb41878a747cdd 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_prebuild.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_prebuild.golden @@ -167,7 +167,7 @@ "successThreshold": 1, "failureThreshold": 600 }, - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_prebuild_template.golden b/components/ws-manager/pkg/manager/testdata/cdwp_prebuild_template.golden index ad57447b389a4e..465813cf1db012 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_prebuild_template.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_prebuild_template.golden @@ -171,7 +171,7 @@ "successThreshold": 1, "failureThreshold": 600 }, - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_prebuild_template_override_resources.golden b/components/ws-manager/pkg/manager/testdata/cdwp_prebuild_template_override_resources.golden index f1a722946c105e..4b2162fa18d0f6 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_prebuild_template_override_resources.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_prebuild_template_override_resources.golden @@ -171,7 +171,7 @@ "successThreshold": 1, "failureThreshold": 600 }, - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_probe.golden b/components/ws-manager/pkg/manager/testdata/cdwp_probe.golden index d5deee1e1c7094..9dcbd25b5e0189 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_probe.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_probe.golden @@ -167,7 +167,7 @@ "successThreshold": 1, "failureThreshold": 600 }, - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_readinessprobe.golden b/components/ws-manager/pkg/manager/testdata/cdwp_readinessprobe.golden index 6e254a21ec0f48..e6e966ca99c7de 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_readinessprobe.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_readinessprobe.golden @@ -163,7 +163,7 @@ "successThreshold": 1, "failureThreshold": 600 }, - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_tasks.golden b/components/ws-manager/pkg/manager/testdata/cdwp_tasks.golden index d8f6fc273ace33..41ecac901e5be6 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_tasks.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_tasks.golden @@ -167,7 +167,7 @@ "successThreshold": 1, "failureThreshold": 600 }, - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_template.golden b/components/ws-manager/pkg/manager/testdata/cdwp_template.golden index 52843840bbcaa4..c99c7de7e9ed37 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_template.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_template.golden @@ -167,7 +167,7 @@ "successThreshold": 1, "failureThreshold": 600 }, - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_timeout.golden b/components/ws-manager/pkg/manager/testdata/cdwp_timeout.golden index 6cd173176d1237..1ddac60f9047f6 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_timeout.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_timeout.golden @@ -168,7 +168,7 @@ "successThreshold": 1, "failureThreshold": 600 }, - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/cdwp_userns.golden b/components/ws-manager/pkg/manager/testdata/cdwp_userns.golden index 40b1341e522545..562506399e1740 100644 --- a/components/ws-manager/pkg/manager/testdata/cdwp_userns.golden +++ b/components/ws-manager/pkg/manager/testdata/cdwp_userns.golden @@ -163,7 +163,7 @@ "successThreshold": 1, "failureThreshold": 600 }, - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/status_containerd4214_STOPPING00.json b/components/ws-manager/pkg/manager/testdata/status_containerd4214_STOPPING00.json index 2236b2787dabe2..a5f467a5643d05 100644 --- a/components/ws-manager/pkg/manager/testdata/status_containerd4214_STOPPING00.json +++ b/components/ws-manager/pkg/manager/testdata/status_containerd4214_STOPPING00.json @@ -217,7 +217,7 @@ "failureThreshold": 600 }, "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED01.json b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED01.json index ef12832c0a1cef..4aefdef6e7f2c6 100644 --- a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED01.json +++ b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED01.json @@ -187,7 +187,7 @@ "failureThreshold": 600 }, "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED02.json b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED02.json index 7e01a67d43e369..33861336eb9927 100644 --- a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED02.json +++ b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED02.json @@ -187,7 +187,7 @@ "failureThreshold": 600 }, "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED03.json b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED03.json index 7b598120e8ca37..d85a7b116490c0 100644 --- a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED03.json +++ b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPED03.json @@ -187,7 +187,7 @@ "failureThreshold": 600 }, "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING01.json b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING01.json index b9a12cd6b01a88..4f4596d6610bd4 100644 --- a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING01.json +++ b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING01.json @@ -190,7 +190,7 @@ "failureThreshold": 600 }, "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING02.json b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING02.json index ed244a495ef749..af8bbb7c29cf0e 100644 --- a/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING02.json +++ b/components/ws-manager/pkg/manager/testdata/status_disposal_STOPPING02.json @@ -190,7 +190,7 @@ "failureThreshold": 600 }, "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/status_failedLogs_UNKNOWN00.json b/components/ws-manager/pkg/manager/testdata/status_failedLogs_UNKNOWN00.json index 3fdc1d5b72e222..e6d427dc7ddde0 100644 --- a/components/ws-manager/pkg/manager/testdata/status_failedLogs_UNKNOWN00.json +++ b/components/ws-manager/pkg/manager/testdata/status_failedLogs_UNKNOWN00.json @@ -169,7 +169,7 @@ "failureThreshold": 600 }, "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "FallbackToLogsOnError", + "terminationMessagePolicy": "File", "imagePullPolicy": "Always", "securityContext": { "capabilities": { diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPED00.golden b/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPED00.golden new file mode 100644 index 00000000000000..e410e60829e4c5 --- /dev/null +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPED00.golden @@ -0,0 +1,95 @@ +{ + "status": { + "id": "dbc45dce-611a-49a8-bd76-7afda76a1e24", + "metadata": { + "owner": "a0dfe7e6-351b-4fd8-80c2-5ed45814f44a", + "meta_id": "gray-lemming-0wlyvzy5", + "started_at": { + "seconds": 1622467314 + } + }, + "spec": { + "workspace_image": "eu.gcr.io/gitpod-core-dev/registry/workspace-images:81c4fb602a540d261f210cfc8ba0435b63b24238c1762ec029d8edaec816afb6", + "ide_image": "eu.gcr.io/gitpod-core-dev/build/ide/code:gpl-headless-log-wsman.25", + "headless": true, + "url": "https://gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "exposed_ports": [ + { + "port": 1337, + "visibility": 1, + "url": "https://1337-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 3000, + "visibility": 1, + "url": "https://3000-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 3001, + "visibility": 1, + "url": "https://3001-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 3306, + "visibility": 1, + "url": "https://3306-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 4000, + "visibility": 1, + "url": "https://4000-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 5900, + "visibility": 1, + "url": "https://5900-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 6080, + "url": "https://6080-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 9229, + "visibility": 1, + "url": "https://9229-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 9999, + "visibility": 1, + "url": "https://9999-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 13001, + "visibility": 1, + "url": "https://13001-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 7777, + "visibility": 1, + "url": "https://7777-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 13444, + "visibility": 1, + "url": "https://13444-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + } + ], + "type": 1 + }, + "phase": 6, + "conditions": { + "service_exists": 1, + "snapshot": "workspaces/gray-lemming-0wlyvzy5/snapshot-1622467387276004249.tar@gitpod-user-a0dfe7e6-351b-4fd8-80c2-5ed45814f44a", + "final_backup_complete": 1, + "deployed": 1 + }, + "runtime": { + "node_name": "gke-dev-workload-1-49d27f81-3xfh", + "pod_name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "node_ip": "10.132.15.219" + }, + "auth": { + "owner_token": "y5-JYhqDzGGprABkr36-fTas8PCeA4sZ" + } + } +} \ No newline at end of file diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPED00.json b/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPED00.json new file mode 100644 index 00000000000000..f0e3ba99553fb6 --- /dev/null +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPED00.json @@ -0,0 +1,755 @@ +{ + "pod": { + "kind": "Pod", + "apiVersion": "v1", + "metadata": { + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/pods/prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "uid": "dffc86f1-b0de-44fb-a88a-ad34127f6b42", + "resourceVersion": "200723682", + "creationTimestamp": "2021-05-31T13:21:54Z", + "deletionTimestamp": "2021-05-31T13:23:07Z", + "deletionGracePeriodSeconds": 0, + "labels": { + "app": "gitpod", + "component": "workspace", + "gitpod.io/networkpolicy": "default", + "gpwsman": "true", + "headless": "true", + "metaID": "gray-lemming-0wlyvzy5", + "owner": "a0dfe7e6-351b-4fd8-80c2-5ed45814f44a", + "workspaceID": "dbc45dce-611a-49a8-bd76-7afda76a1e24", + "workspaceType": "prebuild" + }, + "annotations": { + "cni.projectcalico.org/podIP": "10.60.47.146/32", + "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", + "gitpod.io/disposalStatus": "{\"backupComplete\":true}", + "gitpod.io/requiredNodeServices": "ws-daemon,registry-facade", + "gitpod/admission": "admit_owner_only", + "gitpod/contentInitializer": "[redacted]", + "gitpod/id": "dbc45dce-611a-49a8-bd76-7afda76a1e24", + "gitpod/imageSpec": "CnRldS5nY3IuaW8vZ2l0cG9kLWNvcmUtZGV2L3JlZ2lzdHJ5L3dvcmtzcGFjZS1pbWFnZXM6ODFjNGZiNjAyYTU0MGQyNjFmMjEwY2ZjOGJhMDQzNWI2M2IyNDIzOGMxNzYyZWMwMjlkOGVkYWVjODE2YWZiNhJCZXUuZ2NyLmlvL2dpdHBvZC1jb3JlLWRldi9idWlsZC9pZGUvY29kZTpncGwtaGVhZGxlc3MtbG9nLXdzbWFuLjI1", + "gitpod/ownerToken": "y5-JYhqDzGGprABkr36-fTas8PCeA4sZ", + "gitpod/servicePrefix": "gray-lemming-0wlyvzy5", + "gitpod/snapshot": "workspaces/gray-lemming-0wlyvzy5/snapshot-1622467387276004249.tar@gitpod-user-a0dfe7e6-351b-4fd8-80c2-5ed45814f44a", + "gitpod/url": "https://gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "kubernetes.io/psp": "staging-gpl-headless-log-wsman-ns-workspace", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "23000", + "prometheus.io/scrape": "true", + "seccomp.security.alpha.kubernetes.io/pod": "localhost/workspace_default_gpl-headless-log-wsman.25.json" + }, + "finalizers": [ + "gitpod.io/finalizer", + "foregroundDeletion" + ] + }, + "spec": { + "volumes": [ + { + "name": "vol-this-workspace", + "hostPath": { + "path": "/mnt/disks/ssd0/workspaces/dbc45dce-611a-49a8-bd76-7afda76a1e24", + "type": "DirectoryOrCreate" + } + }, + { + "name": "daemon-mount", + "hostPath": { + "path": "/mnt/disks/ssd0/workspaces/dbc45dce-611a-49a8-bd76-7afda76a1e24-daemon", + "type": "DirectoryOrCreate" + } + } + ], + "containers": [ + { + "name": "workspace", + "image": "reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30570/remote/dbc45dce-611a-49a8-bd76-7afda76a1e24", + "command": [ + "/.supervisor/workspacekit", + "ring0" + ], + "ports": [ + { + "containerPort": 23000, + "protocol": "TCP" + } + ], + "env": [ + { + "name": "GITPOD_REPO_ROOT", + "value": "/workspace/gitpod" + }, + { + "name": "GITPOD_CLI_APITOKEN", + "value": "YU2Tcl0e0ZYyeBK3D_FCnikjl5UQ1YrW" + }, + { + "name": "GITPOD_WORKSPACE_ID", + "value": "gray-lemming-0wlyvzy5" + }, + { + "name": "GITPOD_INSTANCE_ID", + "value": "dbc45dce-611a-49a8-bd76-7afda76a1e24" + }, + { + "name": "GITPOD_THEIA_PORT", + "value": "23000" + }, + { + "name": "THEIA_WORKSPACE_ROOT", + "value": "/workspace/gitpod/gitpod-ws.code-workspace" + }, + { + "name": "GITPOD_HOST", + "value": "https://gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "name": "GITPOD_WORKSPACE_URL", + "value": "https://gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "name": "THEIA_SUPERVISOR_TOKEN", + "value": "354c0b368f2b4a93b7b812564e663d23" + }, + { + "name": "THEIA_SUPERVISOR_ENDPOINT", + "value": ":22999" + }, + { + "name": "THEIA_WEBVIEW_EXTERNAL_ENDPOINT", + "value": "webview-{{hostname}}" + }, + { + "name": "THEIA_MINI_BROWSER_HOST_PATTERN", + "value": "browser-{{hostname}}" + }, + { + "name": "GITPOD_GIT_USER_NAME", + "value": "Gero Posmyk-Leinemann" + }, + { + "name": "GITPOD_GIT_USER_EMAIL", + "value": "gero@gitpod.io" + }, + { + "name": "PREBUILD_PARAMS", + "value": "[redacted]" + }, + { + "name": "GITPOD_WORKSPACE_CONTEXT_URL", + "value": "prebuild/https://github.com/gitpod-io/gitpod/tree/gpl/test-prebuild" + }, + { + "name": "GITPOD_WORKSPACE_CONTEXT", + "value": "{\"ref\":\"gpl/test-prebuild\",\"refType\":\"branch\",\"isFile\":false,\"path\":\"\",\"title\":\"gitpod-io/gitpod - gpl/test-prebuild\",\"revision\":\"5f43de3697b73bf0ddf2692284a9341694eb1f30\",\"repository\":{\"cloneUrl\":\"https://github.com/gitpod-io/gitpod.git\",\"host\":\"github.com\",\"name\":\"gitpod\",\"owner\":\"gitpod-io\",\"private\":false}}" + }, + { + "name": "GITPOD_TASKS", + "value": "[{\"name\":\"Test Command\",\"init\":\"export PREBUILD_PARAMS=${PREBUILD_PARAMS:-\\\"100_500ms_30m_success\\\"}; go run ./main.go $PREBUILD_PARAMS\"}]" + }, + { + "name": "THEIA_SUPERVISOR_TOKENS", + "value": "[{\"tokenOTS\":\"https://gpl-headless-log-wsman.staging.gitpod-dev.com/api/ots/get/9128b3e8-bdba-4e70-a025-69fb20ef5786\",\"token\":\"ots\",\"kind\":\"gitpod\",\"host\":\"gpl-headless-log-wsman.staging.gitpod-dev.com\",\"scope\":[\"function:getWorkspace\",\"function:getLoggedInUser\",\"function:getPortAuthenticationToken\",\"function:getWorkspaceOwner\",\"function:getWorkspaceUsers\",\"function:isWorkspaceOwner\",\"function:controlAdmission\",\"function:setWorkspaceTimeout\",\"function:getWorkspaceTimeout\",\"function:sendHeartBeat\",\"function:getOpenPorts\",\"function:openPort\",\"function:closePort\",\"function:getLayout\",\"function:generateNewGitpodToken\",\"function:takeSnapshot\",\"function:storeLayout\",\"function:stopWorkspace\",\"function:getToken\",\"function:getContentBlobUploadUrl\",\"function:getContentBlobDownloadUrl\",\"function:accessCodeSyncStorage\",\"function:guessGitTokenScopes\",\"function:getEnvVars\",\"function:setEnvVar\",\"function:deleteEnvVar\",\"resource:workspace::gray-lemming-0wlyvzy5::get/update\",\"resource:workspaceInstance::dbc45dce-611a-49a8-bd76-7afda76a1e24::get/update/delete\",\"resource:snapshot::ws-gray-lemming-0wlyvzy5::create\",\"resource:gitpodToken::*::create\",\"resource:userStorage::*::create/get/update\",\"resource:token::*::get\",\"resource:contentBlob::*::create/get\",\"resource:envVar::gitpod-io/gitpod::create/get/update/delete\"],\"expiryDate\":\"2021-06-01T13:21:53.406Z\",\"reuse\":2}]" + }, + { + "name": "GITPOD_RESOLVED_EXTENSIONS", + "value": "{\"vscode.bat@1.44.2\":{\"fullPluginName\":\"vscode.bat@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.clojure@1.44.2\":{\"fullPluginName\":\"vscode.clojure@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.coffeescript@1.44.2\":{\"fullPluginName\":\"vscode.coffeescript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.cpp@1.44.2\":{\"fullPluginName\":\"vscode.cpp@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.csharp@1.44.2\":{\"fullPluginName\":\"vscode.csharp@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"llvm-vs-code-extensions.vscode-clangd@0.1.5\":{\"fullPluginName\":\"llvm-vs-code-extensions.vscode-clangd@0.1.5\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.css@1.51.1\":{\"fullPluginName\":\"vscode.css@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.css-language-features@1.51.1\":{\"fullPluginName\":\"vscode.css-language-features@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.debug-auto-launch@1.44.2\":{\"fullPluginName\":\"vscode.debug-auto-launch@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.emmet@1.44.2\":{\"fullPluginName\":\"vscode.emmet@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.fsharp@1.44.2\":{\"fullPluginName\":\"vscode.fsharp@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.go@1.44.2\":{\"fullPluginName\":\"vscode.go@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.groovy@1.44.2\":{\"fullPluginName\":\"vscode.groovy@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.handlebars@1.44.2\":{\"fullPluginName\":\"vscode.handlebars@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.hlsl@1.44.2\":{\"fullPluginName\":\"vscode.hlsl@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.html@1.51.1\":{\"fullPluginName\":\"vscode.html@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.html-language-features@1.51.1\":{\"fullPluginName\":\"vscode.html-language-features@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.ini@1.44.2\":{\"fullPluginName\":\"vscode.ini@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.java@1.53.2\":{\"fullPluginName\":\"vscode.java@1.53.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.javascript@1.44.2\":{\"fullPluginName\":\"vscode.javascript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.json@1.44.2\":{\"fullPluginName\":\"vscode.json@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.json-language-features@1.46.1\":{\"fullPluginName\":\"vscode.json-language-features@1.46.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.less@1.44.2\":{\"fullPluginName\":\"vscode.less@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.log@1.44.2\":{\"fullPluginName\":\"vscode.log@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.lua@1.44.2\":{\"fullPluginName\":\"vscode.lua@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.make@1.44.2\":{\"fullPluginName\":\"vscode.make@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.markdown@1.44.2\":{\"fullPluginName\":\"vscode.markdown@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.npm@1.39.1\":{\"fullPluginName\":\"vscode.npm@1.39.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.objective-c@1.44.2\":{\"fullPluginName\":\"vscode.objective-c@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.perl@1.44.2\":{\"fullPluginName\":\"vscode.perl@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.php@1.44.2\":{\"fullPluginName\":\"vscode.php@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.powershell@1.44.2\":{\"fullPluginName\":\"vscode.powershell@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.pug@1.44.2\":{\"fullPluginName\":\"vscode.pug@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.python@1.47.3\":{\"fullPluginName\":\"vscode.python@1.47.3\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.r@1.44.2\":{\"fullPluginName\":\"vscode.r@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.razor@1.44.2\":{\"fullPluginName\":\"vscode.razor@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.ruby@1.44.2\":{\"fullPluginName\":\"vscode.ruby@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.rust@1.44.2\":{\"fullPluginName\":\"vscode.rust@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.scss@1.44.2\":{\"fullPluginName\":\"vscode.scss@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.shaderlab@1.44.2\":{\"fullPluginName\":\"vscode.shaderlab@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.shellscript@1.44.2\":{\"fullPluginName\":\"vscode.shellscript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.sql@1.44.2\":{\"fullPluginName\":\"vscode.sql@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.swift@1.44.2\":{\"fullPluginName\":\"vscode.swift@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.typescript@1.44.2\":{\"fullPluginName\":\"vscode.typescript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.typescript-language-features@1.44.2\":{\"fullPluginName\":\"vscode.typescript-language-features@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.vb@1.44.2\":{\"fullPluginName\":\"vscode.vb@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.xml@1.44.2\":{\"fullPluginName\":\"vscode.xml@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.yaml@1.44.2\":{\"fullPluginName\":\"vscode.yaml@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"redhat.java@0.75.0\":{\"fullPluginName\":\"redhat.java@0.75.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscjava.vscode-java-debug@0.27.1\":{\"fullPluginName\":\"vscjava.vscode-java-debug@0.27.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscjava.vscode-java-dependency@0.18.0\":{\"fullPluginName\":\"vscjava.vscode-java-dependency@0.18.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-vscode.node-debug@1.38.4\":{\"fullPluginName\":\"ms-vscode.node-debug@1.38.4\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-vscode.node-debug2@1.33.0\":{\"fullPluginName\":\"ms-vscode.node-debug2@1.33.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-python.python@2020.7.96456\":{\"fullPluginName\":\"ms-python.python@2020.7.96456\",\"url\":\"local\",\"kind\":\"builtin\"},\"redhat.vscode-xml@0.11.0\":{\"fullPluginName\":\"redhat.vscode-xml@0.11.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"redhat.vscode-yaml@0.8.0\":{\"fullPluginName\":\"redhat.vscode-yaml@0.8.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"bmewburn.vscode-intelephense-client@1.4.0\":{\"fullPluginName\":\"bmewburn.vscode-intelephense-client@1.4.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"felixfbecker.php-debug@1.13.0\":{\"fullPluginName\":\"felixfbecker.php-debug@1.13.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"rust-lang.rust@0.7.8\":{\"fullPluginName\":\"rust-lang.rust@0.7.8\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-abyss@1.44.2\":{\"fullPluginName\":\"vscode.theme-abyss@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-kimbie-dark@1.44.2\":{\"fullPluginName\":\"vscode.theme-kimbie-dark@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-monokai@1.44.2\":{\"fullPluginName\":\"vscode.theme-monokai@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-monokai-dimmed@1.44.2\":{\"fullPluginName\":\"vscode.theme-monokai-dimmed@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-quietlight@1.44.2\":{\"fullPluginName\":\"vscode.theme-quietlight@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-red@1.44.2\":{\"fullPluginName\":\"vscode.theme-red@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-solarized-dark@1.44.2\":{\"fullPluginName\":\"vscode.theme-solarized-dark@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-solarized-light@1.44.2\":{\"fullPluginName\":\"vscode.theme-solarized-light@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-tomorrow-night-blue@1.44.2\":{\"fullPluginName\":\"vscode.theme-tomorrow-night-blue@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.vscode-theme-seti@1.44.2\":{\"fullPluginName\":\"vscode.vscode-theme-seti@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.merge-conflict@1.44.2\":{\"fullPluginName\":\"vscode.merge-conflict@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-vscode.references-view@0.0.47\":{\"fullPluginName\":\"ms-vscode.references-view@0.0.47\",\"url\":\"local\",\"kind\":\"builtin\"},\"EditorConfig.EditorConfig@0.15.1\":{\"fullPluginName\":\"editorconfig.editorconfig@0.15.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.docker@1.47.3\":{\"fullPluginName\":\"vscode.docker@1.47.3\",\"url\":\"local\",\"kind\":\"builtin\"},\"golang.go\":{\"fullPluginName\":\"golang.go@0.25.0\",\"url\":\"https://open-vsx.org/api/golang/Go/0.25.0/file/golang.Go-0.25.0.vsix\",\"kind\":\"workspace\"},\"bajdzis.vscode-database\":{\"fullPluginName\":\"bajdzis.vscode-database@2.2.3\",\"url\":\"https://open-vsx.org/api/bajdzis/vscode-database/2.2.3/file/bajdzis.vscode-database-2.2.3.vsix\",\"kind\":\"workspace\"},\"zxh404.vscode-proto3\":{\"fullPluginName\":\"zxh404.vscode-proto3@0.5.4\",\"url\":\"https://open-vsx.org/api/zxh404/vscode-proto3/0.5.4/file/zxh404.vscode-proto3-0.5.4.vsix\",\"kind\":\"workspace\"},\"stkb.rewrap\":{\"fullPluginName\":\"stkb.rewrap@1.14.0\",\"url\":\"https://open-vsx.org/api/stkb/rewrap/1.14.0/file/stkb.rewrap-1.14.0.vsix\",\"kind\":\"workspace\"},\"hashicorp.terraform\":{\"fullPluginName\":\"hashicorp.terraform@2.11.0\",\"url\":\"https://open-vsx.org/api/hashicorp/terraform/2.11.0/file/hashicorp.terraform-2.11.0.vsix\",\"kind\":\"workspace\"},\"ms-kubernetes-tools.vscode-kubernetes-tools\":{\"fullPluginName\":\"ms-kubernetes-tools.vscode-kubernetes-tools@1.3.3\",\"url\":\"https://open-vsx.org/api/ms-kubernetes-tools/vscode-kubernetes-tools/1.3.3/file/ms-kubernetes-tools.vscode-kubernetes-tools-1.3.3.vsix\",\"kind\":\"workspace\"}}" + }, + { + "name": "GITPOD_EXTERNAL_EXTENSIONS", + "value": "[]" + }, + { + "name": "GITPOD_INTERVAL", + "value": "30000" + }, + { + "name": "GITPOD_MEMORY", + "value": "2415" + }, + { + "name": "GITPOD_HEADLESS", + "value": "true" + } + ], + "resources": { + "limits": { + "cpu": "5", + "memory": "12Gi" + }, + "requests": { + "cpu": "1m", + "ephemeral-storage": "5Gi", + "memory": "4608Mi" + } + }, + "volumeMounts": [ + { + "name": "vol-this-workspace", + "mountPath": "/workspace", + "mountPropagation": "HostToContainer" + }, + { + "name": "daemon-mount", + "mountPath": "/.workspace", + "mountPropagation": "HostToContainer" + } + ], + "readinessProbe": { + "httpGet": { + "path": "/_supervisor/v1/status/content/wait/true", + "port": 22999, + "scheme": "HTTP" + }, + "timeoutSeconds": 1, + "periodSeconds": 1, + "successThreshold": 1, + "failureThreshold": 600 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "imagePullPolicy": "Always", + "securityContext": { + "capabilities": { + "add": [ + "AUDIT_WRITE", + "FSETID", + "KILL", + "NET_BIND_SERVICE", + "SYS_PTRACE" + ], + "drop": [ + "SETPCAP", + "CHOWN", + "NET_RAW", + "DAC_OVERRIDE", + "FOWNER", + "SYS_CHROOT", + "SETFCAP", + "SETUID", + "SETGID" + ] + }, + "privileged": false, + "runAsUser": 33333, + "runAsGroup": 33333, + "runAsNonRoot": true, + "readOnlyRootFilesystem": false, + "allowPrivilegeEscalation": true + } + } + ], + "restartPolicy": "Never", + "terminationGracePeriodSeconds": 30, + "dnsPolicy": "None", + "serviceAccountName": "workspace", + "serviceAccount": "workspace", + "automountServiceAccountToken": false, + "nodeName": "gke-dev-workload-1-49d27f81-3xfh", + "securityContext": { + "supplementalGroups": [ + 1 + ], + "fsGroup": 1 + }, + "imagePullSecrets": [ + { + "name": "gcp-sa-registry-auth" + } + ], + "affinity": { + "nodeAffinity": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "gitpod.io/workload_workspace", + "operator": "Exists" + } + ] + } + ] + } + } + }, + "schedulerName": "workspace-scheduler", + "tolerations": [ + { + "key": "node.kubernetes.io/disk-pressure", + "operator": "Exists", + "effect": "NoExecute" + }, + { + "key": "node.kubernetes.io/memory-pressure", + "operator": "Exists", + "effect": "NoExecute" + }, + { + "key": "node.kubernetes.io/network-unavailable", + "operator": "Exists", + "effect": "NoExecute", + "tolerationSeconds": 30 + }, + { + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "effect": "NoExecute", + "tolerationSeconds": 300 + }, + { + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "effect": "NoExecute", + "tolerationSeconds": 300 + } + ], + "priority": 0, + "dnsConfig": { + "nameservers": [ + "1.1.1.1", + "8.8.8.8" + ] + }, + "enableServiceLinks": false + }, + "status": { + "phase": "Succeeded", + "conditions": [ + { + "type": "Initialized", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2021-05-31T13:21:54Z", + "reason": "PodCompleted" + }, + { + "type": "Ready", + "status": "False", + "lastProbeTime": null, + "lastTransitionTime": "2021-05-31T13:23:07Z", + "reason": "PodCompleted" + }, + { + "type": "ContainersReady", + "status": "False", + "lastProbeTime": null, + "lastTransitionTime": "2021-05-31T13:23:07Z", + "reason": "PodCompleted" + }, + { + "type": "PodScheduled", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2021-05-31T13:21:54Z" + } + ], + "hostIP": "10.132.15.219", + "podIP": "10.60.47.146", + "podIPs": [ + { + "ip": "10.60.47.146" + } + ], + "startTime": "2021-05-31T13:21:54Z", + "containerStatuses": [ + { + "name": "workspace", + "state": { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "startedAt": "2021-05-31T13:22:00Z", + "finishedAt": "2021-05-31T13:23:06Z", + "containerID": "containerd://33bd9fe7e2a845a488b8a46073698dc914ceca54694fefe06c233cb8a3f474c1" + } + }, + "lastState": {}, + "ready": false, + "restartCount": 0, + "image": "reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30570/remote/dbc45dce-611a-49a8-bd76-7afda76a1e24:latest", + "imageID": "reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30570/remote/dbc45dce-611a-49a8-bd76-7afda76a1e24@sha256:5914591bf93e3db929ae8cd93c65f3cd45b3c76b5067fabe61d70938565eb5c0", + "containerID": "containerd://33bd9fe7e2a845a488b8a46073698dc914ceca54694fefe06c233cb8a3f474c1", + "started": false + } + ], + "qosClass": "Burstable" + } + }, + "theiaService": { + "kind": "Service", + "apiVersion": "v1", + "metadata": { + "name": "ws-gray-lemming-0wlyvzy5-theia", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/services/ws-gray-lemming-0wlyvzy5-theia", + "uid": "2ca0b91b-6b90-4585-89a0-e031cb91ca7a", + "resourceVersion": "200723662", + "creationTimestamp": "2021-05-31T13:21:54Z", + "deletionTimestamp": "2021-05-31T13:23:07Z", + "deletionGracePeriodSeconds": 0, + "labels": { + "app": "gitpod", + "component": "workspace", + "gpwsman": "true", + "headless": "true", + "metaID": "gray-lemming-0wlyvzy5", + "owner": "a0dfe7e6-351b-4fd8-80c2-5ed45814f44a", + "workspaceID": "dbc45dce-611a-49a8-bd76-7afda76a1e24", + "workspaceType": "prebuild" + }, + "finalizers": [ + "foregroundDeletion" + ] + }, + "spec": { + "ports": [ + { + "name": "ide", + "protocol": "TCP", + "port": 23000, + "targetPort": 23000 + }, + { + "name": "supervisor", + "protocol": "TCP", + "port": 22999, + "targetPort": 22999 + } + ], + "selector": { + "app": "gitpod", + "component": "workspace", + "gpwsman": "true", + "headless": "true", + "metaID": "gray-lemming-0wlyvzy5", + "owner": "a0dfe7e6-351b-4fd8-80c2-5ed45814f44a", + "workspaceID": "dbc45dce-611a-49a8-bd76-7afda76a1e24", + "workspaceType": "prebuild" + }, + "clusterIP": "10.63.244.31", + "type": "ClusterIP", + "sessionAffinity": "None" + }, + "status": { + "loadBalancer": {} + } + }, + "portsService": { + "kind": "Service", + "apiVersion": "v1", + "metadata": { + "name": "ws-gray-lemming-0wlyvzy5-ports", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/services/ws-gray-lemming-0wlyvzy5-ports", + "uid": "224eb51e-fea8-43bb-8fe3-85a149b7ee14", + "resourceVersion": "200723665", + "creationTimestamp": "2021-05-31T13:21:54Z", + "deletionTimestamp": "2021-05-31T13:23:07Z", + "deletionGracePeriodSeconds": 0, + "labels": { + "gpwsman": "true", + "metaID": "gray-lemming-0wlyvzy5", + "serviceType": "ports", + "workspaceID": "dbc45dce-611a-49a8-bd76-7afda76a1e24" + }, + "annotations": { + "gitpod/port-url-13001": "https://13001-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-1337": "https://1337-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-13444": "https://13444-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-3000": "https://3000-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-3001": "https://3001-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-3306": "https://3306-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-4000": "https://4000-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-5900": "https://5900-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-6080": "https://6080-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-7777": "https://7777-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-9229": "https://9229-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-9999": "https://9999-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + "finalizers": [ + "foregroundDeletion" + ] + }, + "spec": { + "ports": [ + { + "name": "p1337-public", + "protocol": "TCP", + "port": 1337, + "targetPort": 1337 + }, + { + "name": "p3000-public", + "protocol": "TCP", + "port": 3000, + "targetPort": 3000 + }, + { + "name": "p3001-public", + "protocol": "TCP", + "port": 3001, + "targetPort": 3001 + }, + { + "name": "p3306-public", + "protocol": "TCP", + "port": 3306, + "targetPort": 3306 + }, + { + "name": "p4000-public", + "protocol": "TCP", + "port": 4000, + "targetPort": 4000 + }, + { + "name": "p5900-public", + "protocol": "TCP", + "port": 5900, + "targetPort": 5900 + }, + { + "name": "p6080-private", + "protocol": "TCP", + "port": 6080, + "targetPort": 6080 + }, + { + "name": "p9229-public", + "protocol": "TCP", + "port": 9229, + "targetPort": 9229 + }, + { + "name": "p9999-public", + "protocol": "TCP", + "port": 9999, + "targetPort": 9999 + }, + { + "name": "p13001-public", + "protocol": "TCP", + "port": 13001, + "targetPort": 13001 + }, + { + "name": "p7777-public", + "protocol": "TCP", + "port": 7777, + "targetPort": 7777 + }, + { + "name": "p13444-public", + "protocol": "TCP", + "port": 13444, + "targetPort": 13444 + } + ], + "selector": { + "gpwsman": "true", + "workspaceID": "dbc45dce-611a-49a8-bd76-7afda76a1e24" + }, + "clusterIP": "10.63.241.188", + "type": "ClusterIP", + "sessionAffinity": "None" + }, + "status": { + "loadBalancer": {} + } + }, + "events": [ + { + "metadata": { + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24 - scheduled5jqzp", + "generateName": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24 - scheduled", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24%20-%20scheduled5jqzp", + "uid": "8f162013-6a14-4fcd-8e43-5063e225e66e", + "resourceVersion": "12881558", + "creationTimestamp": "2021-05-31T13:21:54Z" + }, + "involvedObject": { + "kind": "Pod", + "namespace": "staging-gpl-headless-log-wsman", + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "uid": "dffc86f1-b0de-44fb-a88a-ad34127f6b42" + }, + "reason": "Scheduled", + "message": "Placed pod [staging-gpl-headless-log-wsman/prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24] on gke-dev-workload-1-49d27f81-3xfh\n", + "source": { + "component": "workspace-scheduler" + }, + "firstTimestamp": "2021-05-31T13:21:54Z", + "lastTimestamp": "2021-05-31T13:21:54Z", + "count": 1, + "type": "Normal", + "eventTime": null, + "reportingComponent": "", + "reportingInstance": "" + }, + { + "metadata": { + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296d48550d81", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296d48550d81", + "uid": "9ac45dc2-d5a9-4cc9-b539-970397543b1f", + "resourceVersion": "12881559", + "creationTimestamp": "2021-05-31T13:21:55Z" + }, + "involvedObject": { + "kind": "Pod", + "namespace": "staging-gpl-headless-log-wsman", + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "uid": "dffc86f1-b0de-44fb-a88a-ad34127f6b42", + "apiVersion": "v1", + "resourceVersion": "200723110", + "fieldPath": "spec.containers{workspace}" + }, + "reason": "Pulling", + "message": "Pulling image \"reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30570/remote/dbc45dce-611a-49a8-bd76-7afda76a1e24\"", + "source": { + "component": "kubelet", + "host": "gke-dev-workload-1-49d27f81-3xfh" + }, + "firstTimestamp": "2021-05-31T13:21:55Z", + "lastTimestamp": "2021-05-31T13:21:55Z", + "count": 1, + "type": "Normal", + "eventTime": null, + "reportingComponent": "", + "reportingInstance": "" + }, + { + "metadata": { + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296e6362b54f", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296e6362b54f", + "uid": "12bcb116-483c-4e48-b242-5f4c57b872a4", + "resourceVersion": "12881560", + "creationTimestamp": "2021-05-31T13:21:59Z" + }, + "involvedObject": { + "kind": "Pod", + "namespace": "staging-gpl-headless-log-wsman", + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "uid": "dffc86f1-b0de-44fb-a88a-ad34127f6b42", + "apiVersion": "v1", + "resourceVersion": "200723110", + "fieldPath": "spec.containers{workspace}" + }, + "reason": "Pulled", + "message": "Successfully pulled image \"reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30570/remote/dbc45dce-611a-49a8-bd76-7afda76a1e24\"", + "source": { + "component": "kubelet", + "host": "gke-dev-workload-1-49d27f81-3xfh" + }, + "firstTimestamp": "2021-05-31T13:21:59Z", + "lastTimestamp": "2021-05-31T13:21:59Z", + "count": 1, + "type": "Normal", + "eventTime": null, + "reportingComponent": "", + "reportingInstance": "" + }, + { + "metadata": { + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296e6716d034", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296e6716d034", + "uid": "38761d36-3ca7-4525-baf4-ed36ed40ba89", + "resourceVersion": "12881561", + "creationTimestamp": "2021-05-31T13:21:59Z" + }, + "involvedObject": { + "kind": "Pod", + "namespace": "staging-gpl-headless-log-wsman", + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "uid": "dffc86f1-b0de-44fb-a88a-ad34127f6b42", + "apiVersion": "v1", + "resourceVersion": "200723110", + "fieldPath": "spec.containers{workspace}" + }, + "reason": "Created", + "message": "Created container workspace", + "source": { + "component": "kubelet", + "host": "gke-dev-workload-1-49d27f81-3xfh" + }, + "firstTimestamp": "2021-05-31T13:21:59Z", + "lastTimestamp": "2021-05-31T13:21:59Z", + "count": 1, + "type": "Normal", + "eventTime": null, + "reportingComponent": "", + "reportingInstance": "" + }, + { + "metadata": { + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296e75ab4bad", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296e75ab4bad", + "uid": "718efe13-d1c0-405e-8a66-ff6d2b223fe3", + "resourceVersion": "12881562", + "creationTimestamp": "2021-05-31T13:22:00Z" + }, + "involvedObject": { + "kind": "Pod", + "namespace": "staging-gpl-headless-log-wsman", + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "uid": "dffc86f1-b0de-44fb-a88a-ad34127f6b42", + "apiVersion": "v1", + "resourceVersion": "200723110", + "fieldPath": "spec.containers{workspace}" + }, + "reason": "Started", + "message": "Started container workspace", + "source": { + "component": "kubelet", + "host": "gke-dev-workload-1-49d27f81-3xfh" + }, + "firstTimestamp": "2021-05-31T13:22:00Z", + "lastTimestamp": "2021-05-31T13:22:00Z", + "count": 1, + "type": "Normal", + "eventTime": null, + "reportingComponent": "", + "reportingInstance": "" + }, + { + "metadata": { + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296ef15ca0ee", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296ef15ca0ee", + "uid": "38110d0d-79ba-4ce7-b7c8-191cfcc04f7d", + "resourceVersion": "12881564", + "creationTimestamp": "2021-05-31T13:22:02Z" + }, + "involvedObject": { + "kind": "Pod", + "namespace": "staging-gpl-headless-log-wsman", + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "uid": "dffc86f1-b0de-44fb-a88a-ad34127f6b42", + "apiVersion": "v1", + "resourceVersion": "200723110", + "fieldPath": "spec.containers{workspace}" + }, + "reason": "Unhealthy", + "message": "Readiness probe failed: Get http://10.60.47.146:22999/_supervisor/v1/status/content/wait/true: net/http: request canceled (Client.Timeout exceeded while awaiting headers)", + "source": { + "component": "kubelet", + "host": "gke-dev-workload-1-49d27f81-3xfh" + }, + "firstTimestamp": "2021-05-31T13:22:02Z", + "lastTimestamp": "2021-05-31T13:22:02Z", + "count": 1, + "type": "Warning", + "eventTime": null, + "reportingComponent": "", + "reportingInstance": "" + } + ] +} \ No newline at end of file diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPING00.golden b/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPING00.golden new file mode 100644 index 00000000000000..c18d41ffb3a600 --- /dev/null +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPING00.golden @@ -0,0 +1,94 @@ +{ + "status": { + "id": "dbc45dce-611a-49a8-bd76-7afda76a1e24", + "metadata": { + "owner": "a0dfe7e6-351b-4fd8-80c2-5ed45814f44a", + "meta_id": "gray-lemming-0wlyvzy5", + "started_at": { + "seconds": 1622467314 + } + }, + "spec": { + "workspace_image": "eu.gcr.io/gitpod-core-dev/registry/workspace-images:81c4fb602a540d261f210cfc8ba0435b63b24238c1762ec029d8edaec816afb6", + "ide_image": "eu.gcr.io/gitpod-core-dev/build/ide/code:gpl-headless-log-wsman.25", + "headless": true, + "url": "https://gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "exposed_ports": [ + { + "port": 1337, + "visibility": 1, + "url": "https://1337-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 3000, + "visibility": 1, + "url": "https://3000-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 3001, + "visibility": 1, + "url": "https://3001-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 3306, + "visibility": 1, + "url": "https://3306-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 4000, + "visibility": 1, + "url": "https://4000-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 5900, + "visibility": 1, + "url": "https://5900-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 6080, + "url": "https://6080-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 9229, + "visibility": 1, + "url": "https://9229-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 9999, + "visibility": 1, + "url": "https://9999-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 13001, + "visibility": 1, + "url": "https://13001-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 7777, + "visibility": 1, + "url": "https://7777-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 13444, + "visibility": 1, + "url": "https://13444-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + } + ], + "type": 1 + }, + "phase": 5, + "conditions": { + "service_exists": 1, + "deployed": 1 + }, + "message": "headless workspace is stopping", + "runtime": { + "node_name": "gke-dev-workload-1-49d27f81-3xfh", + "pod_name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "node_ip": "10.132.15.219" + }, + "auth": { + "owner_token": "y5-JYhqDzGGprABkr36-fTas8PCeA4sZ" + } + } +} \ No newline at end of file diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPING00.json b/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPING00.json new file mode 100644 index 00000000000000..79a60132fb4a56 --- /dev/null +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildFail_STOPPING00.json @@ -0,0 +1,740 @@ +{ + "pod": { + "kind": "Pod", + "apiVersion": "v1", + "metadata": { + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/pods/prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "uid": "dffc86f1-b0de-44fb-a88a-ad34127f6b42", + "resourceVersion": "200723659", + "creationTimestamp": "2021-05-31T13:21:54Z", + "labels": { + "app": "gitpod", + "component": "workspace", + "gitpod.io/networkpolicy": "default", + "gpwsman": "true", + "headless": "true", + "metaID": "gray-lemming-0wlyvzy5", + "owner": "a0dfe7e6-351b-4fd8-80c2-5ed45814f44a", + "workspaceID": "dbc45dce-611a-49a8-bd76-7afda76a1e24", + "workspaceType": "prebuild" + }, + "annotations": { + "cni.projectcalico.org/podIP": "10.60.47.146/32", + "container.apparmor.security.beta.kubernetes.io/workspace": "unconfined", + "gitpod.io/requiredNodeServices": "ws-daemon,registry-facade", + "gitpod/admission": "admit_owner_only", + "gitpod/contentInitializer": "[redacted]", + "gitpod/id": "dbc45dce-611a-49a8-bd76-7afda76a1e24", + "gitpod/imageSpec": "CnRldS5nY3IuaW8vZ2l0cG9kLWNvcmUtZGV2L3JlZ2lzdHJ5L3dvcmtzcGFjZS1pbWFnZXM6ODFjNGZiNjAyYTU0MGQyNjFmMjEwY2ZjOGJhMDQzNWI2M2IyNDIzOGMxNzYyZWMwMjlkOGVkYWVjODE2YWZiNhJCZXUuZ2NyLmlvL2dpdHBvZC1jb3JlLWRldi9idWlsZC9pZGUvY29kZTpncGwtaGVhZGxlc3MtbG9nLXdzbWFuLjI1", + "gitpod/ownerToken": "y5-JYhqDzGGprABkr36-fTas8PCeA4sZ", + "gitpod/servicePrefix": "gray-lemming-0wlyvzy5", + "gitpod/url": "https://gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "kubernetes.io/psp": "staging-gpl-headless-log-wsman-ns-workspace", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "23000", + "prometheus.io/scrape": "true", + "seccomp.security.alpha.kubernetes.io/pod": "localhost/workspace_default_gpl-headless-log-wsman.25.json" + }, + "finalizers": [ + "gitpod.io/finalizer" + ] + }, + "spec": { + "volumes": [ + { + "name": "vol-this-workspace", + "hostPath": { + "path": "/mnt/disks/ssd0/workspaces/dbc45dce-611a-49a8-bd76-7afda76a1e24", + "type": "DirectoryOrCreate" + } + }, + { + "name": "daemon-mount", + "hostPath": { + "path": "/mnt/disks/ssd0/workspaces/dbc45dce-611a-49a8-bd76-7afda76a1e24-daemon", + "type": "DirectoryOrCreate" + } + } + ], + "containers": [ + { + "name": "workspace", + "image": "reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30570/remote/dbc45dce-611a-49a8-bd76-7afda76a1e24", + "command": [ + "/.supervisor/workspacekit", + "ring0" + ], + "ports": [ + { + "containerPort": 23000, + "protocol": "TCP" + } + ], + "env": [ + { + "name": "GITPOD_REPO_ROOT", + "value": "/workspace/gitpod" + }, + { + "name": "GITPOD_CLI_APITOKEN", + "value": "YU2Tcl0e0ZYyeBK3D_FCnikjl5UQ1YrW" + }, + { + "name": "GITPOD_WORKSPACE_ID", + "value": "gray-lemming-0wlyvzy5" + }, + { + "name": "GITPOD_INSTANCE_ID", + "value": "dbc45dce-611a-49a8-bd76-7afda76a1e24" + }, + { + "name": "GITPOD_THEIA_PORT", + "value": "23000" + }, + { + "name": "THEIA_WORKSPACE_ROOT", + "value": "/workspace/gitpod/gitpod-ws.code-workspace" + }, + { + "name": "GITPOD_HOST", + "value": "https://gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "name": "GITPOD_WORKSPACE_URL", + "value": "https://gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "name": "THEIA_SUPERVISOR_TOKEN", + "value": "354c0b368f2b4a93b7b812564e663d23" + }, + { + "name": "THEIA_SUPERVISOR_ENDPOINT", + "value": ":22999" + }, + { + "name": "THEIA_WEBVIEW_EXTERNAL_ENDPOINT", + "value": "webview-{{hostname}}" + }, + { + "name": "THEIA_MINI_BROWSER_HOST_PATTERN", + "value": "browser-{{hostname}}" + }, + { + "name": "GITPOD_GIT_USER_NAME", + "value": "Gero Posmyk-Leinemann" + }, + { + "name": "GITPOD_GIT_USER_EMAIL", + "value": "gero@gitpod.io" + }, + { + "name": "PREBUILD_PARAMS", + "value": "[redacted]" + }, + { + "name": "GITPOD_WORKSPACE_CONTEXT_URL", + "value": "prebuild/https://github.com/gitpod-io/gitpod/tree/gpl/test-prebuild" + }, + { + "name": "GITPOD_WORKSPACE_CONTEXT", + "value": "{\"ref\":\"gpl/test-prebuild\",\"refType\":\"branch\",\"isFile\":false,\"path\":\"\",\"title\":\"gitpod-io/gitpod - gpl/test-prebuild\",\"revision\":\"5f43de3697b73bf0ddf2692284a9341694eb1f30\",\"repository\":{\"cloneUrl\":\"https://github.com/gitpod-io/gitpod.git\",\"host\":\"github.com\",\"name\":\"gitpod\",\"owner\":\"gitpod-io\",\"private\":false}}" + }, + { + "name": "GITPOD_TASKS", + "value": "[{\"name\":\"Test Command\",\"init\":\"export PREBUILD_PARAMS=${PREBUILD_PARAMS:-\\\"100_500ms_30m_success\\\"}; go run ./main.go $PREBUILD_PARAMS\"}]" + }, + { + "name": "THEIA_SUPERVISOR_TOKENS", + "value": "[{\"tokenOTS\":\"https://gpl-headless-log-wsman.staging.gitpod-dev.com/api/ots/get/9128b3e8-bdba-4e70-a025-69fb20ef5786\",\"token\":\"ots\",\"kind\":\"gitpod\",\"host\":\"gpl-headless-log-wsman.staging.gitpod-dev.com\",\"scope\":[\"function:getWorkspace\",\"function:getLoggedInUser\",\"function:getPortAuthenticationToken\",\"function:getWorkspaceOwner\",\"function:getWorkspaceUsers\",\"function:isWorkspaceOwner\",\"function:controlAdmission\",\"function:setWorkspaceTimeout\",\"function:getWorkspaceTimeout\",\"function:sendHeartBeat\",\"function:getOpenPorts\",\"function:openPort\",\"function:closePort\",\"function:getLayout\",\"function:generateNewGitpodToken\",\"function:takeSnapshot\",\"function:storeLayout\",\"function:stopWorkspace\",\"function:getToken\",\"function:getContentBlobUploadUrl\",\"function:getContentBlobDownloadUrl\",\"function:accessCodeSyncStorage\",\"function:guessGitTokenScopes\",\"function:getEnvVars\",\"function:setEnvVar\",\"function:deleteEnvVar\",\"resource:workspace::gray-lemming-0wlyvzy5::get/update\",\"resource:workspaceInstance::dbc45dce-611a-49a8-bd76-7afda76a1e24::get/update/delete\",\"resource:snapshot::ws-gray-lemming-0wlyvzy5::create\",\"resource:gitpodToken::*::create\",\"resource:userStorage::*::create/get/update\",\"resource:token::*::get\",\"resource:contentBlob::*::create/get\",\"resource:envVar::gitpod-io/gitpod::create/get/update/delete\"],\"expiryDate\":\"2021-06-01T13:21:53.406Z\",\"reuse\":2}]" + }, + { + "name": "GITPOD_RESOLVED_EXTENSIONS", + "value": "{\"vscode.bat@1.44.2\":{\"fullPluginName\":\"vscode.bat@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.clojure@1.44.2\":{\"fullPluginName\":\"vscode.clojure@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.coffeescript@1.44.2\":{\"fullPluginName\":\"vscode.coffeescript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.cpp@1.44.2\":{\"fullPluginName\":\"vscode.cpp@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.csharp@1.44.2\":{\"fullPluginName\":\"vscode.csharp@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"llvm-vs-code-extensions.vscode-clangd@0.1.5\":{\"fullPluginName\":\"llvm-vs-code-extensions.vscode-clangd@0.1.5\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.css@1.51.1\":{\"fullPluginName\":\"vscode.css@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.css-language-features@1.51.1\":{\"fullPluginName\":\"vscode.css-language-features@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.debug-auto-launch@1.44.2\":{\"fullPluginName\":\"vscode.debug-auto-launch@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.emmet@1.44.2\":{\"fullPluginName\":\"vscode.emmet@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.fsharp@1.44.2\":{\"fullPluginName\":\"vscode.fsharp@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.go@1.44.2\":{\"fullPluginName\":\"vscode.go@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.groovy@1.44.2\":{\"fullPluginName\":\"vscode.groovy@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.handlebars@1.44.2\":{\"fullPluginName\":\"vscode.handlebars@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.hlsl@1.44.2\":{\"fullPluginName\":\"vscode.hlsl@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.html@1.51.1\":{\"fullPluginName\":\"vscode.html@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.html-language-features@1.51.1\":{\"fullPluginName\":\"vscode.html-language-features@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.ini@1.44.2\":{\"fullPluginName\":\"vscode.ini@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.java@1.53.2\":{\"fullPluginName\":\"vscode.java@1.53.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.javascript@1.44.2\":{\"fullPluginName\":\"vscode.javascript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.json@1.44.2\":{\"fullPluginName\":\"vscode.json@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.json-language-features@1.46.1\":{\"fullPluginName\":\"vscode.json-language-features@1.46.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.less@1.44.2\":{\"fullPluginName\":\"vscode.less@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.log@1.44.2\":{\"fullPluginName\":\"vscode.log@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.lua@1.44.2\":{\"fullPluginName\":\"vscode.lua@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.make@1.44.2\":{\"fullPluginName\":\"vscode.make@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.markdown@1.44.2\":{\"fullPluginName\":\"vscode.markdown@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.npm@1.39.1\":{\"fullPluginName\":\"vscode.npm@1.39.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.objective-c@1.44.2\":{\"fullPluginName\":\"vscode.objective-c@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.perl@1.44.2\":{\"fullPluginName\":\"vscode.perl@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.php@1.44.2\":{\"fullPluginName\":\"vscode.php@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.powershell@1.44.2\":{\"fullPluginName\":\"vscode.powershell@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.pug@1.44.2\":{\"fullPluginName\":\"vscode.pug@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.python@1.47.3\":{\"fullPluginName\":\"vscode.python@1.47.3\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.r@1.44.2\":{\"fullPluginName\":\"vscode.r@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.razor@1.44.2\":{\"fullPluginName\":\"vscode.razor@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.ruby@1.44.2\":{\"fullPluginName\":\"vscode.ruby@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.rust@1.44.2\":{\"fullPluginName\":\"vscode.rust@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.scss@1.44.2\":{\"fullPluginName\":\"vscode.scss@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.shaderlab@1.44.2\":{\"fullPluginName\":\"vscode.shaderlab@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.shellscript@1.44.2\":{\"fullPluginName\":\"vscode.shellscript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.sql@1.44.2\":{\"fullPluginName\":\"vscode.sql@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.swift@1.44.2\":{\"fullPluginName\":\"vscode.swift@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.typescript@1.44.2\":{\"fullPluginName\":\"vscode.typescript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.typescript-language-features@1.44.2\":{\"fullPluginName\":\"vscode.typescript-language-features@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.vb@1.44.2\":{\"fullPluginName\":\"vscode.vb@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.xml@1.44.2\":{\"fullPluginName\":\"vscode.xml@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.yaml@1.44.2\":{\"fullPluginName\":\"vscode.yaml@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"redhat.java@0.75.0\":{\"fullPluginName\":\"redhat.java@0.75.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscjava.vscode-java-debug@0.27.1\":{\"fullPluginName\":\"vscjava.vscode-java-debug@0.27.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscjava.vscode-java-dependency@0.18.0\":{\"fullPluginName\":\"vscjava.vscode-java-dependency@0.18.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-vscode.node-debug@1.38.4\":{\"fullPluginName\":\"ms-vscode.node-debug@1.38.4\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-vscode.node-debug2@1.33.0\":{\"fullPluginName\":\"ms-vscode.node-debug2@1.33.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-python.python@2020.7.96456\":{\"fullPluginName\":\"ms-python.python@2020.7.96456\",\"url\":\"local\",\"kind\":\"builtin\"},\"redhat.vscode-xml@0.11.0\":{\"fullPluginName\":\"redhat.vscode-xml@0.11.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"redhat.vscode-yaml@0.8.0\":{\"fullPluginName\":\"redhat.vscode-yaml@0.8.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"bmewburn.vscode-intelephense-client@1.4.0\":{\"fullPluginName\":\"bmewburn.vscode-intelephense-client@1.4.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"felixfbecker.php-debug@1.13.0\":{\"fullPluginName\":\"felixfbecker.php-debug@1.13.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"rust-lang.rust@0.7.8\":{\"fullPluginName\":\"rust-lang.rust@0.7.8\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-abyss@1.44.2\":{\"fullPluginName\":\"vscode.theme-abyss@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-kimbie-dark@1.44.2\":{\"fullPluginName\":\"vscode.theme-kimbie-dark@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-monokai@1.44.2\":{\"fullPluginName\":\"vscode.theme-monokai@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-monokai-dimmed@1.44.2\":{\"fullPluginName\":\"vscode.theme-monokai-dimmed@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-quietlight@1.44.2\":{\"fullPluginName\":\"vscode.theme-quietlight@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-red@1.44.2\":{\"fullPluginName\":\"vscode.theme-red@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-solarized-dark@1.44.2\":{\"fullPluginName\":\"vscode.theme-solarized-dark@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-solarized-light@1.44.2\":{\"fullPluginName\":\"vscode.theme-solarized-light@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-tomorrow-night-blue@1.44.2\":{\"fullPluginName\":\"vscode.theme-tomorrow-night-blue@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.vscode-theme-seti@1.44.2\":{\"fullPluginName\":\"vscode.vscode-theme-seti@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.merge-conflict@1.44.2\":{\"fullPluginName\":\"vscode.merge-conflict@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-vscode.references-view@0.0.47\":{\"fullPluginName\":\"ms-vscode.references-view@0.0.47\",\"url\":\"local\",\"kind\":\"builtin\"},\"EditorConfig.EditorConfig@0.15.1\":{\"fullPluginName\":\"editorconfig.editorconfig@0.15.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.docker@1.47.3\":{\"fullPluginName\":\"vscode.docker@1.47.3\",\"url\":\"local\",\"kind\":\"builtin\"},\"golang.go\":{\"fullPluginName\":\"golang.go@0.25.0\",\"url\":\"https://open-vsx.org/api/golang/Go/0.25.0/file/golang.Go-0.25.0.vsix\",\"kind\":\"workspace\"},\"bajdzis.vscode-database\":{\"fullPluginName\":\"bajdzis.vscode-database@2.2.3\",\"url\":\"https://open-vsx.org/api/bajdzis/vscode-database/2.2.3/file/bajdzis.vscode-database-2.2.3.vsix\",\"kind\":\"workspace\"},\"zxh404.vscode-proto3\":{\"fullPluginName\":\"zxh404.vscode-proto3@0.5.4\",\"url\":\"https://open-vsx.org/api/zxh404/vscode-proto3/0.5.4/file/zxh404.vscode-proto3-0.5.4.vsix\",\"kind\":\"workspace\"},\"stkb.rewrap\":{\"fullPluginName\":\"stkb.rewrap@1.14.0\",\"url\":\"https://open-vsx.org/api/stkb/rewrap/1.14.0/file/stkb.rewrap-1.14.0.vsix\",\"kind\":\"workspace\"},\"hashicorp.terraform\":{\"fullPluginName\":\"hashicorp.terraform@2.11.0\",\"url\":\"https://open-vsx.org/api/hashicorp/terraform/2.11.0/file/hashicorp.terraform-2.11.0.vsix\",\"kind\":\"workspace\"},\"ms-kubernetes-tools.vscode-kubernetes-tools\":{\"fullPluginName\":\"ms-kubernetes-tools.vscode-kubernetes-tools@1.3.3\",\"url\":\"https://open-vsx.org/api/ms-kubernetes-tools/vscode-kubernetes-tools/1.3.3/file/ms-kubernetes-tools.vscode-kubernetes-tools-1.3.3.vsix\",\"kind\":\"workspace\"}}" + }, + { + "name": "GITPOD_EXTERNAL_EXTENSIONS", + "value": "[]" + }, + { + "name": "GITPOD_INTERVAL", + "value": "30000" + }, + { + "name": "GITPOD_MEMORY", + "value": "2415" + }, + { + "name": "GITPOD_HEADLESS", + "value": "true" + } + ], + "resources": { + "limits": { + "cpu": "5", + "memory": "12Gi" + }, + "requests": { + "cpu": "1m", + "ephemeral-storage": "5Gi", + "memory": "4608Mi" + } + }, + "volumeMounts": [ + { + "name": "vol-this-workspace", + "mountPath": "/workspace", + "mountPropagation": "HostToContainer" + }, + { + "name": "daemon-mount", + "mountPath": "/.workspace", + "mountPropagation": "HostToContainer" + } + ], + "readinessProbe": { + "httpGet": { + "path": "/_supervisor/v1/status/content/wait/true", + "port": 22999, + "scheme": "HTTP" + }, + "timeoutSeconds": 1, + "periodSeconds": 1, + "successThreshold": 1, + "failureThreshold": 600 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "imagePullPolicy": "Always", + "securityContext": { + "capabilities": { + "add": [ + "AUDIT_WRITE", + "FSETID", + "KILL", + "NET_BIND_SERVICE", + "SYS_PTRACE" + ], + "drop": [ + "SETPCAP", + "CHOWN", + "NET_RAW", + "DAC_OVERRIDE", + "FOWNER", + "SYS_CHROOT", + "SETFCAP", + "SETUID", + "SETGID" + ] + }, + "privileged": false, + "runAsUser": 33333, + "runAsGroup": 33333, + "runAsNonRoot": true, + "readOnlyRootFilesystem": false, + "allowPrivilegeEscalation": true + } + } + ], + "restartPolicy": "Never", + "terminationGracePeriodSeconds": 30, + "dnsPolicy": "None", + "serviceAccountName": "workspace", + "serviceAccount": "workspace", + "automountServiceAccountToken": false, + "nodeName": "gke-dev-workload-1-49d27f81-3xfh", + "securityContext": { + "supplementalGroups": [ + 1 + ], + "fsGroup": 1 + }, + "imagePullSecrets": [ + { + "name": "gcp-sa-registry-auth" + } + ], + "affinity": { + "nodeAffinity": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "gitpod.io/workload_workspace", + "operator": "Exists" + } + ] + } + ] + } + } + }, + "schedulerName": "workspace-scheduler", + "tolerations": [ + { + "key": "node.kubernetes.io/disk-pressure", + "operator": "Exists", + "effect": "NoExecute" + }, + { + "key": "node.kubernetes.io/memory-pressure", + "operator": "Exists", + "effect": "NoExecute" + }, + { + "key": "node.kubernetes.io/network-unavailable", + "operator": "Exists", + "effect": "NoExecute", + "tolerationSeconds": 30 + }, + { + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "effect": "NoExecute", + "tolerationSeconds": 300 + }, + { + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "effect": "NoExecute", + "tolerationSeconds": 300 + } + ], + "priority": 0, + "dnsConfig": { + "nameservers": [ + "1.1.1.1", + "8.8.8.8" + ] + }, + "enableServiceLinks": false + }, + "status": { + "phase": "Succeeded", + "conditions": [ + { + "type": "Initialized", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2021-05-31T13:21:54Z", + "reason": "PodCompleted" + }, + { + "type": "Ready", + "status": "False", + "lastProbeTime": null, + "lastTransitionTime": "2021-05-31T13:23:07Z", + "reason": "PodCompleted" + }, + { + "type": "ContainersReady", + "status": "False", + "lastProbeTime": null, + "lastTransitionTime": "2021-05-31T13:23:07Z", + "reason": "PodCompleted" + }, + { + "type": "PodScheduled", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2021-05-31T13:21:54Z" + } + ], + "hostIP": "10.132.15.219", + "podIP": "10.60.47.146", + "podIPs": [ + { + "ip": "10.60.47.146" + } + ], + "startTime": "2021-05-31T13:21:54Z", + "containerStatuses": [ + { + "name": "workspace", + "state": { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "startedAt": "2021-05-31T13:22:00Z", + "finishedAt": "2021-05-31T13:23:06Z", + "containerID": "containerd://33bd9fe7e2a845a488b8a46073698dc914ceca54694fefe06c233cb8a3f474c1" + } + }, + "lastState": {}, + "ready": false, + "restartCount": 0, + "image": "reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30570/remote/dbc45dce-611a-49a8-bd76-7afda76a1e24:latest", + "imageID": "reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30570/remote/dbc45dce-611a-49a8-bd76-7afda76a1e24@sha256:5914591bf93e3db929ae8cd93c65f3cd45b3c76b5067fabe61d70938565eb5c0", + "containerID": "containerd://33bd9fe7e2a845a488b8a46073698dc914ceca54694fefe06c233cb8a3f474c1", + "started": false + } + ], + "qosClass": "Burstable" + } + }, + "theiaService": { + "kind": "Service", + "apiVersion": "v1", + "metadata": { + "name": "ws-gray-lemming-0wlyvzy5-theia", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/services/ws-gray-lemming-0wlyvzy5-theia", + "uid": "2ca0b91b-6b90-4585-89a0-e031cb91ca7a", + "resourceVersion": "200723113", + "creationTimestamp": "2021-05-31T13:21:54Z", + "labels": { + "app": "gitpod", + "component": "workspace", + "gpwsman": "true", + "headless": "true", + "metaID": "gray-lemming-0wlyvzy5", + "owner": "a0dfe7e6-351b-4fd8-80c2-5ed45814f44a", + "workspaceID": "dbc45dce-611a-49a8-bd76-7afda76a1e24", + "workspaceType": "prebuild" + } + }, + "spec": { + "ports": [ + { + "name": "ide", + "protocol": "TCP", + "port": 23000, + "targetPort": 23000 + }, + { + "name": "supervisor", + "protocol": "TCP", + "port": 22999, + "targetPort": 22999 + } + ], + "selector": { + "app": "gitpod", + "component": "workspace", + "gpwsman": "true", + "headless": "true", + "metaID": "gray-lemming-0wlyvzy5", + "owner": "a0dfe7e6-351b-4fd8-80c2-5ed45814f44a", + "workspaceID": "dbc45dce-611a-49a8-bd76-7afda76a1e24", + "workspaceType": "prebuild" + }, + "clusterIP": "10.63.244.31", + "type": "ClusterIP", + "sessionAffinity": "None" + }, + "status": { + "loadBalancer": {} + } + }, + "portsService": { + "kind": "Service", + "apiVersion": "v1", + "metadata": { + "name": "ws-gray-lemming-0wlyvzy5-ports", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/services/ws-gray-lemming-0wlyvzy5-ports", + "uid": "224eb51e-fea8-43bb-8fe3-85a149b7ee14", + "resourceVersion": "200723118", + "creationTimestamp": "2021-05-31T13:21:54Z", + "labels": { + "gpwsman": "true", + "metaID": "gray-lemming-0wlyvzy5", + "serviceType": "ports", + "workspaceID": "dbc45dce-611a-49a8-bd76-7afda76a1e24" + }, + "annotations": { + "gitpod/port-url-13001": "https://13001-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-1337": "https://1337-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-13444": "https://13444-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-3000": "https://3000-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-3001": "https://3001-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-3306": "https://3306-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-4000": "https://4000-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-5900": "https://5900-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-6080": "https://6080-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-7777": "https://7777-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-9229": "https://9229-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "gitpod/port-url-9999": "https://9999-gray-lemming-0wlyvzy5.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + } + }, + "spec": { + "ports": [ + { + "name": "p1337-public", + "protocol": "TCP", + "port": 1337, + "targetPort": 1337 + }, + { + "name": "p3000-public", + "protocol": "TCP", + "port": 3000, + "targetPort": 3000 + }, + { + "name": "p3001-public", + "protocol": "TCP", + "port": 3001, + "targetPort": 3001 + }, + { + "name": "p3306-public", + "protocol": "TCP", + "port": 3306, + "targetPort": 3306 + }, + { + "name": "p4000-public", + "protocol": "TCP", + "port": 4000, + "targetPort": 4000 + }, + { + "name": "p5900-public", + "protocol": "TCP", + "port": 5900, + "targetPort": 5900 + }, + { + "name": "p6080-private", + "protocol": "TCP", + "port": 6080, + "targetPort": 6080 + }, + { + "name": "p9229-public", + "protocol": "TCP", + "port": 9229, + "targetPort": 9229 + }, + { + "name": "p9999-public", + "protocol": "TCP", + "port": 9999, + "targetPort": 9999 + }, + { + "name": "p13001-public", + "protocol": "TCP", + "port": 13001, + "targetPort": 13001 + }, + { + "name": "p7777-public", + "protocol": "TCP", + "port": 7777, + "targetPort": 7777 + }, + { + "name": "p13444-public", + "protocol": "TCP", + "port": 13444, + "targetPort": 13444 + } + ], + "selector": { + "gpwsman": "true", + "workspaceID": "dbc45dce-611a-49a8-bd76-7afda76a1e24" + }, + "clusterIP": "10.63.241.188", + "type": "ClusterIP", + "sessionAffinity": "None" + }, + "status": { + "loadBalancer": {} + } + }, + "events": [ + { + "metadata": { + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24 - scheduled5jqzp", + "generateName": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24 - scheduled", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24%20-%20scheduled5jqzp", + "uid": "8f162013-6a14-4fcd-8e43-5063e225e66e", + "resourceVersion": "12881558", + "creationTimestamp": "2021-05-31T13:21:54Z" + }, + "involvedObject": { + "kind": "Pod", + "namespace": "staging-gpl-headless-log-wsman", + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "uid": "dffc86f1-b0de-44fb-a88a-ad34127f6b42" + }, + "reason": "Scheduled", + "message": "Placed pod [staging-gpl-headless-log-wsman/prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24] on gke-dev-workload-1-49d27f81-3xfh\n", + "source": { + "component": "workspace-scheduler" + }, + "firstTimestamp": "2021-05-31T13:21:54Z", + "lastTimestamp": "2021-05-31T13:21:54Z", + "count": 1, + "type": "Normal", + "eventTime": null, + "reportingComponent": "", + "reportingInstance": "" + }, + { + "metadata": { + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296d48550d81", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296d48550d81", + "uid": "9ac45dc2-d5a9-4cc9-b539-970397543b1f", + "resourceVersion": "12881559", + "creationTimestamp": "2021-05-31T13:21:55Z" + }, + "involvedObject": { + "kind": "Pod", + "namespace": "staging-gpl-headless-log-wsman", + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "uid": "dffc86f1-b0de-44fb-a88a-ad34127f6b42", + "apiVersion": "v1", + "resourceVersion": "200723110", + "fieldPath": "spec.containers{workspace}" + }, + "reason": "Pulling", + "message": "Pulling image \"reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30570/remote/dbc45dce-611a-49a8-bd76-7afda76a1e24\"", + "source": { + "component": "kubelet", + "host": "gke-dev-workload-1-49d27f81-3xfh" + }, + "firstTimestamp": "2021-05-31T13:21:55Z", + "lastTimestamp": "2021-05-31T13:21:55Z", + "count": 1, + "type": "Normal", + "eventTime": null, + "reportingComponent": "", + "reportingInstance": "" + }, + { + "metadata": { + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296e6362b54f", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296e6362b54f", + "uid": "12bcb116-483c-4e48-b242-5f4c57b872a4", + "resourceVersion": "12881560", + "creationTimestamp": "2021-05-31T13:21:59Z" + }, + "involvedObject": { + "kind": "Pod", + "namespace": "staging-gpl-headless-log-wsman", + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "uid": "dffc86f1-b0de-44fb-a88a-ad34127f6b42", + "apiVersion": "v1", + "resourceVersion": "200723110", + "fieldPath": "spec.containers{workspace}" + }, + "reason": "Pulled", + "message": "Successfully pulled image \"reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30570/remote/dbc45dce-611a-49a8-bd76-7afda76a1e24\"", + "source": { + "component": "kubelet", + "host": "gke-dev-workload-1-49d27f81-3xfh" + }, + "firstTimestamp": "2021-05-31T13:21:59Z", + "lastTimestamp": "2021-05-31T13:21:59Z", + "count": 1, + "type": "Normal", + "eventTime": null, + "reportingComponent": "", + "reportingInstance": "" + }, + { + "metadata": { + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296e6716d034", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296e6716d034", + "uid": "38761d36-3ca7-4525-baf4-ed36ed40ba89", + "resourceVersion": "12881561", + "creationTimestamp": "2021-05-31T13:21:59Z" + }, + "involvedObject": { + "kind": "Pod", + "namespace": "staging-gpl-headless-log-wsman", + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "uid": "dffc86f1-b0de-44fb-a88a-ad34127f6b42", + "apiVersion": "v1", + "resourceVersion": "200723110", + "fieldPath": "spec.containers{workspace}" + }, + "reason": "Created", + "message": "Created container workspace", + "source": { + "component": "kubelet", + "host": "gke-dev-workload-1-49d27f81-3xfh" + }, + "firstTimestamp": "2021-05-31T13:21:59Z", + "lastTimestamp": "2021-05-31T13:21:59Z", + "count": 1, + "type": "Normal", + "eventTime": null, + "reportingComponent": "", + "reportingInstance": "" + }, + { + "metadata": { + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296e75ab4bad", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296e75ab4bad", + "uid": "718efe13-d1c0-405e-8a66-ff6d2b223fe3", + "resourceVersion": "12881562", + "creationTimestamp": "2021-05-31T13:22:00Z" + }, + "involvedObject": { + "kind": "Pod", + "namespace": "staging-gpl-headless-log-wsman", + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "uid": "dffc86f1-b0de-44fb-a88a-ad34127f6b42", + "apiVersion": "v1", + "resourceVersion": "200723110", + "fieldPath": "spec.containers{workspace}" + }, + "reason": "Started", + "message": "Started container workspace", + "source": { + "component": "kubelet", + "host": "gke-dev-workload-1-49d27f81-3xfh" + }, + "firstTimestamp": "2021-05-31T13:22:00Z", + "lastTimestamp": "2021-05-31T13:22:00Z", + "count": 1, + "type": "Normal", + "eventTime": null, + "reportingComponent": "", + "reportingInstance": "" + }, + { + "metadata": { + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296ef15ca0ee", + "namespace": "staging-gpl-headless-log-wsman", + "selfLink": "/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24.1684296ef15ca0ee", + "uid": "38110d0d-79ba-4ce7-b7c8-191cfcc04f7d", + "resourceVersion": "12881564", + "creationTimestamp": "2021-05-31T13:22:02Z" + }, + "involvedObject": { + "kind": "Pod", + "namespace": "staging-gpl-headless-log-wsman", + "name": "prebuild-dbc45dce-611a-49a8-bd76-7afda76a1e24", + "uid": "dffc86f1-b0de-44fb-a88a-ad34127f6b42", + "apiVersion": "v1", + "resourceVersion": "200723110", + "fieldPath": "spec.containers{workspace}" + }, + "reason": "Unhealthy", + "message": "Readiness probe failed: Get http://10.60.47.146:22999/_supervisor/v1/status/content/wait/true: net/http: request canceled (Client.Timeout exceeded while awaiting headers)", + "source": { + "component": "kubelet", + "host": "gke-dev-workload-1-49d27f81-3xfh" + }, + "firstTimestamp": "2021-05-31T13:22:02Z", + "lastTimestamp": "2021-05-31T13:22:02Z", + "count": 1, + "type": "Warning", + "eventTime": null, + "reportingComponent": "", + "reportingInstance": "" + } + ] +} \ No newline at end of file diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess2_CREATING01.golden b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess2_CREATING01.golden new file mode 100644 index 00000000000000..973e4f449556e1 --- /dev/null +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess2_CREATING01.golden @@ -0,0 +1,95 @@ +{ + "status": { + "id": "8e0bbcdf-a926-4670-8c40-b718f035b2ae", + "metadata": { + "owner": "d98c5b92-2066-4fce-bea6-1e08b58642ab", + "meta_id": "green-wombat-62dzneud", + "started_at": { + "seconds": 1622206099 + } + }, + "spec": { + "workspace_image": "eu.gcr.io/gitpod-core-dev/registry/workspace-images:81c4fb602a540d261f210cfc8ba0435b63b24238c1762ec029d8edaec816afb6", + "ide_image": "eu.gcr.io/gitpod-core-dev/build/ide/code:gpl-headless-log-wsman.17", + "headless": true, + "url": "https://green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "exposed_ports": [ + { + "port": 1337, + "visibility": 1, + "url": "https://1337-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 3000, + "visibility": 1, + "url": "https://3000-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 3001, + "visibility": 1, + "url": "https://3001-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 3306, + "visibility": 1, + "url": "https://3306-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 4000, + "visibility": 1, + "url": "https://4000-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 5900, + "visibility": 1, + "url": "https://5900-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 6080, + "url": "https://6080-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 9229, + "visibility": 1, + "url": "https://9229-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 9999, + "visibility": 1, + "url": "https://9999-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 13001, + "visibility": 1, + "url": "https://13001-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 7777, + "visibility": 1, + "url": "https://7777-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 13444, + "visibility": 1, + "url": "https://13444-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + } + ], + "type": 1 + }, + "phase": 2, + "conditions": { + "pulling_images": 1, + "service_exists": 1, + "deployed": 1 + }, + "message": "containers are being created", + "runtime": { + "node_name": "gke-dev-workload-1-49d27f81-pd35", + "pod_name": "prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae", + "node_ip": "10.132.15.221" + }, + "auth": { + "owner_token": "FZ2k9zbSCo9e85Y21yh.SHLJbya7pW2Y" + } + } +} \ No newline at end of file diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess2_CREATING01.json b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess2_CREATING01.json new file mode 100644 index 00000000000000..7026a0766246a2 --- /dev/null +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess2_CREATING01.json @@ -0,0 +1 @@ +{"pod":{"kind":"Pod","apiVersion":"v1","metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/pods/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e","resourceVersion":"198743334","creationTimestamp":"2021-05-28T12:48:19Z","labels":{"app":"gitpod","component":"workspace","gitpod.io/networkpolicy":"default","gpwsman":"true","headless":"true","metaID":"green-wombat-62dzneud","owner":"d98c5b92-2066-4fce-bea6-1e08b58642ab","workspaceID":"8e0bbcdf-a926-4670-8c40-b718f035b2ae","workspaceType":"prebuild"},"annotations":{"cni.projectcalico.org/podIP":"10.60.61.170/32","container.apparmor.security.beta.kubernetes.io/workspace":"unconfined","gitpod.io/requiredNodeServices":"ws-daemon,registry-facade","gitpod/admission":"admit_owner_only","gitpod/contentInitializer":"[redacted]","gitpod/id":"8e0bbcdf-a926-4670-8c40-b718f035b2ae","gitpod/imageSpec":"CnRldS5nY3IuaW8vZ2l0cG9kLWNvcmUtZGV2L3JlZ2lzdHJ5L3dvcmtzcGFjZS1pbWFnZXM6ODFjNGZiNjAyYTU0MGQyNjFmMjEwY2ZjOGJhMDQzNWI2M2IyNDIzOGMxNzYyZWMwMjlkOGVkYWVjODE2YWZiNhJCZXUuZ2NyLmlvL2dpdHBvZC1jb3JlLWRldi9idWlsZC9pZGUvY29kZTpncGwtaGVhZGxlc3MtbG9nLXdzbWFuLjE3","gitpod/never-ready":"true","gitpod/ownerToken":"FZ2k9zbSCo9e85Y21yh.SHLJbya7pW2Y","gitpod/servicePrefix":"green-wombat-62dzneud","gitpod/traceid":"AAAAAAAAAADk1qKpVgS8nkUB60sg2ZMPWUgTp0iuTisBAAAAAA==","gitpod/url":"https://green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","kubernetes.io/psp":"staging-gpl-headless-log-wsman-ns-workspace","prometheus.io/path":"/metrics","prometheus.io/port":"23000","prometheus.io/scrape":"true","seccomp.security.alpha.kubernetes.io/pod":"localhost/workspace_default_gpl-headless-log-wsman.17.json"}},"spec":{"volumes":[{"name":"vol-this-workspace","hostPath":{"path":"/mnt/disks/ssd0/workspaces/8e0bbcdf-a926-4670-8c40-b718f035b2ae","type":"DirectoryOrCreate"}},{"name":"daemon-mount","hostPath":{"path":"/mnt/disks/ssd0/workspaces/8e0bbcdf-a926-4670-8c40-b718f035b2ae-daemon","type":"DirectoryOrCreate"}}],"containers":[{"name":"workspace","image":"reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30222/remote/8e0bbcdf-a926-4670-8c40-b718f035b2ae","command":["/.supervisor/workspacekit","ring0"],"ports":[{"containerPort":23000,"protocol":"TCP"}],"env":[{"name":"GITPOD_REPO_ROOT","value":"/workspace/gitpod"},{"name":"GITPOD_CLI_APITOKEN","value":"eGnGrk5s7-.KCc15tXUtyKlzwlbjOBIs"},{"name":"GITPOD_WORKSPACE_ID","value":"green-wombat-62dzneud"},{"name":"GITPOD_INSTANCE_ID","value":"8e0bbcdf-a926-4670-8c40-b718f035b2ae"},{"name":"GITPOD_THEIA_PORT","value":"23000"},{"name":"THEIA_WORKSPACE_ROOT","value":"/workspace/gitpod/gitpod-ws.code-workspace"},{"name":"GITPOD_HOST","value":"https://gpl-headless-log-wsman.staging.gitpod-dev.com"},{"name":"GITPOD_WORKSPACE_URL","value":"https://green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com"},{"name":"THEIA_SUPERVISOR_TOKEN","value":"354c0b368f2b4a93b7b812564e663d23"},{"name":"THEIA_SUPERVISOR_ENDPOINT","value":":22999"},{"name":"THEIA_WEBVIEW_EXTERNAL_ENDPOINT","value":"webview-{{hostname}}"},{"name":"THEIA_MINI_BROWSER_HOST_PATTERN","value":"browser-{{hostname}}"},{"name":"GITPOD_GIT_USER_NAME","value":"Gero Posmyk-Leinemann"},{"name":"GITPOD_GIT_USER_EMAIL","value":"gero@gitpod.io"},{"name":"PREBUILD_PARAMS","value":"[redacted]"},{"name":"GITPOD_WORKSPACE_CONTEXT_URL","value":"prebuild/https://github.com/gitpod-io/gitpod/tree/gpl/test-prebuild"},{"name":"GITPOD_WORKSPACE_CONTEXT","value":"{\"ref\":\"gpl/test-prebuild\",\"refType\":\"branch\",\"isFile\":false,\"path\":\"\",\"title\":\"gitpod-io/gitpod - gpl/test-prebuild\",\"revision\":\"a1afe2bb7d454ea7a4194f363601a31ae319ce9c\",\"repository\":{\"cloneUrl\":\"https://github.com/gitpod-io/gitpod.git\",\"host\":\"github.com\",\"name\":\"gitpod\",\"owner\":\"gitpod-io\",\"private\":false}}"},{"name":"GITPOD_TASKS","value":"[{\"name\":\"Test Command\",\"init\":\"export PREBUILD_PARAMS=${PREBUILD_PARAMS:-\\\"100_500ms_30m\\\"}; go run ./main.go $PREBUILD_PARAMS\"}]"},{"name":"THEIA_SUPERVISOR_TOKENS","value":"[{\"tokenOTS\":\"https://gpl-headless-log-wsman.staging.gitpod-dev.com/api/ots/get/71ca5ce2-b15e-4a0e-8a0f-65964c509d40\",\"token\":\"ots\",\"kind\":\"gitpod\",\"host\":\"gpl-headless-log-wsman.staging.gitpod-dev.com\",\"scope\":[\"function:getWorkspace\",\"function:getLoggedInUser\",\"function:getPortAuthenticationToken\",\"function:getWorkspaceOwner\",\"function:getWorkspaceUsers\",\"function:isWorkspaceOwner\",\"function:controlAdmission\",\"function:setWorkspaceTimeout\",\"function:getWorkspaceTimeout\",\"function:sendHeartBeat\",\"function:getOpenPorts\",\"function:openPort\",\"function:closePort\",\"function:getLayout\",\"function:generateNewGitpodToken\",\"function:takeSnapshot\",\"function:storeLayout\",\"function:stopWorkspace\",\"function:getToken\",\"function:getContentBlobUploadUrl\",\"function:getContentBlobDownloadUrl\",\"function:accessCodeSyncStorage\",\"function:guessGitTokenScopes\",\"function:getEnvVars\",\"function:setEnvVar\",\"function:deleteEnvVar\",\"resource:workspace::green-wombat-62dzneud::get/update\",\"resource:workspaceInstance::8e0bbcdf-a926-4670-8c40-b718f035b2ae::get/update/delete\",\"resource:snapshot::ws-green-wombat-62dzneud::create\",\"resource:gitpodToken::*::create\",\"resource:userStorage::*::create/get/update\",\"resource:token::*::get\",\"resource:contentBlob::*::create/get\",\"resource:envVar::gitpod-io/gitpod::create/get/update/delete\"],\"expiryDate\":\"2021-05-29T12:48:19.234Z\",\"reuse\":2}]"},{"name":"GITPOD_RESOLVED_EXTENSIONS","value":"{\"vscode.bat@1.44.2\":{\"fullPluginName\":\"vscode.bat@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.clojure@1.44.2\":{\"fullPluginName\":\"vscode.clojure@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.coffeescript@1.44.2\":{\"fullPluginName\":\"vscode.coffeescript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.cpp@1.44.2\":{\"fullPluginName\":\"vscode.cpp@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.csharp@1.44.2\":{\"fullPluginName\":\"vscode.csharp@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"llvm-vs-code-extensions.vscode-clangd@0.1.5\":{\"fullPluginName\":\"llvm-vs-code-extensions.vscode-clangd@0.1.5\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.css@1.51.1\":{\"fullPluginName\":\"vscode.css@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.css-language-features@1.51.1\":{\"fullPluginName\":\"vscode.css-language-features@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.debug-auto-launch@1.44.2\":{\"fullPluginName\":\"vscode.debug-auto-launch@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.emmet@1.44.2\":{\"fullPluginName\":\"vscode.emmet@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.fsharp@1.44.2\":{\"fullPluginName\":\"vscode.fsharp@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.go@1.44.2\":{\"fullPluginName\":\"vscode.go@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.groovy@1.44.2\":{\"fullPluginName\":\"vscode.groovy@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.handlebars@1.44.2\":{\"fullPluginName\":\"vscode.handlebars@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.hlsl@1.44.2\":{\"fullPluginName\":\"vscode.hlsl@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.html@1.51.1\":{\"fullPluginName\":\"vscode.html@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.html-language-features@1.51.1\":{\"fullPluginName\":\"vscode.html-language-features@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.ini@1.44.2\":{\"fullPluginName\":\"vscode.ini@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.java@1.53.2\":{\"fullPluginName\":\"vscode.java@1.53.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.javascript@1.44.2\":{\"fullPluginName\":\"vscode.javascript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.json@1.44.2\":{\"fullPluginName\":\"vscode.json@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.json-language-features@1.46.1\":{\"fullPluginName\":\"vscode.json-language-features@1.46.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.less@1.44.2\":{\"fullPluginName\":\"vscode.less@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.log@1.44.2\":{\"fullPluginName\":\"vscode.log@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.lua@1.44.2\":{\"fullPluginName\":\"vscode.lua@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.make@1.44.2\":{\"fullPluginName\":\"vscode.make@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.markdown@1.44.2\":{\"fullPluginName\":\"vscode.markdown@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.npm@1.39.1\":{\"fullPluginName\":\"vscode.npm@1.39.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.objective-c@1.44.2\":{\"fullPluginName\":\"vscode.objective-c@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.perl@1.44.2\":{\"fullPluginName\":\"vscode.perl@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.php@1.44.2\":{\"fullPluginName\":\"vscode.php@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.powershell@1.44.2\":{\"fullPluginName\":\"vscode.powershell@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.pug@1.44.2\":{\"fullPluginName\":\"vscode.pug@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.python@1.47.3\":{\"fullPluginName\":\"vscode.python@1.47.3\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.r@1.44.2\":{\"fullPluginName\":\"vscode.r@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.razor@1.44.2\":{\"fullPluginName\":\"vscode.razor@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.ruby@1.44.2\":{\"fullPluginName\":\"vscode.ruby@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.rust@1.44.2\":{\"fullPluginName\":\"vscode.rust@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.scss@1.44.2\":{\"fullPluginName\":\"vscode.scss@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.shaderlab@1.44.2\":{\"fullPluginName\":\"vscode.shaderlab@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.shellscript@1.44.2\":{\"fullPluginName\":\"vscode.shellscript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.sql@1.44.2\":{\"fullPluginName\":\"vscode.sql@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.swift@1.44.2\":{\"fullPluginName\":\"vscode.swift@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.typescript@1.44.2\":{\"fullPluginName\":\"vscode.typescript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.typescript-language-features@1.44.2\":{\"fullPluginName\":\"vscode.typescript-language-features@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.vb@1.44.2\":{\"fullPluginName\":\"vscode.vb@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.xml@1.44.2\":{\"fullPluginName\":\"vscode.xml@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.yaml@1.44.2\":{\"fullPluginName\":\"vscode.yaml@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"redhat.java@0.75.0\":{\"fullPluginName\":\"redhat.java@0.75.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscjava.vscode-java-debug@0.27.1\":{\"fullPluginName\":\"vscjava.vscode-java-debug@0.27.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscjava.vscode-java-dependency@0.18.0\":{\"fullPluginName\":\"vscjava.vscode-java-dependency@0.18.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-vscode.node-debug@1.38.4\":{\"fullPluginName\":\"ms-vscode.node-debug@1.38.4\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-vscode.node-debug2@1.33.0\":{\"fullPluginName\":\"ms-vscode.node-debug2@1.33.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-python.python@2020.7.96456\":{\"fullPluginName\":\"ms-python.python@2020.7.96456\",\"url\":\"local\",\"kind\":\"builtin\"},\"redhat.vscode-xml@0.11.0\":{\"fullPluginName\":\"redhat.vscode-xml@0.11.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"redhat.vscode-yaml@0.8.0\":{\"fullPluginName\":\"redhat.vscode-yaml@0.8.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"bmewburn.vscode-intelephense-client@1.4.0\":{\"fullPluginName\":\"bmewburn.vscode-intelephense-client@1.4.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"felixfbecker.php-debug@1.13.0\":{\"fullPluginName\":\"felixfbecker.php-debug@1.13.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"rust-lang.rust@0.7.8\":{\"fullPluginName\":\"rust-lang.rust@0.7.8\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-abyss@1.44.2\":{\"fullPluginName\":\"vscode.theme-abyss@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-kimbie-dark@1.44.2\":{\"fullPluginName\":\"vscode.theme-kimbie-dark@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-monokai@1.44.2\":{\"fullPluginName\":\"vscode.theme-monokai@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-monokai-dimmed@1.44.2\":{\"fullPluginName\":\"vscode.theme-monokai-dimmed@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-quietlight@1.44.2\":{\"fullPluginName\":\"vscode.theme-quietlight@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-red@1.44.2\":{\"fullPluginName\":\"vscode.theme-red@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-solarized-dark@1.44.2\":{\"fullPluginName\":\"vscode.theme-solarized-dark@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-solarized-light@1.44.2\":{\"fullPluginName\":\"vscode.theme-solarized-light@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-tomorrow-night-blue@1.44.2\":{\"fullPluginName\":\"vscode.theme-tomorrow-night-blue@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.vscode-theme-seti@1.44.2\":{\"fullPluginName\":\"vscode.vscode-theme-seti@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.merge-conflict@1.44.2\":{\"fullPluginName\":\"vscode.merge-conflict@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-vscode.references-view@0.0.47\":{\"fullPluginName\":\"ms-vscode.references-view@0.0.47\",\"url\":\"local\",\"kind\":\"builtin\"},\"EditorConfig.EditorConfig@0.15.1\":{\"fullPluginName\":\"editorconfig.editorconfig@0.15.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.docker@1.47.3\":{\"fullPluginName\":\"vscode.docker@1.47.3\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-kubernetes-tools.vscode-kubernetes-tools\":{\"fullPluginName\":\"ms-kubernetes-tools.vscode-kubernetes-tools@1.3.3\",\"url\":\"https://open-vsx.org/api/ms-kubernetes-tools/vscode-kubernetes-tools/1.3.3/file/ms-kubernetes-tools.vscode-kubernetes-tools-1.3.3.vsix\",\"kind\":\"workspace\"},\"hashicorp.terraform\":{\"fullPluginName\":\"hashicorp.terraform@2.11.0\",\"url\":\"https://open-vsx.org/api/hashicorp/terraform/2.11.0/file/hashicorp.terraform-2.11.0.vsix\",\"kind\":\"workspace\"},\"zxh404.vscode-proto3\":{\"fullPluginName\":\"zxh404.vscode-proto3@0.5.4\",\"url\":\"https://open-vsx.org/api/zxh404/vscode-proto3/0.5.4/file/zxh404.vscode-proto3-0.5.4.vsix\",\"kind\":\"workspace\"},\"bajdzis.vscode-database\":{\"fullPluginName\":\"bajdzis.vscode-database@2.2.3\",\"url\":\"https://open-vsx.org/api/bajdzis/vscode-database/2.2.3/file/bajdzis.vscode-database-2.2.3.vsix\",\"kind\":\"workspace\"},\"stkb.rewrap\":{\"fullPluginName\":\"stkb.rewrap@1.14.0\",\"url\":\"https://open-vsx.org/api/stkb/rewrap/1.14.0/file/stkb.rewrap-1.14.0.vsix\",\"kind\":\"workspace\"},\"golang.go\":{\"fullPluginName\":\"golang.go@0.25.0\",\"url\":\"https://open-vsx.org/api/golang/Go/0.25.0/file/golang.Go-0.25.0.vsix\",\"kind\":\"workspace\"}}"},{"name":"GITPOD_EXTERNAL_EXTENSIONS","value":"[]"},{"name":"GITPOD_INTERVAL","value":"30000"},{"name":"GITPOD_MEMORY","value":"2415"},{"name":"GITPOD_HEADLESS","value":"true"}],"resources":{"limits":{"cpu":"5","memory":"12Gi"},"requests":{"cpu":"1m","ephemeral-storage":"5Gi","memory":"4608Mi"}},"volumeMounts":[{"name":"vol-this-workspace","mountPath":"/workspace","mountPropagation":"HostToContainer"},{"name":"daemon-mount","mountPath":"/.workspace","mountPropagation":"HostToContainer"}],"readinessProbe":{"httpGet":{"path":"/_supervisor/v1/status/content/wait/true","port":22999,"scheme":"HTTP"},"timeoutSeconds":1,"periodSeconds":1,"successThreshold":1,"failureThreshold":600},"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"FallbackToLogsOnError","imagePullPolicy":"Always","securityContext":{"capabilities":{"add":["AUDIT_WRITE","FSETID","KILL","NET_BIND_SERVICE","SYS_PTRACE"],"drop":["SETPCAP","CHOWN","NET_RAW","DAC_OVERRIDE","FOWNER","SYS_CHROOT","SETFCAP","SETUID","SETGID"]},"privileged":false,"runAsUser":33333,"runAsGroup":33333,"runAsNonRoot":true,"readOnlyRootFilesystem":false,"allowPrivilegeEscalation":true}}],"restartPolicy":"Never","terminationGracePeriodSeconds":30,"dnsPolicy":"None","serviceAccountName":"workspace","serviceAccount":"workspace","automountServiceAccountToken":false,"nodeName":"gke-dev-workload-1-49d27f81-pd35","securityContext":{"supplementalGroups":[1],"fsGroup":1},"imagePullSecrets":[{"name":"gcp-sa-registry-auth"}],"affinity":{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"gitpod.io/workload_workspace","operator":"Exists"}]}]}}},"schedulerName":"workspace-scheduler","tolerations":[{"key":"node.kubernetes.io/disk-pressure","operator":"Exists","effect":"NoExecute"},{"key":"node.kubernetes.io/memory-pressure","operator":"Exists","effect":"NoExecute"},{"key":"node.kubernetes.io/network-unavailable","operator":"Exists","effect":"NoExecute","tolerationSeconds":30},{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0,"dnsConfig":{"nameservers":["1.1.1.1","8.8.8.8"]},"enableServiceLinks":false},"status":{"phase":"Pending","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2021-05-28T12:48:19Z"},{"type":"Ready","status":"False","lastProbeTime":null,"lastTransitionTime":"2021-05-28T12:48:19Z","reason":"ContainersNotReady","message":"containers with unready status: [workspace]"},{"type":"ContainersReady","status":"False","lastProbeTime":null,"lastTransitionTime":"2021-05-28T12:48:19Z","reason":"ContainersNotReady","message":"containers with unready status: [workspace]"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2021-05-28T12:48:19Z"}],"hostIP":"10.132.15.221","startTime":"2021-05-28T12:48:19Z","containerStatuses":[{"name":"workspace","state":{"waiting":{"reason":"ContainerCreating"}},"lastState":{},"ready":false,"restartCount":0,"image":"reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30222/remote/8e0bbcdf-a926-4670-8c40-b718f035b2ae","imageID":"","started":false}],"qosClass":"Burstable"}},"theiaService":{"kind":"Service","apiVersion":"v1","metadata":{"name":"ws-green-wombat-62dzneud-theia","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/services/ws-green-wombat-62dzneud-theia","uid":"67227f06-91de-44d4-83fe-0911cc6e3601","resourceVersion":"198743318","creationTimestamp":"2021-05-28T12:48:19Z","labels":{"app":"gitpod","component":"workspace","gpwsman":"true","headless":"true","metaID":"green-wombat-62dzneud","owner":"d98c5b92-2066-4fce-bea6-1e08b58642ab","workspaceID":"8e0bbcdf-a926-4670-8c40-b718f035b2ae","workspaceType":"prebuild"}},"spec":{"ports":[{"name":"ide","protocol":"TCP","port":23000,"targetPort":23000},{"name":"supervisor","protocol":"TCP","port":22999,"targetPort":22999}],"selector":{"app":"gitpod","component":"workspace","gpwsman":"true","headless":"true","metaID":"green-wombat-62dzneud","owner":"d98c5b92-2066-4fce-bea6-1e08b58642ab","workspaceID":"8e0bbcdf-a926-4670-8c40-b718f035b2ae","workspaceType":"prebuild"},"clusterIP":"10.63.250.40","type":"ClusterIP","sessionAffinity":"None"},"status":{"loadBalancer":{}}},"portsService":{"kind":"Service","apiVersion":"v1","metadata":{"name":"ws-green-wombat-62dzneud-ports","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/services/ws-green-wombat-62dzneud-ports","uid":"1ebcfc6e-15c3-415e-9de5-6c7adc47d1a7","resourceVersion":"198743322","creationTimestamp":"2021-05-28T12:48:19Z","labels":{"gpwsman":"true","metaID":"green-wombat-62dzneud","serviceType":"ports","workspaceID":"8e0bbcdf-a926-4670-8c40-b718f035b2ae"},"annotations":{"gitpod/port-url-13001":"https://13001-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-1337":"https://1337-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-13444":"https://13444-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-3000":"https://3000-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-3001":"https://3001-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-3306":"https://3306-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-4000":"https://4000-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-5900":"https://5900-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-6080":"https://6080-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-7777":"https://7777-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-9229":"https://9229-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-9999":"https://9999-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com"}},"spec":{"ports":[{"name":"p1337-public","protocol":"TCP","port":1337,"targetPort":1337},{"name":"p3000-public","protocol":"TCP","port":3000,"targetPort":3000},{"name":"p3001-public","protocol":"TCP","port":3001,"targetPort":3001},{"name":"p3306-public","protocol":"TCP","port":3306,"targetPort":3306},{"name":"p4000-public","protocol":"TCP","port":4000,"targetPort":4000},{"name":"p5900-public","protocol":"TCP","port":5900,"targetPort":5900},{"name":"p6080-private","protocol":"TCP","port":6080,"targetPort":6080},{"name":"p9229-public","protocol":"TCP","port":9229,"targetPort":9229},{"name":"p9999-public","protocol":"TCP","port":9999,"targetPort":9999},{"name":"p13001-public","protocol":"TCP","port":13001,"targetPort":13001},{"name":"p7777-public","protocol":"TCP","port":7777,"targetPort":7777},{"name":"p13444-public","protocol":"TCP","port":13444,"targetPort":13444}],"selector":{"gpwsman":"true","workspaceID":"8e0bbcdf-a926-4670-8c40-b718f035b2ae"},"clusterIP":"10.63.243.155","type":"ClusterIP","sessionAffinity":"None"},"status":{"loadBalancer":{}}},"events":[{"metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae - scheduled2zrpp","generateName":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae - scheduled","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae%20-%20scheduled2zrpp","uid":"e983c42a-b04a-48b6-b214-4fe60281b6ae","resourceVersion":"12819729","creationTimestamp":"2021-05-28T12:48:19Z"},"involvedObject":{"kind":"Pod","namespace":"staging-gpl-headless-log-wsman","name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e"},"reason":"Scheduled","message":"Placed pod [staging-gpl-headless-log-wsman/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae] on gke-dev-workload-1-49d27f81-pd35\n","source":{"component":"workspace-scheduler"},"firstTimestamp":"2021-05-28T12:48:19Z","lastTimestamp":"2021-05-28T12:48:19Z","count":1,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""}]} \ No newline at end of file diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_RUNNING01.golden b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_RUNNING01.golden deleted file mode 100644 index 05c3c44455b3f9..00000000000000 --- a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_RUNNING01.golden +++ /dev/null @@ -1,29 +0,0 @@ -{ - "status": { - "id": "64f47106-40bb-4dd3-a33e-ccb9d7a09052", - "metadata": { - "owner": "c558ce76-6cf3-4548-a9fe-97375d75c1ef", - "meta_id": "c8b465cb-8039-4c5f-a9c6-2496d9589414", - "started_at": { - "seconds": 1557902226 - } - }, - "spec": { - "workspace_image": "eu.gcr.io/gitpod-dev/workspace-images/86986a733691178abdcfb50447c82ba5958ba341/eu.gcr.io/gitpod-dev/workspace-full:sha256-9c0892d1901210f3999c9bd64e371038bfc0505f04858e959e1bb3778dcf19c1", - "headless": true, - "url": "http://c8b465cb-8039-4c5f-a9c6-2496d9589414.ws-eu.cw-integrate-wsman-server.staging.gitpod.io", - "type": 1 - }, - "phase": 4, - "conditions": { - "snapshot": "workspaces/64f47106-40bb-4dd3-a33e-ccb9d7a09052/dd8fca84-76db-11e9-b431-1a98a86a11e4.tar@gitpod-dev-user-c558ce76-6cf3-4548-a9fe-97375d75c1ef", - "deployed": 1 - }, - "runtime": { - "node_name": "gke-gitpod-dev-worker-pool-2-184c607e-845g", - "pod_name": "ws-64f47106-40bb-4dd3-a33e-ccb9d7a09052", - "node_ip": "10.132.0.18" - }, - "auth": {} - } -} \ No newline at end of file diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_RUNNING01.json b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_RUNNING01.json deleted file mode 100644 index 04f7cd8a9e89f0..00000000000000 --- a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_RUNNING01.json +++ /dev/null @@ -1,259 +0,0 @@ -{ - "pod": { - "metadata": { - "name": "ws-64f47106-40bb-4dd3-a33e-ccb9d7a09052", - "namespace": "staging-cw-integrate-wsman-server", - "selfLink": "/api/v1/namespaces/staging-cw-integrate-wsman-server/pods/ws-64f47106-40bb-4dd3-a33e-ccb9d7a09052", - "uid": "dba34509-76db-11e9-8a1b-42010a840224", - "resourceVersion": "99677944", - "creationTimestamp": "2019-05-15T06:37:06Z", - "labels": { - "gpwsman": "true", - "headless": "true", - "metaID": "c8b465cb-8039-4c5f-a9c6-2496d9589414", - "owner": "c558ce76-6cf3-4548-a9fe-97375d75c1ef", - "workspaceID": "64f47106-40bb-4dd3-a33e-ccb9d7a09052", - "workspaceType": "prebuild" - }, - "annotations": { - "cni.projectcalico.org/podIP": "10.0.205.57/32", - "gitpod/id": "64f47106-40bb-4dd3-a33e-ccb9d7a09052", - "gitpod/servicePrefix": "c8b465cb-8039-4c5f-a9c6-2496d9589414", - "gitpod/snapshot": "workspaces/64f47106-40bb-4dd3-a33e-ccb9d7a09052/dd8fca84-76db-11e9-b431-1a98a86a11e4.tar@gitpod-dev-user-c558ce76-6cf3-4548-a9fe-97375d75c1ef", - "gitpod/url": "http://c8b465cb-8039-4c5f-a9c6-2496d9589414.ws-eu.cw-integrate-wsman-server.staging.gitpod.io", - "gitpod/never-ready": "true", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "23000", - "prometheus.io/scrape": "true" - } - }, - "spec": { - "volumes": [ - { - "name": "vol-this-workspace", - "hostPath": { - "path": "/mnt/disks/ssd0/workspaces/64f47106-40bb-4dd3-a33e-ccb9d7a09052", - "type": "DirectoryOrCreate" - } - }, - { - "name": "vol-this-theia", - "hostPath": { - "path": "/mnt/disks/ssd0/theia/theia-xyz", - "type": "Directory" - } - }, - { - "name": "vol-sync-tmp", - "hostPath": { - "path": "/mnt/disks/ssd0/workspaces/sync-tmp", - "type": "DirectoryOrCreate" - } - }, - { - "name": "default-token-bknqv", - "secret": { - "secretName": "default-token-bknqv", - "defaultMode": 420 - } - } - ], - "containers": [ - { - "name": "workspace", - "image": "eu.gcr.io/gitpod-dev/workspace-images/86986a733691178abdcfb50447c82ba5958ba341/eu.gcr.io/gitpod-dev/workspace-full:sha256-9c0892d1901210f3999c9bd64e371038bfc0505f04858e959e1bb3778dcf19c1", - "ports": [ - { - "containerPort": 23000, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "THEIA_WORKSPACE_ROOT", - "value": "/workspace" - }, - { - "name": "GITPOD_THEIA_PORT", - "value": "23000" - }, - { - "name": "GITPOD_HOST", - "value": "http://cw-integrate-wsman-server.staging.gitpod.io" - }, - { - "name": "GITPOD_INTERVAL", - "value": "30" - }, - { - "name": "GITPOD_HEADLESS", - "value": "true" - }, - { - "name": "GITPOD_WSSYNC_APITOKEN", - "value": "2346d8e1-0145-41d4-ab1d-34b740306e0b" - }, - { - "name": "GITPOD_WSSYNC_APIPORT", - "value": "44444" - }, - { - "name": "GITPOD_LOGIN_PUBLIC_KEY", - "value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDAhxeFQRCdDNegKsXODNY3mewqkBIo3yv0Lg+MUxWQ3jcgGpQz+r5uIAUxXTxTCm7GY/wT9mIo1ZTtWvxiPhYGRB7d1RlwdotmZmgypWxyQWXt5fbfl9MGvGq8/DEVPTygc9sGP69fz7rAkpNKrAfgDSEV7pVknZdW7ZnxyXObCQ==\n" - }, - { - "name": "GITPOD_REPO_ROOT", - "value": "/workspace/bel" - }, - { - "name": "GITPOD_CLI_APITOKEN", - "value": "685a86de-a98d-440f-a4ab-54464577082d" - }, - { - "name": "GITPOD_WORKSPACE_ID", - "value": "c8b465cb-8039-4c5f-a9c6-2496d9589414" - }, - { - "name": "GITPOD_GIT_USER_NAME", - "value": "Christian Weichel" - }, - { - "name": "GITPOD_GIT_USER_EMAIL", - "value": "some@user.com" - } - ], - "resources": { - "limits": { - "cpu": "7", - "memory": "3246Mi" - }, - "requests": { - "cpu": "1m", - "memory": "3246Mi" - } - }, - "volumeMounts": [ - { - "name": "vol-this-workspace", - "mountPath": "/workspace" - }, - { - "name": "vol-this-theia", - "mountPath": "/theia" - }, - { - "name": "default-token-bknqv", - "readOnly": true, - "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" - } - ], - "livenessProbe": { - "httpGet": { - "path": "/", - "port": 23000, - "scheme": "HTTP" - }, - "timeoutSeconds": 1, - "periodSeconds": 30, - "successThreshold": 1, - "failureThreshold": 3 - }, - "readinessProbe": { - "httpGet": { - "path": "/", - "port": 23000, - "scheme": "HTTP" - }, - "timeoutSeconds": 1, - "periodSeconds": 1, - "successThreshold": 1, - "failureThreshold": 3 - }, - "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "File", - "imagePullPolicy": "IfNotPresent" - } - ], - "restartPolicy": "Always", - "terminationGracePeriodSeconds": 30, - "dnsPolicy": "ClusterFirst", - "serviceAccountName": "default", - "serviceAccount": "default", - "nodeName": "gke-gitpod-dev-worker-pool-2-184c607e-845g", - "securityContext": {}, - "schedulerName": "default-scheduler", - "tolerations": [ - { - "key": "node.kubernetes.io/not-ready", - "operator": "Exists", - "effect": "NoExecute", - "tolerationSeconds": 300 - }, - { - "key": "node.kubernetes.io/unreachable", - "operator": "Exists", - "effect": "NoExecute", - "tolerationSeconds": 300 - } - ], - "priority": 0 - }, - "status": { - "phase": "Running", - "conditions": [ - { - "type": "Initialized", - "status": "True", - "lastProbeTime": null, - "lastTransitionTime": "2019-05-15T06:37:06Z" - }, - { - "type": "Ready", - "status": "True", - "lastProbeTime": null, - "lastTransitionTime": "2019-05-15T06:37:10Z" - }, - { - "type": "PodScheduled", - "status": "True", - "lastProbeTime": null, - "lastTransitionTime": "2019-05-15T06:37:06Z" - } - ], - "hostIP": "10.132.0.18", - "podIP": "10.0.205.57", - "startTime": "2019-05-15T06:37:06Z", - "containerStatuses": [ - { - "name": "sync", - "state": { - "running": { - "startedAt": "2019-05-15T06:37:08Z" - } - }, - "lastState": {}, - "ready": true, - "restartCount": 0, - "image": "eu.gcr.io/gitpod-dev/gitpod-ws-daemon:cw-integrate-wsman-server.45", - "imageID": "docker-pullable://eu.gcr.io/gitpod-dev/gitpod-ws-daemon@sha256:cc21efdbebcf0d800e9d1f2a9346d346ca2757a79bc255a4098f8544efb8aaa3", - "containerID": "docker://5208401cb3cb46103dcab5d8c9858d54edebb2c37810f827de27185fe3628f4e" - }, - { - "name": "workspace", - "state": { - "running": { - "startedAt": "2019-05-15T06:37:08Z" - } - }, - "lastState": {}, - "ready": true, - "restartCount": 0, - "image": "eu.gcr.io/gitpod-dev/workspace-images/86986a733691178abdcfb50447c82ba5958ba341/eu.gcr.io/gitpod-dev/workspace-full:sha256-9c0892d1901210f3999c9bd64e371038bfc0505f04858e959e1bb3778dcf19c1", - "imageID": "docker-pullable://eu.gcr.io/gitpod-dev/workspace-images/86986a733691178abdcfb50447c82ba5958ba341/eu.gcr.io/gitpod-dev/workspace-full@sha256:713ea577fd314b0f474a27ba1f2d8032638a180f6f0b97955dbcd36f753fa0bf", - "containerID": "docker://e0cd3f805f005570a8955316261e6404ce3192888efe6c3a52b5e46d97638944" - } - ], - "qosClass": "Burstable" - } - } -} \ No newline at end of file diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPED00.golden b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPED00.golden new file mode 100644 index 00000000000000..c5094ca50b589d --- /dev/null +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPED00.golden @@ -0,0 +1,95 @@ +{ + "status": { + "id": "8e0bbcdf-a926-4670-8c40-b718f035b2ae", + "metadata": { + "owner": "d98c5b92-2066-4fce-bea6-1e08b58642ab", + "meta_id": "green-wombat-62dzneud", + "started_at": { + "seconds": 1622206099 + } + }, + "spec": { + "workspace_image": "eu.gcr.io/gitpod-core-dev/registry/workspace-images:81c4fb602a540d261f210cfc8ba0435b63b24238c1762ec029d8edaec816afb6", + "ide_image": "eu.gcr.io/gitpod-core-dev/build/ide/code:gpl-headless-log-wsman.17", + "headless": true, + "url": "https://green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "exposed_ports": [ + { + "port": 1337, + "visibility": 1, + "url": "https://1337-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 3000, + "visibility": 1, + "url": "https://3000-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 3001, + "visibility": 1, + "url": "https://3001-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 3306, + "visibility": 1, + "url": "https://3306-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 4000, + "visibility": 1, + "url": "https://4000-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 5900, + "visibility": 1, + "url": "https://5900-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 6080, + "url": "https://6080-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 9229, + "visibility": 1, + "url": "https://9229-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 9999, + "visibility": 1, + "url": "https://9999-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 13001, + "visibility": 1, + "url": "https://13001-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 7777, + "visibility": 1, + "url": "https://7777-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 13444, + "visibility": 1, + "url": "https://13444-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + } + ], + "type": 1 + }, + "phase": 6, + "conditions": { + "service_exists": 1, + "snapshot": "workspaces/green-wombat-62dzneud/snapshot-1622206186881521445.tar@gitpod-user-d98c5b92-2066-4fce-bea6-1e08b58642ab", + "final_backup_complete": 1, + "deployed": 1 + }, + "runtime": { + "node_name": "gke-dev-workload-1-49d27f81-pd35", + "pod_name": "prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae", + "node_ip": "10.132.15.221" + }, + "auth": { + "owner_token": "FZ2k9zbSCo9e85Y21yh.SHLJbya7pW2Y" + } + } +} \ No newline at end of file diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPED00.json b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPED00.json new file mode 100644 index 00000000000000..af127fd21bc7dc --- /dev/null +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPED00.json @@ -0,0 +1 @@ +{"pod":{"kind":"Pod","apiVersion":"v1","metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/pods/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e","resourceVersion":"198744218","creationTimestamp":"2021-05-28T12:48:19Z","deletionTimestamp":"2021-05-28T12:49:46Z","deletionGracePeriodSeconds":0,"labels":{"app":"gitpod","component":"workspace","gitpod.io/networkpolicy":"default","gpwsman":"true","headless":"true","metaID":"green-wombat-62dzneud","owner":"d98c5b92-2066-4fce-bea6-1e08b58642ab","workspaceID":"8e0bbcdf-a926-4670-8c40-b718f035b2ae","workspaceType":"prebuild"},"annotations":{"cni.projectcalico.org/podIP":"10.60.61.170/32","container.apparmor.security.beta.kubernetes.io/workspace":"unconfined","gitpod.io/disposalStatus":"{\"backupComplete\":true}","gitpod.io/requiredNodeServices":"ws-daemon,registry-facade","gitpod/admission":"admit_owner_only","gitpod/contentInitializer":"[redacted]","gitpod/id":"8e0bbcdf-a926-4670-8c40-b718f035b2ae","gitpod/imageSpec":"CnRldS5nY3IuaW8vZ2l0cG9kLWNvcmUtZGV2L3JlZ2lzdHJ5L3dvcmtzcGFjZS1pbWFnZXM6ODFjNGZiNjAyYTU0MGQyNjFmMjEwY2ZjOGJhMDQzNWI2M2IyNDIzOGMxNzYyZWMwMjlkOGVkYWVjODE2YWZiNhJCZXUuZ2NyLmlvL2dpdHBvZC1jb3JlLWRldi9idWlsZC9pZGUvY29kZTpncGwtaGVhZGxlc3MtbG9nLXdzbWFuLjE3","gitpod/ownerToken":"FZ2k9zbSCo9e85Y21yh.SHLJbya7pW2Y","gitpod/servicePrefix":"green-wombat-62dzneud","gitpod/snapshot":"workspaces/green-wombat-62dzneud/snapshot-1622206186881521445.tar@gitpod-user-d98c5b92-2066-4fce-bea6-1e08b58642ab","gitpod/url":"https://green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","kubernetes.io/psp":"staging-gpl-headless-log-wsman-ns-workspace","prometheus.io/path":"/metrics","prometheus.io/port":"23000","prometheus.io/scrape":"true","seccomp.security.alpha.kubernetes.io/pod":"localhost/workspace_default_gpl-headless-log-wsman.17.json"},"finalizers":["gitpod.io/finalizer","foregroundDeletion"]},"spec":{"volumes":[{"name":"vol-this-workspace","hostPath":{"path":"/mnt/disks/ssd0/workspaces/8e0bbcdf-a926-4670-8c40-b718f035b2ae","type":"DirectoryOrCreate"}},{"name":"daemon-mount","hostPath":{"path":"/mnt/disks/ssd0/workspaces/8e0bbcdf-a926-4670-8c40-b718f035b2ae-daemon","type":"DirectoryOrCreate"}}],"containers":[{"name":"workspace","image":"reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30222/remote/8e0bbcdf-a926-4670-8c40-b718f035b2ae","command":["/.supervisor/workspacekit","ring0"],"ports":[{"containerPort":23000,"protocol":"TCP"}],"env":[{"name":"GITPOD_REPO_ROOT","value":"/workspace/gitpod"},{"name":"GITPOD_CLI_APITOKEN","value":"eGnGrk5s7-.KCc15tXUtyKlzwlbjOBIs"},{"name":"GITPOD_WORKSPACE_ID","value":"green-wombat-62dzneud"},{"name":"GITPOD_INSTANCE_ID","value":"8e0bbcdf-a926-4670-8c40-b718f035b2ae"},{"name":"GITPOD_THEIA_PORT","value":"23000"},{"name":"THEIA_WORKSPACE_ROOT","value":"/workspace/gitpod/gitpod-ws.code-workspace"},{"name":"GITPOD_HOST","value":"https://gpl-headless-log-wsman.staging.gitpod-dev.com"},{"name":"GITPOD_WORKSPACE_URL","value":"https://green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com"},{"name":"THEIA_SUPERVISOR_TOKEN","value":"354c0b368f2b4a93b7b812564e663d23"},{"name":"THEIA_SUPERVISOR_ENDPOINT","value":":22999"},{"name":"THEIA_WEBVIEW_EXTERNAL_ENDPOINT","value":"webview-{{hostname}}"},{"name":"THEIA_MINI_BROWSER_HOST_PATTERN","value":"browser-{{hostname}}"},{"name":"GITPOD_GIT_USER_NAME","value":"Gero Posmyk-Leinemann"},{"name":"GITPOD_GIT_USER_EMAIL","value":"gero@gitpod.io"},{"name":"PREBUILD_PARAMS","value":"[redacted]"},{"name":"GITPOD_WORKSPACE_CONTEXT_URL","value":"prebuild/https://github.com/gitpod-io/gitpod/tree/gpl/test-prebuild"},{"name":"GITPOD_WORKSPACE_CONTEXT","value":"{\"ref\":\"gpl/test-prebuild\",\"refType\":\"branch\",\"isFile\":false,\"path\":\"\",\"title\":\"gitpod-io/gitpod - gpl/test-prebuild\",\"revision\":\"a1afe2bb7d454ea7a4194f363601a31ae319ce9c\",\"repository\":{\"cloneUrl\":\"https://github.com/gitpod-io/gitpod.git\",\"host\":\"github.com\",\"name\":\"gitpod\",\"owner\":\"gitpod-io\",\"private\":false}}"},{"name":"GITPOD_TASKS","value":"[{\"name\":\"Test Command\",\"init\":\"export PREBUILD_PARAMS=${PREBUILD_PARAMS:-\\\"100_500ms_30m\\\"}; go run ./main.go $PREBUILD_PARAMS\"}]"},{"name":"THEIA_SUPERVISOR_TOKENS","value":"[{\"tokenOTS\":\"https://gpl-headless-log-wsman.staging.gitpod-dev.com/api/ots/get/71ca5ce2-b15e-4a0e-8a0f-65964c509d40\",\"token\":\"ots\",\"kind\":\"gitpod\",\"host\":\"gpl-headless-log-wsman.staging.gitpod-dev.com\",\"scope\":[\"function:getWorkspace\",\"function:getLoggedInUser\",\"function:getPortAuthenticationToken\",\"function:getWorkspaceOwner\",\"function:getWorkspaceUsers\",\"function:isWorkspaceOwner\",\"function:controlAdmission\",\"function:setWorkspaceTimeout\",\"function:getWorkspaceTimeout\",\"function:sendHeartBeat\",\"function:getOpenPorts\",\"function:openPort\",\"function:closePort\",\"function:getLayout\",\"function:generateNewGitpodToken\",\"function:takeSnapshot\",\"function:storeLayout\",\"function:stopWorkspace\",\"function:getToken\",\"function:getContentBlobUploadUrl\",\"function:getContentBlobDownloadUrl\",\"function:accessCodeSyncStorage\",\"function:guessGitTokenScopes\",\"function:getEnvVars\",\"function:setEnvVar\",\"function:deleteEnvVar\",\"resource:workspace::green-wombat-62dzneud::get/update\",\"resource:workspaceInstance::8e0bbcdf-a926-4670-8c40-b718f035b2ae::get/update/delete\",\"resource:snapshot::ws-green-wombat-62dzneud::create\",\"resource:gitpodToken::*::create\",\"resource:userStorage::*::create/get/update\",\"resource:token::*::get\",\"resource:contentBlob::*::create/get\",\"resource:envVar::gitpod-io/gitpod::create/get/update/delete\"],\"expiryDate\":\"2021-05-29T12:48:19.234Z\",\"reuse\":2}]"},{"name":"GITPOD_RESOLVED_EXTENSIONS","value":"{\"vscode.bat@1.44.2\":{\"fullPluginName\":\"vscode.bat@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.clojure@1.44.2\":{\"fullPluginName\":\"vscode.clojure@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.coffeescript@1.44.2\":{\"fullPluginName\":\"vscode.coffeescript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.cpp@1.44.2\":{\"fullPluginName\":\"vscode.cpp@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.csharp@1.44.2\":{\"fullPluginName\":\"vscode.csharp@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"llvm-vs-code-extensions.vscode-clangd@0.1.5\":{\"fullPluginName\":\"llvm-vs-code-extensions.vscode-clangd@0.1.5\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.css@1.51.1\":{\"fullPluginName\":\"vscode.css@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.css-language-features@1.51.1\":{\"fullPluginName\":\"vscode.css-language-features@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.debug-auto-launch@1.44.2\":{\"fullPluginName\":\"vscode.debug-auto-launch@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.emmet@1.44.2\":{\"fullPluginName\":\"vscode.emmet@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.fsharp@1.44.2\":{\"fullPluginName\":\"vscode.fsharp@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.go@1.44.2\":{\"fullPluginName\":\"vscode.go@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.groovy@1.44.2\":{\"fullPluginName\":\"vscode.groovy@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.handlebars@1.44.2\":{\"fullPluginName\":\"vscode.handlebars@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.hlsl@1.44.2\":{\"fullPluginName\":\"vscode.hlsl@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.html@1.51.1\":{\"fullPluginName\":\"vscode.html@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.html-language-features@1.51.1\":{\"fullPluginName\":\"vscode.html-language-features@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.ini@1.44.2\":{\"fullPluginName\":\"vscode.ini@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.java@1.53.2\":{\"fullPluginName\":\"vscode.java@1.53.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.javascript@1.44.2\":{\"fullPluginName\":\"vscode.javascript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.json@1.44.2\":{\"fullPluginName\":\"vscode.json@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.json-language-features@1.46.1\":{\"fullPluginName\":\"vscode.json-language-features@1.46.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.less@1.44.2\":{\"fullPluginName\":\"vscode.less@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.log@1.44.2\":{\"fullPluginName\":\"vscode.log@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.lua@1.44.2\":{\"fullPluginName\":\"vscode.lua@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.make@1.44.2\":{\"fullPluginName\":\"vscode.make@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.markdown@1.44.2\":{\"fullPluginName\":\"vscode.markdown@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.npm@1.39.1\":{\"fullPluginName\":\"vscode.npm@1.39.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.objective-c@1.44.2\":{\"fullPluginName\":\"vscode.objective-c@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.perl@1.44.2\":{\"fullPluginName\":\"vscode.perl@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.php@1.44.2\":{\"fullPluginName\":\"vscode.php@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.powershell@1.44.2\":{\"fullPluginName\":\"vscode.powershell@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.pug@1.44.2\":{\"fullPluginName\":\"vscode.pug@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.python@1.47.3\":{\"fullPluginName\":\"vscode.python@1.47.3\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.r@1.44.2\":{\"fullPluginName\":\"vscode.r@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.razor@1.44.2\":{\"fullPluginName\":\"vscode.razor@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.ruby@1.44.2\":{\"fullPluginName\":\"vscode.ruby@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.rust@1.44.2\":{\"fullPluginName\":\"vscode.rust@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.scss@1.44.2\":{\"fullPluginName\":\"vscode.scss@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.shaderlab@1.44.2\":{\"fullPluginName\":\"vscode.shaderlab@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.shellscript@1.44.2\":{\"fullPluginName\":\"vscode.shellscript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.sql@1.44.2\":{\"fullPluginName\":\"vscode.sql@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.swift@1.44.2\":{\"fullPluginName\":\"vscode.swift@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.typescript@1.44.2\":{\"fullPluginName\":\"vscode.typescript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.typescript-language-features@1.44.2\":{\"fullPluginName\":\"vscode.typescript-language-features@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.vb@1.44.2\":{\"fullPluginName\":\"vscode.vb@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.xml@1.44.2\":{\"fullPluginName\":\"vscode.xml@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.yaml@1.44.2\":{\"fullPluginName\":\"vscode.yaml@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"redhat.java@0.75.0\":{\"fullPluginName\":\"redhat.java@0.75.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscjava.vscode-java-debug@0.27.1\":{\"fullPluginName\":\"vscjava.vscode-java-debug@0.27.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscjava.vscode-java-dependency@0.18.0\":{\"fullPluginName\":\"vscjava.vscode-java-dependency@0.18.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-vscode.node-debug@1.38.4\":{\"fullPluginName\":\"ms-vscode.node-debug@1.38.4\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-vscode.node-debug2@1.33.0\":{\"fullPluginName\":\"ms-vscode.node-debug2@1.33.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-python.python@2020.7.96456\":{\"fullPluginName\":\"ms-python.python@2020.7.96456\",\"url\":\"local\",\"kind\":\"builtin\"},\"redhat.vscode-xml@0.11.0\":{\"fullPluginName\":\"redhat.vscode-xml@0.11.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"redhat.vscode-yaml@0.8.0\":{\"fullPluginName\":\"redhat.vscode-yaml@0.8.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"bmewburn.vscode-intelephense-client@1.4.0\":{\"fullPluginName\":\"bmewburn.vscode-intelephense-client@1.4.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"felixfbecker.php-debug@1.13.0\":{\"fullPluginName\":\"felixfbecker.php-debug@1.13.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"rust-lang.rust@0.7.8\":{\"fullPluginName\":\"rust-lang.rust@0.7.8\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-abyss@1.44.2\":{\"fullPluginName\":\"vscode.theme-abyss@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-kimbie-dark@1.44.2\":{\"fullPluginName\":\"vscode.theme-kimbie-dark@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-monokai@1.44.2\":{\"fullPluginName\":\"vscode.theme-monokai@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-monokai-dimmed@1.44.2\":{\"fullPluginName\":\"vscode.theme-monokai-dimmed@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-quietlight@1.44.2\":{\"fullPluginName\":\"vscode.theme-quietlight@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-red@1.44.2\":{\"fullPluginName\":\"vscode.theme-red@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-solarized-dark@1.44.2\":{\"fullPluginName\":\"vscode.theme-solarized-dark@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-solarized-light@1.44.2\":{\"fullPluginName\":\"vscode.theme-solarized-light@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-tomorrow-night-blue@1.44.2\":{\"fullPluginName\":\"vscode.theme-tomorrow-night-blue@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.vscode-theme-seti@1.44.2\":{\"fullPluginName\":\"vscode.vscode-theme-seti@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.merge-conflict@1.44.2\":{\"fullPluginName\":\"vscode.merge-conflict@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-vscode.references-view@0.0.47\":{\"fullPluginName\":\"ms-vscode.references-view@0.0.47\",\"url\":\"local\",\"kind\":\"builtin\"},\"EditorConfig.EditorConfig@0.15.1\":{\"fullPluginName\":\"editorconfig.editorconfig@0.15.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.docker@1.47.3\":{\"fullPluginName\":\"vscode.docker@1.47.3\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-kubernetes-tools.vscode-kubernetes-tools\":{\"fullPluginName\":\"ms-kubernetes-tools.vscode-kubernetes-tools@1.3.3\",\"url\":\"https://open-vsx.org/api/ms-kubernetes-tools/vscode-kubernetes-tools/1.3.3/file/ms-kubernetes-tools.vscode-kubernetes-tools-1.3.3.vsix\",\"kind\":\"workspace\"},\"hashicorp.terraform\":{\"fullPluginName\":\"hashicorp.terraform@2.11.0\",\"url\":\"https://open-vsx.org/api/hashicorp/terraform/2.11.0/file/hashicorp.terraform-2.11.0.vsix\",\"kind\":\"workspace\"},\"zxh404.vscode-proto3\":{\"fullPluginName\":\"zxh404.vscode-proto3@0.5.4\",\"url\":\"https://open-vsx.org/api/zxh404/vscode-proto3/0.5.4/file/zxh404.vscode-proto3-0.5.4.vsix\",\"kind\":\"workspace\"},\"bajdzis.vscode-database\":{\"fullPluginName\":\"bajdzis.vscode-database@2.2.3\",\"url\":\"https://open-vsx.org/api/bajdzis/vscode-database/2.2.3/file/bajdzis.vscode-database-2.2.3.vsix\",\"kind\":\"workspace\"},\"stkb.rewrap\":{\"fullPluginName\":\"stkb.rewrap@1.14.0\",\"url\":\"https://open-vsx.org/api/stkb/rewrap/1.14.0/file/stkb.rewrap-1.14.0.vsix\",\"kind\":\"workspace\"},\"golang.go\":{\"fullPluginName\":\"golang.go@0.25.0\",\"url\":\"https://open-vsx.org/api/golang/Go/0.25.0/file/golang.Go-0.25.0.vsix\",\"kind\":\"workspace\"}}"},{"name":"GITPOD_EXTERNAL_EXTENSIONS","value":"[]"},{"name":"GITPOD_INTERVAL","value":"30000"},{"name":"GITPOD_MEMORY","value":"2415"},{"name":"GITPOD_HEADLESS","value":"true"}],"resources":{"limits":{"cpu":"5","memory":"12Gi"},"requests":{"cpu":"1m","ephemeral-storage":"5Gi","memory":"4608Mi"}},"volumeMounts":[{"name":"vol-this-workspace","mountPath":"/workspace","mountPropagation":"HostToContainer"},{"name":"daemon-mount","mountPath":"/.workspace","mountPropagation":"HostToContainer"}],"readinessProbe":{"httpGet":{"path":"/_supervisor/v1/status/content/wait/true","port":22999,"scheme":"HTTP"},"timeoutSeconds":1,"periodSeconds":1,"successThreshold":1,"failureThreshold":600},"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"FallbackToLogsOnError","imagePullPolicy":"Always","securityContext":{"capabilities":{"add":["AUDIT_WRITE","FSETID","KILL","NET_BIND_SERVICE","SYS_PTRACE"],"drop":["SETPCAP","CHOWN","NET_RAW","DAC_OVERRIDE","FOWNER","SYS_CHROOT","SETFCAP","SETUID","SETGID"]},"privileged":false,"runAsUser":33333,"runAsGroup":33333,"runAsNonRoot":true,"readOnlyRootFilesystem":false,"allowPrivilegeEscalation":true}}],"restartPolicy":"Never","terminationGracePeriodSeconds":30,"dnsPolicy":"None","serviceAccountName":"workspace","serviceAccount":"workspace","automountServiceAccountToken":false,"nodeName":"gke-dev-workload-1-49d27f81-pd35","securityContext":{"supplementalGroups":[1],"fsGroup":1},"imagePullSecrets":[{"name":"gcp-sa-registry-auth"}],"affinity":{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"gitpod.io/workload_workspace","operator":"Exists"}]}]}}},"schedulerName":"workspace-scheduler","tolerations":[{"key":"node.kubernetes.io/disk-pressure","operator":"Exists","effect":"NoExecute"},{"key":"node.kubernetes.io/memory-pressure","operator":"Exists","effect":"NoExecute"},{"key":"node.kubernetes.io/network-unavailable","operator":"Exists","effect":"NoExecute","tolerationSeconds":30},{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0,"dnsConfig":{"nameservers":["1.1.1.1","8.8.8.8"]},"enableServiceLinks":false},"status":{"phase":"Succeeded","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2021-05-28T12:48:19Z","reason":"PodCompleted"},{"type":"Ready","status":"False","lastProbeTime":null,"lastTransitionTime":"2021-05-28T12:49:46Z","reason":"PodCompleted"},{"type":"ContainersReady","status":"False","lastProbeTime":null,"lastTransitionTime":"2021-05-28T12:49:46Z","reason":"PodCompleted"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2021-05-28T12:48:19Z"}],"hostIP":"10.132.15.221","podIP":"10.60.61.170","podIPs":[{"ip":"10.60.61.170"}],"startTime":"2021-05-28T12:48:19Z","containerStatuses":[{"name":"workspace","state":{"terminated":{"exitCode":0,"reason":"Completed","startedAt":"2021-05-28T12:48:23Z","finishedAt":"2021-05-28T12:49:45Z","containerID":"containerd://c2fb575264ceeae177f754b0edd4dfbfc2439b2b9bdccab020dfa7fe494408cc"}},"lastState":{},"ready":false,"restartCount":0,"image":"reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30942/remote/01709d83-71a4-47fa-b14d-6482b3650d8c:latest","imageID":"reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30222/remote/8e0bbcdf-a926-4670-8c40-b718f035b2ae@sha256:6987f020499b07d3e3762844b819481fd5e1a0b04fd34ad2a1a17dca0c827599","containerID":"containerd://c2fb575264ceeae177f754b0edd4dfbfc2439b2b9bdccab020dfa7fe494408cc","started":false}],"qosClass":"Burstable"}},"theiaService":{"kind":"Service","apiVersion":"v1","metadata":{"name":"ws-green-wombat-62dzneud-theia","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/services/ws-green-wombat-62dzneud-theia","uid":"67227f06-91de-44d4-83fe-0911cc6e3601","resourceVersion":"198744199","creationTimestamp":"2021-05-28T12:48:19Z","deletionTimestamp":"2021-05-28T12:49:46Z","deletionGracePeriodSeconds":0,"labels":{"app":"gitpod","component":"workspace","gpwsman":"true","headless":"true","metaID":"green-wombat-62dzneud","owner":"d98c5b92-2066-4fce-bea6-1e08b58642ab","workspaceID":"8e0bbcdf-a926-4670-8c40-b718f035b2ae","workspaceType":"prebuild"},"finalizers":["foregroundDeletion"]},"spec":{"ports":[{"name":"ide","protocol":"TCP","port":23000,"targetPort":23000},{"name":"supervisor","protocol":"TCP","port":22999,"targetPort":22999}],"selector":{"app":"gitpod","component":"workspace","gpwsman":"true","headless":"true","metaID":"green-wombat-62dzneud","owner":"d98c5b92-2066-4fce-bea6-1e08b58642ab","workspaceID":"8e0bbcdf-a926-4670-8c40-b718f035b2ae","workspaceType":"prebuild"},"clusterIP":"10.63.250.40","type":"ClusterIP","sessionAffinity":"None"},"status":{"loadBalancer":{}}},"portsService":{"kind":"Service","apiVersion":"v1","metadata":{"name":"ws-green-wombat-62dzneud-ports","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/services/ws-green-wombat-62dzneud-ports","uid":"1ebcfc6e-15c3-415e-9de5-6c7adc47d1a7","resourceVersion":"198744202","creationTimestamp":"2021-05-28T12:48:19Z","deletionTimestamp":"2021-05-28T12:49:46Z","deletionGracePeriodSeconds":0,"labels":{"gpwsman":"true","metaID":"green-wombat-62dzneud","serviceType":"ports","workspaceID":"8e0bbcdf-a926-4670-8c40-b718f035b2ae"},"annotations":{"gitpod/port-url-13001":"https://13001-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-1337":"https://1337-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-13444":"https://13444-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-3000":"https://3000-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-3001":"https://3001-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-3306":"https://3306-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-4000":"https://4000-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-5900":"https://5900-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-6080":"https://6080-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-7777":"https://7777-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-9229":"https://9229-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-9999":"https://9999-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com"},"finalizers":["foregroundDeletion"]},"spec":{"ports":[{"name":"p1337-public","protocol":"TCP","port":1337,"targetPort":1337},{"name":"p3000-public","protocol":"TCP","port":3000,"targetPort":3000},{"name":"p3001-public","protocol":"TCP","port":3001,"targetPort":3001},{"name":"p3306-public","protocol":"TCP","port":3306,"targetPort":3306},{"name":"p4000-public","protocol":"TCP","port":4000,"targetPort":4000},{"name":"p5900-public","protocol":"TCP","port":5900,"targetPort":5900},{"name":"p6080-private","protocol":"TCP","port":6080,"targetPort":6080},{"name":"p9229-public","protocol":"TCP","port":9229,"targetPort":9229},{"name":"p9999-public","protocol":"TCP","port":9999,"targetPort":9999},{"name":"p13001-public","protocol":"TCP","port":13001,"targetPort":13001},{"name":"p7777-public","protocol":"TCP","port":7777,"targetPort":7777},{"name":"p13444-public","protocol":"TCP","port":13444,"targetPort":13444}],"selector":{"gpwsman":"true","workspaceID":"8e0bbcdf-a926-4670-8c40-b718f035b2ae"},"clusterIP":"10.63.243.155","type":"ClusterIP","sessionAffinity":"None"},"status":{"loadBalancer":{}}},"events":[{"metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae - scheduled2zrpp","generateName":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae - scheduled","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae%20-%20scheduled2zrpp","uid":"e983c42a-b04a-48b6-b214-4fe60281b6ae","resourceVersion":"12819729","creationTimestamp":"2021-05-28T12:48:19Z"},"involvedObject":{"kind":"Pod","namespace":"staging-gpl-headless-log-wsman","name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e"},"reason":"Scheduled","message":"Placed pod [staging-gpl-headless-log-wsman/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae] on gke-dev-workload-1-49d27f81-pd35\n","source":{"component":"workspace-scheduler"},"firstTimestamp":"2021-05-28T12:48:19Z","lastTimestamp":"2021-05-28T12:48:19Z","count":1,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""},{"metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdaa3effefd","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdaa3effefd","uid":"63db3a49-fc8f-401a-bf37-28c88295fb14","resourceVersion":"12819730","creationTimestamp":"2021-05-28T12:48:21Z"},"involvedObject":{"kind":"Pod","namespace":"staging-gpl-headless-log-wsman","name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e","apiVersion":"v1","resourceVersion":"198743315","fieldPath":"spec.containers{workspace}"},"reason":"Pulling","message":"Pulling image \"reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30222/remote/8e0bbcdf-a926-4670-8c40-b718f035b2ae\"","source":{"component":"kubelet","host":"gke-dev-workload-1-49d27f81-pd35"},"firstTimestamp":"2021-05-28T12:48:21Z","lastTimestamp":"2021-05-28T12:48:21Z","count":1,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""},{"metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdb0a0a2c9c","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdb0a0a2c9c","uid":"5b9b3c37-4fb1-4035-b4b1-a13aa83704ae","resourceVersion":"12819731","creationTimestamp":"2021-05-28T12:48:22Z"},"involvedObject":{"kind":"Pod","namespace":"staging-gpl-headless-log-wsman","name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e","apiVersion":"v1","resourceVersion":"198743315","fieldPath":"spec.containers{workspace}"},"reason":"Pulled","message":"Successfully pulled image \"reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30222/remote/8e0bbcdf-a926-4670-8c40-b718f035b2ae\"","source":{"component":"kubelet","host":"gke-dev-workload-1-49d27f81-pd35"},"firstTimestamp":"2021-05-28T12:48:22Z","lastTimestamp":"2021-05-28T12:48:22Z","count":1,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""},{"metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdb128fe8e4","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdb128fe8e4","uid":"bd854c78-0373-41b0-8f17-017ff5e2d080","resourceVersion":"12819732","creationTimestamp":"2021-05-28T12:48:22Z"},"involvedObject":{"kind":"Pod","namespace":"staging-gpl-headless-log-wsman","name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e","apiVersion":"v1","resourceVersion":"198743315","fieldPath":"spec.containers{workspace}"},"reason":"Created","message":"Created container workspace","source":{"component":"kubelet","host":"gke-dev-workload-1-49d27f81-pd35"},"firstTimestamp":"2021-05-28T12:48:22Z","lastTimestamp":"2021-05-28T12:48:22Z","count":1,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""},{"metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdb21e5d246","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdb21e5d246","uid":"524e07b2-1738-4ee2-b190-2ff5c0c53d40","resourceVersion":"12819733","creationTimestamp":"2021-05-28T12:48:23Z"},"involvedObject":{"kind":"Pod","namespace":"staging-gpl-headless-log-wsman","name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e","apiVersion":"v1","resourceVersion":"198743315","fieldPath":"spec.containers{workspace}"},"reason":"Started","message":"Started container workspace","source":{"component":"kubelet","host":"gke-dev-workload-1-49d27f81-pd35"},"firstTimestamp":"2021-05-28T12:48:23Z","lastTimestamp":"2021-05-28T12:48:23Z","count":1,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""},{"metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdbcfee72b0","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdbcfee72b0","uid":"af454391-08ae-4f6c-9338-09bc228242a8","resourceVersion":"12819742","creationTimestamp":"2021-05-28T12:48:26Z"},"involvedObject":{"kind":"Pod","namespace":"staging-gpl-headless-log-wsman","name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e","apiVersion":"v1","resourceVersion":"198743315","fieldPath":"spec.containers{workspace}"},"reason":"Unhealthy","message":"Readiness probe failed: Get http://10.60.61.170:22999/_supervisor/v1/status/content/wait/true: net/http: request canceled (Client.Timeout exceeded while awaiting headers)","source":{"component":"kubelet","host":"gke-dev-workload-1-49d27f81-pd35"},"firstTimestamp":"2021-05-28T12:48:26Z","lastTimestamp":"2021-05-28T12:48:27Z","count":2,"type":"Warning","eventTime":null,"reportingComponent":"","reportingInstance":""},{"metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bee704e5de5","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bee704e5de5","uid":"fda4b916-769c-4167-a782-566fa1574edb","resourceVersion":"12819805","creationTimestamp":"2021-05-28T12:49:46Z"},"involvedObject":{"kind":"Pod","namespace":"staging-gpl-headless-log-wsman","name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e","apiVersion":"v1","resourceVersion":"198743315","fieldPath":"spec.containers{workspace}"},"reason":"Unhealthy","message":"Readiness probe failed: Get http://10.60.61.170:22999/_supervisor/v1/status/content/wait/true: dial tcp 10.60.61.170:22999: connect: connection refused","source":{"component":"kubelet","host":"gke-dev-workload-1-49d27f81-pd35"},"firstTimestamp":"2021-05-28T12:49:46Z","lastTimestamp":"2021-05-28T12:49:46Z","count":1,"type":"Warning","eventTime":null,"reportingComponent":"","reportingInstance":""}]} \ No newline at end of file diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPING00.golden b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPING00.golden new file mode 100644 index 00000000000000..0ff239d48be04b --- /dev/null +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPING00.golden @@ -0,0 +1,94 @@ +{ + "status": { + "id": "8e0bbcdf-a926-4670-8c40-b718f035b2ae", + "metadata": { + "owner": "d98c5b92-2066-4fce-bea6-1e08b58642ab", + "meta_id": "green-wombat-62dzneud", + "started_at": { + "seconds": 1622206099 + } + }, + "spec": { + "workspace_image": "eu.gcr.io/gitpod-core-dev/registry/workspace-images:81c4fb602a540d261f210cfc8ba0435b63b24238c1762ec029d8edaec816afb6", + "ide_image": "eu.gcr.io/gitpod-core-dev/build/ide/code:gpl-headless-log-wsman.17", + "headless": true, + "url": "https://green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com", + "exposed_ports": [ + { + "port": 1337, + "visibility": 1, + "url": "https://1337-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 3000, + "visibility": 1, + "url": "https://3000-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 3001, + "visibility": 1, + "url": "https://3001-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 3306, + "visibility": 1, + "url": "https://3306-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 4000, + "visibility": 1, + "url": "https://4000-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 5900, + "visibility": 1, + "url": "https://5900-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 6080, + "url": "https://6080-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 9229, + "visibility": 1, + "url": "https://9229-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 9999, + "visibility": 1, + "url": "https://9999-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 13001, + "visibility": 1, + "url": "https://13001-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 7777, + "visibility": 1, + "url": "https://7777-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + }, + { + "port": 13444, + "visibility": 1, + "url": "https://13444-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com" + } + ], + "type": 1 + }, + "phase": 5, + "conditions": { + "service_exists": 1, + "deployed": 1 + }, + "message": "headless workspace is stopping", + "runtime": { + "node_name": "gke-dev-workload-1-49d27f81-pd35", + "pod_name": "prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae", + "node_ip": "10.132.15.221" + }, + "auth": { + "owner_token": "FZ2k9zbSCo9e85Y21yh.SHLJbya7pW2Y" + } + } +} \ No newline at end of file diff --git a/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPING00.json b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPING00.json new file mode 100644 index 00000000000000..3c5d5553aa5158 --- /dev/null +++ b/components/ws-manager/pkg/manager/testdata/status_prebuildSuccess_STOPPING00.json @@ -0,0 +1 @@ +{"pod":{"kind":"Pod","apiVersion":"v1","metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/pods/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e","resourceVersion":"198744195","creationTimestamp":"2021-05-28T12:48:19Z","labels":{"app":"gitpod","component":"workspace","gitpod.io/networkpolicy":"default","gpwsman":"true","headless":"true","metaID":"green-wombat-62dzneud","owner":"d98c5b92-2066-4fce-bea6-1e08b58642ab","workspaceID":"8e0bbcdf-a926-4670-8c40-b718f035b2ae","workspaceType":"prebuild"},"annotations":{"cni.projectcalico.org/podIP":"10.60.61.170/32","container.apparmor.security.beta.kubernetes.io/workspace":"unconfined","gitpod.io/requiredNodeServices":"ws-daemon,registry-facade","gitpod/admission":"admit_owner_only","gitpod/contentInitializer":"[redacted]","gitpod/id":"8e0bbcdf-a926-4670-8c40-b718f035b2ae","gitpod/imageSpec":"CnRldS5nY3IuaW8vZ2l0cG9kLWNvcmUtZGV2L3JlZ2lzdHJ5L3dvcmtzcGFjZS1pbWFnZXM6ODFjNGZiNjAyYTU0MGQyNjFmMjEwY2ZjOGJhMDQzNWI2M2IyNDIzOGMxNzYyZWMwMjlkOGVkYWVjODE2YWZiNhJCZXUuZ2NyLmlvL2dpdHBvZC1jb3JlLWRldi9idWlsZC9pZGUvY29kZTpncGwtaGVhZGxlc3MtbG9nLXdzbWFuLjE3","gitpod/ownerToken":"FZ2k9zbSCo9e85Y21yh.SHLJbya7pW2Y","gitpod/servicePrefix":"green-wombat-62dzneud","gitpod/url":"https://green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","kubernetes.io/psp":"staging-gpl-headless-log-wsman-ns-workspace","prometheus.io/path":"/metrics","prometheus.io/port":"23000","prometheus.io/scrape":"true","seccomp.security.alpha.kubernetes.io/pod":"localhost/workspace_default_gpl-headless-log-wsman.17.json"},"finalizers":["gitpod.io/finalizer"]},"spec":{"volumes":[{"name":"vol-this-workspace","hostPath":{"path":"/mnt/disks/ssd0/workspaces/8e0bbcdf-a926-4670-8c40-b718f035b2ae","type":"DirectoryOrCreate"}},{"name":"daemon-mount","hostPath":{"path":"/mnt/disks/ssd0/workspaces/8e0bbcdf-a926-4670-8c40-b718f035b2ae-daemon","type":"DirectoryOrCreate"}}],"containers":[{"name":"workspace","image":"reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30222/remote/8e0bbcdf-a926-4670-8c40-b718f035b2ae","command":["/.supervisor/workspacekit","ring0"],"ports":[{"containerPort":23000,"protocol":"TCP"}],"env":[{"name":"GITPOD_REPO_ROOT","value":"/workspace/gitpod"},{"name":"GITPOD_CLI_APITOKEN","value":"eGnGrk5s7-.KCc15tXUtyKlzwlbjOBIs"},{"name":"GITPOD_WORKSPACE_ID","value":"green-wombat-62dzneud"},{"name":"GITPOD_INSTANCE_ID","value":"8e0bbcdf-a926-4670-8c40-b718f035b2ae"},{"name":"GITPOD_THEIA_PORT","value":"23000"},{"name":"THEIA_WORKSPACE_ROOT","value":"/workspace/gitpod/gitpod-ws.code-workspace"},{"name":"GITPOD_HOST","value":"https://gpl-headless-log-wsman.staging.gitpod-dev.com"},{"name":"GITPOD_WORKSPACE_URL","value":"https://green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com"},{"name":"THEIA_SUPERVISOR_TOKEN","value":"354c0b368f2b4a93b7b812564e663d23"},{"name":"THEIA_SUPERVISOR_ENDPOINT","value":":22999"},{"name":"THEIA_WEBVIEW_EXTERNAL_ENDPOINT","value":"webview-{{hostname}}"},{"name":"THEIA_MINI_BROWSER_HOST_PATTERN","value":"browser-{{hostname}}"},{"name":"GITPOD_GIT_USER_NAME","value":"Gero Posmyk-Leinemann"},{"name":"GITPOD_GIT_USER_EMAIL","value":"gero@gitpod.io"},{"name":"PREBUILD_PARAMS","value":"[redacted]"},{"name":"GITPOD_WORKSPACE_CONTEXT_URL","value":"prebuild/https://github.com/gitpod-io/gitpod/tree/gpl/test-prebuild"},{"name":"GITPOD_WORKSPACE_CONTEXT","value":"{\"ref\":\"gpl/test-prebuild\",\"refType\":\"branch\",\"isFile\":false,\"path\":\"\",\"title\":\"gitpod-io/gitpod - gpl/test-prebuild\",\"revision\":\"a1afe2bb7d454ea7a4194f363601a31ae319ce9c\",\"repository\":{\"cloneUrl\":\"https://github.com/gitpod-io/gitpod.git\",\"host\":\"github.com\",\"name\":\"gitpod\",\"owner\":\"gitpod-io\",\"private\":false}}"},{"name":"GITPOD_TASKS","value":"[{\"name\":\"Test Command\",\"init\":\"export PREBUILD_PARAMS=${PREBUILD_PARAMS:-\\\"100_500ms_30m\\\"}; go run ./main.go $PREBUILD_PARAMS\"}]"},{"name":"THEIA_SUPERVISOR_TOKENS","value":"[{\"tokenOTS\":\"https://gpl-headless-log-wsman.staging.gitpod-dev.com/api/ots/get/71ca5ce2-b15e-4a0e-8a0f-65964c509d40\",\"token\":\"ots\",\"kind\":\"gitpod\",\"host\":\"gpl-headless-log-wsman.staging.gitpod-dev.com\",\"scope\":[\"function:getWorkspace\",\"function:getLoggedInUser\",\"function:getPortAuthenticationToken\",\"function:getWorkspaceOwner\",\"function:getWorkspaceUsers\",\"function:isWorkspaceOwner\",\"function:controlAdmission\",\"function:setWorkspaceTimeout\",\"function:getWorkspaceTimeout\",\"function:sendHeartBeat\",\"function:getOpenPorts\",\"function:openPort\",\"function:closePort\",\"function:getLayout\",\"function:generateNewGitpodToken\",\"function:takeSnapshot\",\"function:storeLayout\",\"function:stopWorkspace\",\"function:getToken\",\"function:getContentBlobUploadUrl\",\"function:getContentBlobDownloadUrl\",\"function:accessCodeSyncStorage\",\"function:guessGitTokenScopes\",\"function:getEnvVars\",\"function:setEnvVar\",\"function:deleteEnvVar\",\"resource:workspace::green-wombat-62dzneud::get/update\",\"resource:workspaceInstance::8e0bbcdf-a926-4670-8c40-b718f035b2ae::get/update/delete\",\"resource:snapshot::ws-green-wombat-62dzneud::create\",\"resource:gitpodToken::*::create\",\"resource:userStorage::*::create/get/update\",\"resource:token::*::get\",\"resource:contentBlob::*::create/get\",\"resource:envVar::gitpod-io/gitpod::create/get/update/delete\"],\"expiryDate\":\"2021-05-29T12:48:19.234Z\",\"reuse\":2}]"},{"name":"GITPOD_RESOLVED_EXTENSIONS","value":"{\"vscode.bat@1.44.2\":{\"fullPluginName\":\"vscode.bat@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.clojure@1.44.2\":{\"fullPluginName\":\"vscode.clojure@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.coffeescript@1.44.2\":{\"fullPluginName\":\"vscode.coffeescript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.cpp@1.44.2\":{\"fullPluginName\":\"vscode.cpp@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.csharp@1.44.2\":{\"fullPluginName\":\"vscode.csharp@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"llvm-vs-code-extensions.vscode-clangd@0.1.5\":{\"fullPluginName\":\"llvm-vs-code-extensions.vscode-clangd@0.1.5\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.css@1.51.1\":{\"fullPluginName\":\"vscode.css@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.css-language-features@1.51.1\":{\"fullPluginName\":\"vscode.css-language-features@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.debug-auto-launch@1.44.2\":{\"fullPluginName\":\"vscode.debug-auto-launch@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.emmet@1.44.2\":{\"fullPluginName\":\"vscode.emmet@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.fsharp@1.44.2\":{\"fullPluginName\":\"vscode.fsharp@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.go@1.44.2\":{\"fullPluginName\":\"vscode.go@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.groovy@1.44.2\":{\"fullPluginName\":\"vscode.groovy@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.handlebars@1.44.2\":{\"fullPluginName\":\"vscode.handlebars@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.hlsl@1.44.2\":{\"fullPluginName\":\"vscode.hlsl@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.html@1.51.1\":{\"fullPluginName\":\"vscode.html@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.html-language-features@1.51.1\":{\"fullPluginName\":\"vscode.html-language-features@1.51.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.ini@1.44.2\":{\"fullPluginName\":\"vscode.ini@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.java@1.53.2\":{\"fullPluginName\":\"vscode.java@1.53.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.javascript@1.44.2\":{\"fullPluginName\":\"vscode.javascript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.json@1.44.2\":{\"fullPluginName\":\"vscode.json@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.json-language-features@1.46.1\":{\"fullPluginName\":\"vscode.json-language-features@1.46.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.less@1.44.2\":{\"fullPluginName\":\"vscode.less@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.log@1.44.2\":{\"fullPluginName\":\"vscode.log@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.lua@1.44.2\":{\"fullPluginName\":\"vscode.lua@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.make@1.44.2\":{\"fullPluginName\":\"vscode.make@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.markdown@1.44.2\":{\"fullPluginName\":\"vscode.markdown@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.npm@1.39.1\":{\"fullPluginName\":\"vscode.npm@1.39.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.objective-c@1.44.2\":{\"fullPluginName\":\"vscode.objective-c@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.perl@1.44.2\":{\"fullPluginName\":\"vscode.perl@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.php@1.44.2\":{\"fullPluginName\":\"vscode.php@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.powershell@1.44.2\":{\"fullPluginName\":\"vscode.powershell@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.pug@1.44.2\":{\"fullPluginName\":\"vscode.pug@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.python@1.47.3\":{\"fullPluginName\":\"vscode.python@1.47.3\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.r@1.44.2\":{\"fullPluginName\":\"vscode.r@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.razor@1.44.2\":{\"fullPluginName\":\"vscode.razor@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.ruby@1.44.2\":{\"fullPluginName\":\"vscode.ruby@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.rust@1.44.2\":{\"fullPluginName\":\"vscode.rust@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.scss@1.44.2\":{\"fullPluginName\":\"vscode.scss@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.shaderlab@1.44.2\":{\"fullPluginName\":\"vscode.shaderlab@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.shellscript@1.44.2\":{\"fullPluginName\":\"vscode.shellscript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.sql@1.44.2\":{\"fullPluginName\":\"vscode.sql@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.swift@1.44.2\":{\"fullPluginName\":\"vscode.swift@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.typescript@1.44.2\":{\"fullPluginName\":\"vscode.typescript@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.typescript-language-features@1.44.2\":{\"fullPluginName\":\"vscode.typescript-language-features@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.vb@1.44.2\":{\"fullPluginName\":\"vscode.vb@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.xml@1.44.2\":{\"fullPluginName\":\"vscode.xml@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.yaml@1.44.2\":{\"fullPluginName\":\"vscode.yaml@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"redhat.java@0.75.0\":{\"fullPluginName\":\"redhat.java@0.75.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscjava.vscode-java-debug@0.27.1\":{\"fullPluginName\":\"vscjava.vscode-java-debug@0.27.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscjava.vscode-java-dependency@0.18.0\":{\"fullPluginName\":\"vscjava.vscode-java-dependency@0.18.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-vscode.node-debug@1.38.4\":{\"fullPluginName\":\"ms-vscode.node-debug@1.38.4\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-vscode.node-debug2@1.33.0\":{\"fullPluginName\":\"ms-vscode.node-debug2@1.33.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-python.python@2020.7.96456\":{\"fullPluginName\":\"ms-python.python@2020.7.96456\",\"url\":\"local\",\"kind\":\"builtin\"},\"redhat.vscode-xml@0.11.0\":{\"fullPluginName\":\"redhat.vscode-xml@0.11.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"redhat.vscode-yaml@0.8.0\":{\"fullPluginName\":\"redhat.vscode-yaml@0.8.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"bmewburn.vscode-intelephense-client@1.4.0\":{\"fullPluginName\":\"bmewburn.vscode-intelephense-client@1.4.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"felixfbecker.php-debug@1.13.0\":{\"fullPluginName\":\"felixfbecker.php-debug@1.13.0\",\"url\":\"local\",\"kind\":\"builtin\"},\"rust-lang.rust@0.7.8\":{\"fullPluginName\":\"rust-lang.rust@0.7.8\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-abyss@1.44.2\":{\"fullPluginName\":\"vscode.theme-abyss@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-kimbie-dark@1.44.2\":{\"fullPluginName\":\"vscode.theme-kimbie-dark@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-monokai@1.44.2\":{\"fullPluginName\":\"vscode.theme-monokai@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-monokai-dimmed@1.44.2\":{\"fullPluginName\":\"vscode.theme-monokai-dimmed@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-quietlight@1.44.2\":{\"fullPluginName\":\"vscode.theme-quietlight@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-red@1.44.2\":{\"fullPluginName\":\"vscode.theme-red@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-solarized-dark@1.44.2\":{\"fullPluginName\":\"vscode.theme-solarized-dark@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-solarized-light@1.44.2\":{\"fullPluginName\":\"vscode.theme-solarized-light@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.theme-tomorrow-night-blue@1.44.2\":{\"fullPluginName\":\"vscode.theme-tomorrow-night-blue@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.vscode-theme-seti@1.44.2\":{\"fullPluginName\":\"vscode.vscode-theme-seti@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.merge-conflict@1.44.2\":{\"fullPluginName\":\"vscode.merge-conflict@1.44.2\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-vscode.references-view@0.0.47\":{\"fullPluginName\":\"ms-vscode.references-view@0.0.47\",\"url\":\"local\",\"kind\":\"builtin\"},\"EditorConfig.EditorConfig@0.15.1\":{\"fullPluginName\":\"editorconfig.editorconfig@0.15.1\",\"url\":\"local\",\"kind\":\"builtin\"},\"vscode.docker@1.47.3\":{\"fullPluginName\":\"vscode.docker@1.47.3\",\"url\":\"local\",\"kind\":\"builtin\"},\"ms-kubernetes-tools.vscode-kubernetes-tools\":{\"fullPluginName\":\"ms-kubernetes-tools.vscode-kubernetes-tools@1.3.3\",\"url\":\"https://open-vsx.org/api/ms-kubernetes-tools/vscode-kubernetes-tools/1.3.3/file/ms-kubernetes-tools.vscode-kubernetes-tools-1.3.3.vsix\",\"kind\":\"workspace\"},\"hashicorp.terraform\":{\"fullPluginName\":\"hashicorp.terraform@2.11.0\",\"url\":\"https://open-vsx.org/api/hashicorp/terraform/2.11.0/file/hashicorp.terraform-2.11.0.vsix\",\"kind\":\"workspace\"},\"zxh404.vscode-proto3\":{\"fullPluginName\":\"zxh404.vscode-proto3@0.5.4\",\"url\":\"https://open-vsx.org/api/zxh404/vscode-proto3/0.5.4/file/zxh404.vscode-proto3-0.5.4.vsix\",\"kind\":\"workspace\"},\"bajdzis.vscode-database\":{\"fullPluginName\":\"bajdzis.vscode-database@2.2.3\",\"url\":\"https://open-vsx.org/api/bajdzis/vscode-database/2.2.3/file/bajdzis.vscode-database-2.2.3.vsix\",\"kind\":\"workspace\"},\"stkb.rewrap\":{\"fullPluginName\":\"stkb.rewrap@1.14.0\",\"url\":\"https://open-vsx.org/api/stkb/rewrap/1.14.0/file/stkb.rewrap-1.14.0.vsix\",\"kind\":\"workspace\"},\"golang.go\":{\"fullPluginName\":\"golang.go@0.25.0\",\"url\":\"https://open-vsx.org/api/golang/Go/0.25.0/file/golang.Go-0.25.0.vsix\",\"kind\":\"workspace\"}}"},{"name":"GITPOD_EXTERNAL_EXTENSIONS","value":"[]"},{"name":"GITPOD_INTERVAL","value":"30000"},{"name":"GITPOD_MEMORY","value":"2415"},{"name":"GITPOD_HEADLESS","value":"true"}],"resources":{"limits":{"cpu":"5","memory":"12Gi"},"requests":{"cpu":"1m","ephemeral-storage":"5Gi","memory":"4608Mi"}},"volumeMounts":[{"name":"vol-this-workspace","mountPath":"/workspace","mountPropagation":"HostToContainer"},{"name":"daemon-mount","mountPath":"/.workspace","mountPropagation":"HostToContainer"}],"readinessProbe":{"httpGet":{"path":"/_supervisor/v1/status/content/wait/true","port":22999,"scheme":"HTTP"},"timeoutSeconds":1,"periodSeconds":1,"successThreshold":1,"failureThreshold":600},"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"FallbackToLogsOnError","imagePullPolicy":"Always","securityContext":{"capabilities":{"add":["AUDIT_WRITE","FSETID","KILL","NET_BIND_SERVICE","SYS_PTRACE"],"drop":["SETPCAP","CHOWN","NET_RAW","DAC_OVERRIDE","FOWNER","SYS_CHROOT","SETFCAP","SETUID","SETGID"]},"privileged":false,"runAsUser":33333,"runAsGroup":33333,"runAsNonRoot":true,"readOnlyRootFilesystem":false,"allowPrivilegeEscalation":true}}],"restartPolicy":"Never","terminationGracePeriodSeconds":30,"dnsPolicy":"None","serviceAccountName":"workspace","serviceAccount":"workspace","automountServiceAccountToken":false,"nodeName":"gke-dev-workload-1-49d27f81-pd35","securityContext":{"supplementalGroups":[1],"fsGroup":1},"imagePullSecrets":[{"name":"gcp-sa-registry-auth"}],"affinity":{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"gitpod.io/workload_workspace","operator":"Exists"}]}]}}},"schedulerName":"workspace-scheduler","tolerations":[{"key":"node.kubernetes.io/disk-pressure","operator":"Exists","effect":"NoExecute"},{"key":"node.kubernetes.io/memory-pressure","operator":"Exists","effect":"NoExecute"},{"key":"node.kubernetes.io/network-unavailable","operator":"Exists","effect":"NoExecute","tolerationSeconds":30},{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0,"dnsConfig":{"nameservers":["1.1.1.1","8.8.8.8"]},"enableServiceLinks":false},"status":{"phase":"Succeeded","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2021-05-28T12:48:19Z","reason":"PodCompleted"},{"type":"Ready","status":"False","lastProbeTime":null,"lastTransitionTime":"2021-05-28T12:49:46Z","reason":"PodCompleted"},{"type":"ContainersReady","status":"False","lastProbeTime":null,"lastTransitionTime":"2021-05-28T12:49:46Z","reason":"PodCompleted"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2021-05-28T12:48:19Z"}],"hostIP":"10.132.15.221","podIP":"10.60.61.170","podIPs":[{"ip":"10.60.61.170"}],"startTime":"2021-05-28T12:48:19Z","containerStatuses":[{"name":"workspace","state":{"terminated":{"exitCode":0,"reason":"Completed","startedAt":"2021-05-28T12:48:23Z","finishedAt":"2021-05-28T12:49:45Z","containerID":"containerd://c2fb575264ceeae177f754b0edd4dfbfc2439b2b9bdccab020dfa7fe494408cc"}},"lastState":{},"ready":false,"restartCount":0,"image":"reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30942/remote/01709d83-71a4-47fa-b14d-6482b3650d8c:latest","imageID":"reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30222/remote/8e0bbcdf-a926-4670-8c40-b718f035b2ae@sha256:6987f020499b07d3e3762844b819481fd5e1a0b04fd34ad2a1a17dca0c827599","containerID":"containerd://c2fb575264ceeae177f754b0edd4dfbfc2439b2b9bdccab020dfa7fe494408cc","started":false}],"qosClass":"Burstable"}},"theiaService":{"kind":"Service","apiVersion":"v1","metadata":{"name":"ws-green-wombat-62dzneud-theia","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/services/ws-green-wombat-62dzneud-theia","uid":"67227f06-91de-44d4-83fe-0911cc6e3601","resourceVersion":"198743318","creationTimestamp":"2021-05-28T12:48:19Z","labels":{"app":"gitpod","component":"workspace","gpwsman":"true","headless":"true","metaID":"green-wombat-62dzneud","owner":"d98c5b92-2066-4fce-bea6-1e08b58642ab","workspaceID":"8e0bbcdf-a926-4670-8c40-b718f035b2ae","workspaceType":"prebuild"}},"spec":{"ports":[{"name":"ide","protocol":"TCP","port":23000,"targetPort":23000},{"name":"supervisor","protocol":"TCP","port":22999,"targetPort":22999}],"selector":{"app":"gitpod","component":"workspace","gpwsman":"true","headless":"true","metaID":"green-wombat-62dzneud","owner":"d98c5b92-2066-4fce-bea6-1e08b58642ab","workspaceID":"8e0bbcdf-a926-4670-8c40-b718f035b2ae","workspaceType":"prebuild"},"clusterIP":"10.63.250.40","type":"ClusterIP","sessionAffinity":"None"},"status":{"loadBalancer":{}}},"portsService":{"kind":"Service","apiVersion":"v1","metadata":{"name":"ws-green-wombat-62dzneud-ports","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/services/ws-green-wombat-62dzneud-ports","uid":"1ebcfc6e-15c3-415e-9de5-6c7adc47d1a7","resourceVersion":"198743322","creationTimestamp":"2021-05-28T12:48:19Z","labels":{"gpwsman":"true","metaID":"green-wombat-62dzneud","serviceType":"ports","workspaceID":"8e0bbcdf-a926-4670-8c40-b718f035b2ae"},"annotations":{"gitpod/port-url-13001":"https://13001-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-1337":"https://1337-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-13444":"https://13444-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-3000":"https://3000-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-3001":"https://3001-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-3306":"https://3306-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-4000":"https://4000-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-5900":"https://5900-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-6080":"https://6080-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-7777":"https://7777-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-9229":"https://9229-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com","gitpod/port-url-9999":"https://9999-green-wombat-62dzneud.ws-dev.gpl-headless-log-wsman.staging.gitpod-dev.com"}},"spec":{"ports":[{"name":"p1337-public","protocol":"TCP","port":1337,"targetPort":1337},{"name":"p3000-public","protocol":"TCP","port":3000,"targetPort":3000},{"name":"p3001-public","protocol":"TCP","port":3001,"targetPort":3001},{"name":"p3306-public","protocol":"TCP","port":3306,"targetPort":3306},{"name":"p4000-public","protocol":"TCP","port":4000,"targetPort":4000},{"name":"p5900-public","protocol":"TCP","port":5900,"targetPort":5900},{"name":"p6080-private","protocol":"TCP","port":6080,"targetPort":6080},{"name":"p9229-public","protocol":"TCP","port":9229,"targetPort":9229},{"name":"p9999-public","protocol":"TCP","port":9999,"targetPort":9999},{"name":"p13001-public","protocol":"TCP","port":13001,"targetPort":13001},{"name":"p7777-public","protocol":"TCP","port":7777,"targetPort":7777},{"name":"p13444-public","protocol":"TCP","port":13444,"targetPort":13444}],"selector":{"gpwsman":"true","workspaceID":"8e0bbcdf-a926-4670-8c40-b718f035b2ae"},"clusterIP":"10.63.243.155","type":"ClusterIP","sessionAffinity":"None"},"status":{"loadBalancer":{}}},"events":[{"metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae - scheduled2zrpp","generateName":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae - scheduled","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae%20-%20scheduled2zrpp","uid":"e983c42a-b04a-48b6-b214-4fe60281b6ae","resourceVersion":"12819729","creationTimestamp":"2021-05-28T12:48:19Z"},"involvedObject":{"kind":"Pod","namespace":"staging-gpl-headless-log-wsman","name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e"},"reason":"Scheduled","message":"Placed pod [staging-gpl-headless-log-wsman/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae] on gke-dev-workload-1-49d27f81-pd35\n","source":{"component":"workspace-scheduler"},"firstTimestamp":"2021-05-28T12:48:19Z","lastTimestamp":"2021-05-28T12:48:19Z","count":1,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""},{"metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdaa3effefd","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdaa3effefd","uid":"63db3a49-fc8f-401a-bf37-28c88295fb14","resourceVersion":"12819730","creationTimestamp":"2021-05-28T12:48:21Z"},"involvedObject":{"kind":"Pod","namespace":"staging-gpl-headless-log-wsman","name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e","apiVersion":"v1","resourceVersion":"198743315","fieldPath":"spec.containers{workspace}"},"reason":"Pulling","message":"Pulling image \"reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30222/remote/8e0bbcdf-a926-4670-8c40-b718f035b2ae\"","source":{"component":"kubelet","host":"gke-dev-workload-1-49d27f81-pd35"},"firstTimestamp":"2021-05-28T12:48:21Z","lastTimestamp":"2021-05-28T12:48:21Z","count":1,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""},{"metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdb0a0a2c9c","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdb0a0a2c9c","uid":"5b9b3c37-4fb1-4035-b4b1-a13aa83704ae","resourceVersion":"12819731","creationTimestamp":"2021-05-28T12:48:22Z"},"involvedObject":{"kind":"Pod","namespace":"staging-gpl-headless-log-wsman","name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e","apiVersion":"v1","resourceVersion":"198743315","fieldPath":"spec.containers{workspace}"},"reason":"Pulled","message":"Successfully pulled image \"reg.gpl-headless-log-wsman.staging.gitpod-dev.com:30222/remote/8e0bbcdf-a926-4670-8c40-b718f035b2ae\"","source":{"component":"kubelet","host":"gke-dev-workload-1-49d27f81-pd35"},"firstTimestamp":"2021-05-28T12:48:22Z","lastTimestamp":"2021-05-28T12:48:22Z","count":1,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""},{"metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdb128fe8e4","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdb128fe8e4","uid":"bd854c78-0373-41b0-8f17-017ff5e2d080","resourceVersion":"12819732","creationTimestamp":"2021-05-28T12:48:22Z"},"involvedObject":{"kind":"Pod","namespace":"staging-gpl-headless-log-wsman","name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e","apiVersion":"v1","resourceVersion":"198743315","fieldPath":"spec.containers{workspace}"},"reason":"Created","message":"Created container workspace","source":{"component":"kubelet","host":"gke-dev-workload-1-49d27f81-pd35"},"firstTimestamp":"2021-05-28T12:48:22Z","lastTimestamp":"2021-05-28T12:48:22Z","count":1,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""},{"metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdb21e5d246","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdb21e5d246","uid":"524e07b2-1738-4ee2-b190-2ff5c0c53d40","resourceVersion":"12819733","creationTimestamp":"2021-05-28T12:48:23Z"},"involvedObject":{"kind":"Pod","namespace":"staging-gpl-headless-log-wsman","name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e","apiVersion":"v1","resourceVersion":"198743315","fieldPath":"spec.containers{workspace}"},"reason":"Started","message":"Started container workspace","source":{"component":"kubelet","host":"gke-dev-workload-1-49d27f81-pd35"},"firstTimestamp":"2021-05-28T12:48:23Z","lastTimestamp":"2021-05-28T12:48:23Z","count":1,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""},{"metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdbcfee72b0","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bdbcfee72b0","uid":"af454391-08ae-4f6c-9338-09bc228242a8","resourceVersion":"12819742","creationTimestamp":"2021-05-28T12:48:26Z"},"involvedObject":{"kind":"Pod","namespace":"staging-gpl-headless-log-wsman","name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e","apiVersion":"v1","resourceVersion":"198743315","fieldPath":"spec.containers{workspace}"},"reason":"Unhealthy","message":"Readiness probe failed: Get http://10.60.61.170:22999/_supervisor/v1/status/content/wait/true: net/http: request canceled (Client.Timeout exceeded while awaiting headers)","source":{"component":"kubelet","host":"gke-dev-workload-1-49d27f81-pd35"},"firstTimestamp":"2021-05-28T12:48:26Z","lastTimestamp":"2021-05-28T12:48:27Z","count":2,"type":"Warning","eventTime":null,"reportingComponent":"","reportingInstance":""},{"metadata":{"name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bee704e5de5","namespace":"staging-gpl-headless-log-wsman","selfLink":"/api/v1/namespaces/staging-gpl-headless-log-wsman/events/prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae.16833bee704e5de5","uid":"fda4b916-769c-4167-a782-566fa1574edb","resourceVersion":"12819805","creationTimestamp":"2021-05-28T12:49:46Z"},"involvedObject":{"kind":"Pod","namespace":"staging-gpl-headless-log-wsman","name":"prebuild-8e0bbcdf-a926-4670-8c40-b718f035b2ae","uid":"bde1c8ff-8a05-43b6-a2ce-2f88e32dbe1e","apiVersion":"v1","resourceVersion":"198743315","fieldPath":"spec.containers{workspace}"},"reason":"Unhealthy","message":"Readiness probe failed: Get http://10.60.61.170:22999/_supervisor/v1/status/content/wait/true: dial tcp 10.60.61.170:22999: connect: connection refused","source":{"component":"kubelet","host":"gke-dev-workload-1-49d27f81-pd35"},"firstTimestamp":"2021-05-28T12:49:46Z","lastTimestamp":"2021-05-28T12:49:46Z","count":1,"type":"Warning","eventTime":null,"reportingComponent":"","reportingInstance":""}]} \ No newline at end of file diff --git a/test/go.sum b/test/go.sum index b841508f1f24b4..eda33cb0a902c2 100644 --- a/test/go.sum +++ b/test/go.sum @@ -514,8 +514,6 @@ github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WT github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= github.com/minio/md5-simd v1.1.1 h1:9ojcLbuZ4gXbB2sX53MKn8JUZ0sB/2wfwsEcRw+I08U= github.com/minio/md5-simd v1.1.1/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= -github.com/minio/minio-go/v7 v7.0.10 h1:1oUKe4EOPUEhw2qnPQaPsJ0lmVTYLFu03SiItauXs94= -github.com/minio/minio-go/v7 v7.0.10/go.mod h1:td4gW1ldOsj1PbSNS+WYK43j+P1XVhX/8W8awaYlBFo= github.com/minio/minio-go/v7 v7.0.11 h1:7utSkCtMQPYYB1UB8FR3d0QSiOWE6F/JYXon29imYek= github.com/minio/minio-go/v7 v7.0.11/go.mod h1:WoyW+ySKAKjY98B9+7ZbI8z8S3jaxaisdcvj9TGlazA= github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= @@ -556,7 +554,6 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -607,7 +604,6 @@ github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= @@ -668,10 +664,8 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sourcegraph/jsonrpc2 v0.0.0-20200429184054-15c2290dcb37 h1:marA1XQDC7N870zmSFIoHZpIUduK80USeY0Rkuflgp4= @@ -697,7 +691,6 @@ github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -705,7 +698,6 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -1204,7 +1196,6 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -1233,12 +1224,9 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/test/pkg/integration/workspace.go b/test/pkg/integration/workspace.go index 7df4047c4b8b64..de0ce84a60b51c 100644 --- a/test/pkg/integration/workspace.go +++ b/test/pkg/integration/workspace.go @@ -8,6 +8,8 @@ import ( "context" "encoding/json" "fmt" + "io" + "sync" "time" "github.com/google/uuid" @@ -191,7 +193,7 @@ func LaunchWorkspaceDirectly(it *Test, opts ...LaunchWorkspaceDirectlyOpt) (res it.t.Fatalf("cannot start workspace: %q", err) } - lastStatus := it.WaitForWorkspace(it.ctx, instanceID.String(), options.WaitForOpts...) + lastStatus := it.WaitForWorkspaceStart(it.ctx, instanceID.String(), options.WaitForOpts...) it.t.Logf("workspace is running: instanceID=%s", instanceID.String()) @@ -251,7 +253,7 @@ func LaunchWorkspaceFromContextURL(it *Test, contextURL string, serverOpts ...Gi it.t.Fatal(err) } - it.WaitForWorkspace(it.ctx, nfo.LatestInstance.ID) + it.WaitForWorkspaceStart(it.ctx, nfo.LatestInstance.ID) it.t.Logf("workspace is running: instanceID=%s", nfo.LatestInstance.ID) @@ -272,7 +274,7 @@ func WorkspaceCanFail(o *waitForWorkspaceOpts) { // WaitForWorkspace waits until a workspace is running. Fails the test if the workspace // fails or does not become RUNNING before the context is canceled. -func (t *Test) WaitForWorkspace(ctx context.Context, instanceID string, opts ...WaitForWorkspaceOpt) (lastStatus *wsmanapi.WorkspaceStatus) { +func (t *Test) WaitForWorkspaceStart(ctx context.Context, instanceID string, opts ...WaitForWorkspaceOpt) (lastStatus *wsmanapi.WorkspaceStatus) { var cfg waitForWorkspaceOpts for _, o := range opts { o(&cfg) @@ -461,6 +463,70 @@ func (it *Test) WaitForWorkspaceStop(instanceID string) (lastStatus *wsmanapi.Wo return } +// WaitForWorkspace waits until the condition function returns true. Fails the test if the condition does +// not become true before the context is canceled. +func (it *Test) WaitForWorkspace(instanceID string, condition func(status *wsmanapi.WorkspaceStatus) bool) (lastStatus *wsmanapi.WorkspaceStatus) { + wsman := it.API().WorkspaceManager() + sub, err := wsman.Subscribe(it.ctx, &wsmanapi.SubscribeRequest{}) + if err != nil { + it.t.Errorf("cannot listen for workspace updates: %q", err) + return + } + + done := make(chan *wsmanapi.WorkspaceStatus, 1) + var once sync.Once + go func() { + var status *wsmanapi.WorkspaceStatus + defer func() { + once.Do(func() { + done <- status + close(done) + }) + _ = sub.CloseSend() + }() + for { + resp, err := sub.Recv() + if err == io.EOF { + return + } + if err != nil { + it.t.Errorf("workspace update error: %q", err) + return + } + status = resp.GetStatus() + if status == nil { + continue + } + if status.Id != instanceID { + continue + } + + if condition(status) { + return + } + } + }() + + // maybe the workspace has started in the meantime and we've missed the update + desc, err := wsman.DescribeWorkspace(it.ctx, &wsmanapi.DescribeWorkspaceRequest{Id: instanceID}) + if err != nil { + it.t.Fatalf("cannot get workspace: %q", err) + return + } + if condition(desc.Status) { + once.Do(func() { close(done) }) + return desc.Status + } + + select { + case <-it.ctx.Done(): + it.t.Fatalf("cannot wait for workspace: %q", it.ctx.Err()) + return + case s := <-done: + return s + } +} + func (it *Test) resolveOrBuildImage(baseRef string) (absref string, err error) { rctx, rcancel := context.WithTimeout(it.ctx, perCallTimeout) cl := it.API().ImageBuilder() diff --git a/test/tests/examples/server_test.go b/test/tests/examples/server_test.go index f7e6bbc788db23..041b895781cfc4 100644 --- a/test/tests/examples/server_test.go +++ b/test/tests/examples/server_test.go @@ -55,7 +55,7 @@ func TestStartWorkspace(t *testing.T) { t.Fatal("CreateWorkspace did not start the workspace") } - it.WaitForWorkspace(ctx, nfo.LatestInstance.ID) + it.WaitForWorkspaceStart(ctx, nfo.LatestInstance.ID) t.Logf("workspace is running: instanceID=%s", nfo.LatestInstance.ID) } diff --git a/test/tests/workspace/contexts_test.go b/test/tests/workspace/contexts_test.go index a10bc73e31448d..281a5d9cf23616 100644 --- a/test/tests/workspace/contexts_test.go +++ b/test/tests/workspace/contexts_test.go @@ -109,7 +109,7 @@ func runContextTests(t *testing.T, tests []ContextTest) { wctx, wcancel := context.WithTimeout(ctx, 1*time.Minute) defer wcancel() - it.WaitForWorkspace(wctx, nfo.LatestInstance.ID) + it.WaitForWorkspaceStart(wctx, nfo.LatestInstance.ID) rsa, err := it.Instrument(integration.ComponentWorkspace, "workspace", integration.WithInstanceID(nfo.LatestInstance.ID)) if err != nil { diff --git a/test/tests/workspace/ghost_test.go b/test/tests/workspace/ghost_test.go new file mode 100644 index 00000000000000..02b6fbfbcfad87 --- /dev/null +++ b/test/tests/workspace/ghost_test.go @@ -0,0 +1,31 @@ +// Copyright (c) 2020 Gitpod GmbH. All rights reserved. +// Licensed under the GNU Affero General Public License (AGPL). +// See License-AGPL.txt in the project root for license information. + +package workspace_test + +import ( + "testing" + "time" + + "github.com/gitpod-io/gitpod/test/pkg/integration" + wsmanapi "github.com/gitpod-io/gitpod/ws-manager/api" +) + +func TestGhostWorkspace(t *testing.T) { + it, ctx := integration.NewTest(t, 5*time.Minute) + defer it.Done() + + // there's nothing specific about ghost that we want to test beyond that they start properly + ws := integration.LaunchWorkspaceDirectly(it, integration.WithRequestModifier(func(req *wsmanapi.StartWorkspaceRequest) error { + req.Type = wsmanapi.WorkspaceType_GHOST + req.Spec.Envvars = append(req.Spec.Envvars, &wsmanapi.EnvironmentVariable{ + Name: "GITPOD_TASKS", + Value: `[{ "init": "echo \"some output\" > someFile; sleep 20; exit 0;" }]`, + }) + return nil + })) + defer integration.DeleteWorkspace(it, ws.Req.Id) + + it.WaitForWorkspaceStart(ctx, ws.Req.Id) +} diff --git a/test/tests/workspace/git_test.go b/test/tests/workspace/git_test.go index b31ebbc6498b51..81b005d0e040e4 100644 --- a/test/tests/workspace/git_test.go +++ b/test/tests/workspace/git_test.go @@ -107,7 +107,7 @@ func runGitTests(t *testing.T, tests []GitTest) { nfo, stopWS := integration.LaunchWorkspaceFromContextURL(it, test.ContextURL) defer stopWS(false) - it.WaitForWorkspace(ctx, nfo.LatestInstance.ID) + it.WaitForWorkspaceStart(ctx, nfo.LatestInstance.ID) rsa, err := it.Instrument(integration.ComponentWorkspace, "workspace", integration.WithInstanceID(nfo.LatestInstance.ID)) if err != nil { diff --git a/test/tests/workspace/prebuild_test.go b/test/tests/workspace/prebuild_test.go new file mode 100644 index 00000000000000..d0973147f42cf2 --- /dev/null +++ b/test/tests/workspace/prebuild_test.go @@ -0,0 +1,51 @@ +// Copyright (c) 2020 Gitpod GmbH. All rights reserved. +// Licensed under the GNU Affero General Public License (AGPL). +// See License-AGPL.txt in the project root for license information. + +package workspace_test + +import ( + "testing" + "time" + + "github.com/gitpod-io/gitpod/test/pkg/integration" + wsmanapi "github.com/gitpod-io/gitpod/ws-manager/api" +) + +func TestPrebuildWorkspaceTaskSuccess(t *testing.T) { + it, _ := integration.NewTest(t, 5*time.Minute) + defer it.Done() + + ws := integration.LaunchWorkspaceDirectly(it, integration.WithRequestModifier(func(req *wsmanapi.StartWorkspaceRequest) error { + req.Type = wsmanapi.WorkspaceType_PREBUILD + req.Spec.Envvars = append(req.Spec.Envvars, &wsmanapi.EnvironmentVariable{ + Name: "GITPOD_TASKS", + Value: `[{ "init": "echo \"some output\" > someFile; sleep 20; exit 0;" }]`, + }) + return nil + })) + it.WaitForWorkspaceStop(ws.Req.Id) +} + +func TestPrebuildWorkspaceTaskFail(t *testing.T) { + it, _ := integration.NewTest(t, 5*time.Minute) + defer it.Done() + + ws := integration.LaunchWorkspaceDirectly(it, integration.WithRequestModifier(func(req *wsmanapi.StartWorkspaceRequest) error { + req.Type = wsmanapi.WorkspaceType_PREBUILD + req.Spec.Envvars = append(req.Spec.Envvars, &wsmanapi.EnvironmentVariable{ + Name: "GITPOD_TASKS", + Value: `[{ "init": "echo \"some output\" > someFile; sleep 20; exit 1;" }]`, + }) + return nil + })) + it.WaitForWorkspace(ws.Req.Id, func(status *wsmanapi.WorkspaceStatus) bool { + if status.Phase != wsmanapi.WorkspacePhase_STOPPED { + return false + } + if status.Conditions.HeadlessTaskFailed == "" { + t.Fatal("expected HeadlessTaskFailed condition") + } + return true + }) +}