Skip to content

[WIP][fga] WorkspaceService: watchWorkspaceImageBuildLogsm getHeadlessLog, WorkspaceService.sendHeartBeat #18538

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 2 commits into from
Aug 18, 2023

Conversation

geropl
Copy link
Member

@geropl geropl commented Aug 17, 2023

Description

Ticks the FGA boxes for the following methods:

  • watchWorkspaceImageBuildLogs
  • getHeadlessLog
  • WorkspaceService.sendHeartBeat
Summary generated by Copilot

🤖 Generated by Copilot at b55df37

Refactored headless log and workspace image build logic to use WorkspaceService class. Moved constants and types to appropriate modules. Simplified and deprecated old methods in GitpodServerImpl. Added tests for WorkspaceService.

Related Issue(s)

Parts of EXP-207
Based on: #18535

How to test

  • signup as regular users 1 and 2, and enable centralizedPermissions for your userIDs on ConfigCat
  • user 1: start a workspace
  • user 1: open devtools and run await window._gp.gitpodService.server.sendHeartBeat("your-instance-id") ✔️
  • user 2: open devtools, and run await window._gp.gitpodService.server.sendHeartBeat("same-instance-id"): should fail with Error: Workspace xyz not found. ✔️

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /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
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

@geropl geropl changed the title [WIP][fga] WorkspaceService: watchWorkspaceImageBuildLogs + getHeadlessLog [WIP][fga] WorkspaceService: watchWorkspaceImageBuildLogsm getHeadlessLog, WorkspaceService.sendHeartBeat Aug 17, 2023
@geropl geropl marked this pull request as ready for review August 17, 2023 13:12
@geropl geropl requested a review from a team as a code owner August 17, 2023 13:12
Base automatically changed from gpl/fga-ws-misc-1 to main August 17, 2023 13:27
@roboquat roboquat added size/XXL and removed size/XL labels Aug 17, 2023
@svenefftinge
Copy link
Member

Can you rebase? It's not clear what changes belong to this PR.

@geropl
Copy link
Member Author

geropl commented Aug 18, 2023

Can you rebase? It's not clear what changes belong to this PR.

Done. Not sure why it did not rebase automatically...? Due to the squash?

Copy link
Member

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

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

I would have assumed the two log related methods would go into headless-log-service but it might not be so easy to draw the line between that and the workspace service, so let's go with this for now and see how we can improve this in future.
otherwise code LGTM

@geropl
Copy link
Member Author

geropl commented Aug 18, 2023

I would have assumed the two log related methods would go into headless-log-service

I was torn here as well. 👍

@geropl
Copy link
Member Author

geropl commented Aug 18, 2023

/unhold

@roboquat roboquat merged commit 5304d7a into main Aug 18, 2023
@roboquat roboquat deleted the gpl/fga-ws-misc-2 branch August 18, 2023 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants