Skip to content

[ws-manager-mk2] Implement MarkActive #16181

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

Merged
merged 1 commit into from
Feb 7, 2023
Merged

[ws-manager-mk2] Implement MarkActive #16181

merged 1 commit into from
Feb 7, 2023

Conversation

WVerlaek
Copy link
Member

@WVerlaek WVerlaek commented Feb 2, 2023

Description

Splitting out from #16122

This PR implements MarkActive in ws-manager-mk2.

Also contains some drive-by improvements (vscode workspace, remove error log in reconciler if resource is not found, this is normal and happens on deletion)

Related Issue(s)

Part of #11416

How to test

Open in preview env, check that the FirstUserActivity condition gets set on the workspace CR when opening a workspace.

Release Notes

NONE

Documentation

Build Options:

  • /werft with-github-actions
    Experimental feature to run the build with GitHub Actions (and not in Werft).
  • leeway-no-cache
    leeway-target=components:all
  • /werft no-test
    Run Leeway with --dont-test
  • /werft publish-to-npm

Preview Environment Options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@WVerlaek WVerlaek requested a review from a team February 2, 2023 14:03
@WVerlaek WVerlaek self-assigned this Feb 2, 2023
@github-actions github-actions bot added the team: workspace Issue belongs to the Workspace team label Feb 2, 2023
@WVerlaek
Copy link
Member Author

WVerlaek commented Feb 2, 2023

/werft run with-preview with-gce-vm with-wsman-mk2 with-large-vm

👍 started the job as gitpod-build-wv-mk2-mark-active.1
(with .werft/ from main)

@kylos101
Copy link
Contributor

kylos101 commented Feb 7, 2023

/werft run with-integration-tests=workspace with-large-vm=true

👍 started the job as gitpod-build-wv-mk2-mark-active.2
(with .werft/ from main)

Copy link
Contributor

@kylos101 kylos101 left a comment

Choose a reason for hiding this comment

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

Nice work, @WVerlaek, super clean to read and thorough. Just a couple thoughts, nothing blocking.

/hold

Feel free to remove the hold, either after handling the suggestion and nit, or not.

})
}
if err != nil {
log.WithError(err).WithFields(log.OWI("", "", workspaceID)).Warn("was unable to mark workspace properly")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion, non-blocking:
Include req.Closed and isMarkedClosed in the warning message, so that we know which path and error were encountered.

Type: string(workspacev1.WorkspaceConditionFirstUserActivity),
Status: metav1.ConditionTrue,
LastTransitionTime: metav1.NewTime(now),
Reason: "FirstActivity",
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, non-blocking:
Why not a reason of FirstUserActivity?

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch - i've changed the Reason to MarkActiveRequest in line with the Closed conditions above

Copy link
Contributor

@kylos101 kylos101 left a comment

Choose a reason for hiding this comment

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

👍

@kylos101
Copy link
Contributor

kylos101 commented Feb 7, 2023

/werft run with-preview with-gce-vm with-wsman-mk2 with-large-vm

👍 started the job as gitpod-build-wv-mk2-mark-active.3
(with .werft/ from main)

Copy link
Contributor

@kylos101 kylos101 left a comment

Choose a reason for hiding this comment

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

👍 had to rebuild so that I could test with mk2. So great to kubectl get workspaces. 😃

@WVerlaek
Copy link
Member Author

WVerlaek commented Feb 7, 2023

/unhold

@roboquat roboquat merged commit 971c3d6 into main Feb 7, 2023
@roboquat roboquat deleted the wv/mk2-mark-active branch February 7, 2023 09:51
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note-none size/L team: workspace Issue belongs to the Workspace team
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants