* [ws-gc] Additional logging
* typo fix
* test update
* Workspace is active now if it just stopped, started or just got created
* Don't ever GC currently running workspaces
* Fix tests
* Fix tests
* No more async filter predicates
* More prevention logging
* Log all timestamps and don't update `lastActive` when `activeNow === true`
* even cooler timestamps
* Add instance id to log context
* Remove filtering for only non-running workspaces
* Provide a nicer image build failed message
* an error message that actually shows up
* Tweak error message
* Make env retrieval consistent in supervisor config
* Fix broken docs link in dashboard
* add proto
* codegen
* impl
* WIP UI
* make it work
* Make it work
* Empty state
* Update copies (thx Fernando!)
* Fix tip flexbox
* fix newline for role restriction empty state
* When arbitrary repos are restricted, don't suggest them
* Add `GetConfigurationWebhookActivityStatus` to proto
* codegen
* `GetConfigurationWebhookActivityStatus` impl
* give it a UI
* Revert trigger strategy on webhook event
* debug: enable webhooks again
* fix UI
* maybe fix build?
* Automatically convert to activity-based prebuilds
* 🤷♂️
* don't limit to a week when converting to activity-based
* Change copy
Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
* Less cyclic deps
* removing warning and add informative trigger strategy field
* fix sizing of prebuild trigger strategy info
* Revert "debug: enable webhooks again"
This reverts commit 1c47067734b9f19bbe7e72522eab387fec6022b5.
---------
Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
* Set hashed user ID cookie on JWT refresh for specific Gitpod domains
* refactor: Update setHashedUserIdCookie method in session handler for testing purposes
* attempt 2 to fix test
* refactor: Clear gitpod_hashed_user_id cookie after logout
* refactor: Update setHashedUserIdCookie method in analytics controller
This commit updates the setHashedUserIdCookie method in the analytics controller. The changes include:
- Adding a server-side implementation to determine the appropriate domain for setting the cookie based on the request hostname
* nit fix :)
Co-authored-by: Filip Troníček <filip@gitpod.io>
---------
Co-authored-by: Filip Troníček <filip@gitpod.io>
* proto update
Co-authored-by: Filip Troníček <filip@gitpod.io>
Co-authored-by: Gero Posmyk-Leinemann <32448529+geropl@users.noreply.github.com>
* dashboard + server
---------
Co-authored-by: Filip Troníček <filip@gitpod.io>
Co-authored-by: Gero Posmyk-Leinemann <32448529+geropl@users.noreply.github.com>
* [PAPI] Retry steams upon not receiving data for 10 seconds
* [PAPI] Retry steams upon not receiving data for 10 seconds (#20176)
* debug message
* Do not listen for ws updates globally and do not timeout for those calls
* Timeout signal as a getter
* use ff for disablement
* accesor fn => getter
* send empty initial data in papi for global ws watch requests
---------
Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
* Remove project context fetching
* limit projects returned from `ListSuggestedRepositories`
* Get rid of all projects query
* A WIP state
* Enhance search and normalize links
* Revert find project DB changes
* Make repo finder responsible for current selection
* remove debug
* Comments
* Re-use pagination flattening
* Query improvements
* limit pagination
* Add test about keeping length
* Fix test
* Fix repo ordering
* add normalize comment
* Organization timeout defaults proto
* Generated code
* Implement TimeoutSettings on the API layer
* Add timeout setting UI
* Actually change default workspace timeout based on org settings
workspace starter fixes
* Add alert for free plans
* denyUserTimeouts
* [dashboard] Fix check for "timeout config eligibility" by using BillingMode
* [server] Drop FF "disable_set_timeout"
* fix
* Move to team policies
* don't include `timeoutSettings` if not set
* [dashboard] TeamPolicies: Disable "save" if workspace timeouts are disabled
---------
Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
* [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>