-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[ws-manager-mk2] Emit events for workspaces and snapshots #16907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is great
@@ -124,5 +128,20 @@ func (ssc *SnapshotReconciler) Reconcile(ctx context.Context, req ctrl.Request) | |||
log.Error(err, "could not set completion status for snapshot", "workspace", snapshot.Spec.WorkspaceID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated to the PR, but would be nice to log the snapshotErr here if it fails to update the status
@@ -114,12 +117,14 @@ func (r *WorkspaceReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( | |||
return ctrl.Result{}, err | |||
} | |||
|
|||
err = updateWorkspaceStatus(ctx, &workspace, workspacePods, r.Config) | |||
oldStatus := workspace.Status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oldStatus := workspace.Status | |
oldStatus := workspace.Status.DeepCopy() |
to ensure e.g. pointers are also copied, don't think it makes any difference now but might in the future?
Description
Emit events for workspaces and snapshots. Depends on #16896
`
Related Issue(s)
n.a.
How to test
Using https://g8a099d879e.workspace-preview.gitpod-io-dev.com/workspaces
kubectl get events
Release Notes
Build Options:
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish Options
Installer Options
Add desired feature flags to the end of the line above, space separated
Preview Environment Options:
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh