feat: expose culling config on workspace list item#1204
Open
Bhavd33p wants to merge 3 commits into
Open
Conversation
cf1b401 to
a4983e9
Compare
…#1202) Surface WorkspaceKind culling settings (maxInactiveSeconds) directly on each WorkspaceListItem so the frontend can compute time-to-auto-pause without a separate WorkspaceKind fetch. - Add CullingConfig struct to WorkspaceKindInfo model - Populate it via buildCullingConfig() from the WorkspaceKind spec; returns nil when the kind is missing or culling is disabled - Update OpenAPI schema (swagger.json + docs.go) with the new type Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: [Bhavdeep Singh] <bhavdeep3singh@gmail.com>
…ubeflow#1202) - Add unit tests for buildCullingConfig() covering: nil WSK, missing UID, disabled culling, absent culling field, custom MaxInactiveSeconds, and defaulting to 86400 when MaxInactiveSeconds is unset - Extend workspaces handler test to assert cullingConfig is present in the JSON response when culling is enabled, and absent when the WorkspaceKind is missing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: [Bhavdeep Singh] <bhavdeep3singh@gmail.com>
a4983e9 to
1d02a76
Compare
…eflow#1202) - Add cullingConfig to data-contracts (maxInactiveSeconds) - Add cullingUtils with getMsUntilCull and formatTimeUntilCull helpers - Enhance WorkspaceDetailsActivity to show idle duration, auto-pause countdown, and last probe result with timestamp (conditional on culling config presence and running state) - Add unit tests for WorkspaceDetailsActivity (9 tests) Signed-off-by: [Bhavdeep Singh] <bhavdeep3singh@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Author
|
Hi @thaorell , Yes sure I will make two PRs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Partially implements #1202 (remaining ACs blocked on #867, #1123, #868)
This PR delivers the backend model change and frontend scaffolding for workspace activity status display. Full acceptance-criteria compliance requires the upstream controller and CRD issues (#867, #1123) to merge first.
What this PR does
Backend
CullingConfigstruct andcullingConfigfield toWorkspaceKindInfoAPI modelbuildCullingConfig()fromwsk.Spec.PodTemplate.Culling; returnsnilwhen the WorkspaceKind is missing or culling is disabled; defaultsmaxInactiveSecondsto86400when unsetswagger.json+docs.go) with the newworkspaces.CullingConfigtypeFrontend
data-contracts.tswithWorkspacesCullingConfigand updatedWorkspacesWorkspaceKindInfocullingUtils.tswithgetMsUntilCullandformatTimeUntilCullhelpersWorkspaceDetailsActivityto show idle duration, auto-pause countdown, and last probe result — all conditionally rendered (only when workspace is Running and cullingConfig is present)WorkspaceDetailsActivity(9 tests)What is approximated / deferred
formatDistanceToNowon Last Activity columnlastActivity + maxInactiveSeconds − now; exacteligibleAftertimestamp requires #867/#1123LastProbe: nilpending #867formatDistanceToNowthroughoutlastProbeis populated by the controller (#867)🛑 Depended on by: #1203 (frontend culling warning notifications)
🛑 Full implementation unblocked by: #867, #1123, #868
Test plan
buildCullingConfig(): nil WSK, missing UID, disabled culling, absent culling field, custom value, default value, absent Enabled fieldcullingConfigpresent in JSON when culling is enabledcullingConfigabsent when WorkspaceKind is missingWorkspaceDetailsActivity(with/without culling config, probe results, running vs paused state)