-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[ws-daemon] Fix workspace location for log backup #18401
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.
👍
Tested we can snapshot and restore, too.
Tested prebuilds stream while prebuilding, can start from a prebuild, stop, and restart
Tested backup of a regular workspace, and related restart
@@ -345,9 +344,9 @@ func ensureCleanSlate(location string) error { | |||
return nil | |||
} | |||
|
|||
func (wso *DefaultWorkspaceOperations) uploadWorkspaceLogs(ctx context.Context, opts BackupOptions) (err error) { | |||
func (wso *DefaultWorkspaceOperations) uploadWorkspaceLogs(ctx context.Context, opts BackupOptions, location string) (err error) { |
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.
Any unit tests we need to add/update as part of this to ensure the regression doesn't happen again in the future?
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.
I've updated an existing integration test to check for uploaded logs. There's no unit tests nor is it easy to add one now that would catch this regression
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.
✔️
/unhold |
Description
Fix workspace location for logs backup. Use the session's location (path on daemon host) instead of the WorkspaceLocation of the CRD (comes from .gitpod.yml's workspaceLocation)
Summary generated by Copilot
🤖 Generated by Copilot at 4c9fa34
Refactor
uploadWorkspaceLogs
andBackupOptions
to use workspace location fromWorkspace
object. This reduces code complexity and redundancy.Related Issue(s)
Fixes ENG-50
How to test
Tested in a preview env, by creating a prebuild without this change (no logs in dashboard when viewing the completed prebuild), and then a prebuild after this change, which does show logs even after reloading the page.
Documentation
Preview status
gitpod:summary
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
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
. If enabled,with-preview
andwith-large-vm
will be enabled./hold