* [server] First tests for WorkspaceFactory
* more tests
* [server] Add a bit more logging on workspace start
* [bbs] Update and add tests for BitBucketServerContextParser
* fix scrubbing
* Review suggestions (cleanup)
Co-authored-by: Filip Troníček <filip@gitpod.io>
---------
Co-authored-by: Filip Troníček <filip@gitpod.io>
* [json-rpc] Fix encoding of watchImageBuildLogs data to number[]
Because json-rpc can't handle complex objects like UInt8Array properly.
Conversion is done using "Array.from(UInt8Array)" and "new UInt8Array(data)"
* [dashboard] Fix "workspaceId is required" errors
* Review suggestions
Co-authored-by: Filip Troníček <filip@gitpod.io>
---------
Co-authored-by: Filip Troníček <filip@gitpod.io>
* [prebuilds, workspace-gc] Fix and add tests for not showing soft-deleted prebuilds anymore
* [workspace-gc] Add more explanatory comments
* Apply suggestions from code review
Co-authored-by: Filip Troníček <filip@gitpod.io>
---------
Co-authored-by: Filip Troníček <filip@gitpod.io>
* [supervisor] Make sure we read the last chunk of message when task is closed
* [server, dashboard] Prebuild logs: stream as UInt8Array instead of string, and make sure we send the last chunk before closing the response
* Make log buffer more efficient
Merging done with `TypedArray.prototype.set()` as suggested here:
https://stackoverflow.com/a/73074813/10199319
* [dashboard] PrebuildTaskTab: use hash(err.message) as toastId
* [server] prebuild logs: Only call res.end after a timeout, so clients can continue reading from the stream
* [dashboard] prebuild logs emitter: If we receive code "200", forward prefixChunk, and stop streaming
* fixup! [dashboard] PrebuildTaskTab: use hash(err.message) as toastId
---------
Co-authored-by: Filip Troníček <filip@gitpod.io>
* log it all
* fix failing image logs prebuild updates
* make sure we dispose of requests properly
* minor cleanup
* handle aborts gracefully
* Try using a tailing library for reading supervisor task logs
* Fix caching requests on Firefox
* Revert "Try using a tailing library for reading supervisor task logs"
This reverts commit fdc3183aa76cab7ac4976fb633d148482054722b.
* Change log order
Make sure we wait for the line to be written first
* Tweak abortion error message
* Remove extra log line
* Start prebuilds on started workspaces
* Fix circl dep
* move out to workspace creation
* Do it in the workspace service
* remove webhook tests
* remove webhook handling code
* Revert "remove webhook handling code"
This reverts commit d7c4550ec6b16091344607bfeee234b1f0e5705b.
* Anotate new setups with an `activity-based` activation strategy
* Update tests
* Alert banner
* add correct changelog path
* fix tests
* Remove code for registering prebuilds
* Still pass prebuild preconditions in order to run
* Re-add link to prebuild history of a repo
* Rename to trigger strategy and change project activity indicator
* redirect in the offline case
* [public-api] generate noise
* [server] Refactor Prebuild resolution to happen in a single place
* [dashboard, api] Show Prebuild details
* fixup! [server] Refactor Prebuild resolution to happen in a single place
* [bridge] Revive Prebuild QUEUED state: it's everything before running
* [server] Fix dead-end for streaming logs when starting too early
* [dashboard] Adds SHA + duration, fix re-rendering when prebuildId changes, and uses the new/old streaming logic
WIP because still has the "duplicate (sometimes triple!) logs" react re-rendering issue
* Prevent unnecessary re-renders of task output
* remove double-comment
* Duration display improvements
* Properly dismiss toasts and render durations
* Remove SHA from prebuild list
* Clean up and implement the `reset` event for workspace logs
* fix comment
* Tiny cleanup
---------
Co-authored-by: Filip Troníček <filip@gitpod.io>
* Use `__Host-` prefix for cookie
* Fix tests
* Remove domain from cookie
* Fix logout
* remove unused fn
* fix user logout properly
* [server] Make domain-only cookie work for GitHub oauth login
... by adding additional step so we can set the cookie for the base domain only
* test: fix by redirecting before callbacl/authorize
* [server] SessionHandler: Allow to login with both primary and secondary cookies
* [server] Clear 2ndary cookie on logout
* Fix filtering cookie values when primary cookie is empty
* Fix logouts
* Fix tests
---------
Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
* Fix dropped errors on available prebuilds
* Fix spacing
* Improve if statement readability
* Add a suite for `ws_manager_bridge_stopped_prebuild_statuses=true`
* comments
* Image builds in prebuilds UI
* update java gitignore
* Introduce a public API `watchWorkspaceImageBuildLogs`
* Use papi impl in prebuild logs
* Special case for missing prebuild tasks
* Add route handler for image build logs
* remove the papi method
* 404 if nothing was written
* remove unused converter changes
* update golden files
* Remove unused hook
* reset backoff when imagebuild logs are not ready
* Handle unavailable logs better
* Prebuild task tab component
* Fix tracking same URL
* conflict fixes
* Remove unused dep
* Update comment
* Clean up
* Simplify image build handling
It is no longer a special case
* Gracefully stop supervisor to fix abrupt connection termination for tasks (#19942)
* supervisor graceful stop
* Context consistency and server.shutdown
* Use a dedicated waitgroup for proper cleanup
* use the correct context
* Remove extra context wait
* remove terminal mux ctx changes
* remove debug logs
---------
Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
---------
Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
* Image builds in prebuilds UI
* update java gitignore
* Introduce a public API `watchWorkspaceImageBuildLogs`
* Use papi impl in prebuild logs
* Special case for missing prebuild tasks
* Add route handler for image build logs
* remove the papi method
* 404 if nothing was written
* remove unused converter changes
* update golden files
* Remove unused hook
* reset backoff when imagebuild logs are not ready
* Handle unavailable logs better
* revert adding unused dep
* Fix test
* Do not use `null`s and refactor disposables
* revert disposable changes
* Add gero's comments
Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
---------
Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
* [server] Drop ff api_validate_git_status_length
* [server] Drop ff guessWorkspaceRegion
* [server] Drop ff isPhoneVerificationEnabled
* [dashboard] Drop ff linkedinConnectionForOnboarding
* [dashboard] Drop newProjectIncrementalRepoSearchBBS
* [dashboard] Remove doRetryUserLoader feature flag
* [server, dashboard] Drop feature flag phoneVerificationByCall
* [public-api, dashboard] Remove personalAccessTokensEnabled feature flag
* [papi] Fix more tests
* Integrate reading from log files into Supervisor's `terminal.Listen`
* Try with GetOutput
* do not bubble down and fail
* remove debug stuff
* definitions and impl of `task.proto`
* codegen
* update endpoint
* Implement `ListenToOutput`
* Try with one API (🤞)
* stream beginning from where we left off
* Do not watch closed tasks
* move closing of worker channel
* simplify one-off reading
* codegen
* consolidate for loops, optimize watching
* remove extra line
It makes sense to group the offset definition with the function below it
* Gpl/ft/supervisor-listen-files (#19878)
* commit step 1
* 2nd
* Changes from joint code review
---------
Co-authored-by: Filip Troníček <filip@gitpod.io>
* Remove year bumps
---------
Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
* [yarn] Bump @grpc/grpc-js to 1.10.8 and @authzed/authzed-node to 0.15.0
* [server] SpiceDB: explicit re-try on UNAVAILABLE
We tried to configured this inside the SpiceDBClientProvider already, but somehow it still surfaced.
* [server, bridge] Configure "grpc.dns_min_time_between_resolutions_ms" to be 2s instead of 30s