Skip to content

feat: enable WorkspaceKind update in FrontEnd#1093

Open
thaorell wants to merge 3 commits into
kubeflow:notebooks-v2from
thaorell:1085_enable_workspacekind_update
Open

feat: enable WorkspaceKind update in FrontEnd#1093
thaorell wants to merge 3 commits into
kubeflow:notebooks-v2from
thaorell:1085_enable_workspacekind_update

Conversation

@thaorell
Copy link
Copy Markdown

@thaorell thaorell commented May 12, 2026

closes: #1085

  • Convert form object to WorkspaceKindUpdate payload
  • Complete canSubmit logic in WorkspaceKindForm
  • Complete the edit submission handler
  • Error Handling
  • Remove TODOs
  • Add tests

thaorell added 2 commits May 11, 2026 13:43
Signed-off-by: Charles Thao <cthao@redhat.com>
Signed-off-by: Charles Thao <cthao@redhat.com>
@github-project-automation github-project-automation Bot moved this to Needs Triage in Kubeflow Notebooks May 12, 2026
@google-oss-prow google-oss-prow Bot added area/frontend area - related to frontend components area/v2 area - version - kubeflow notebooks v2 labels May 12, 2026
@thaorell thaorell changed the title 1085 enable workspacekind update feat: enable WorkspaceKind update in FrontEnd May 12, 2026
@thaorell thaorell force-pushed the 1085_enable_workspacekind_update branch from 3851627 to 20ea6c2 Compare May 12, 2026 14:55
Comment on lines +189 to +198
const updateResult = await safeApiCall(() =>
api.workspaceKinds.updateWorkspaceKind(routeParams?.kind || '', {
data: convertFormDataToUpdate(data, initialFormData as WorkspacekindsWorkspaceKindUpdate),
}),
);
if (!updateResult.ok) {
throw updateResult.errorEnvelope;
}
notification.success(`Workspace kind '${routeParams?.kind || ''}' updated successfully`);
navigate('workspaceKinds');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should this be inside an else for the if (mode === 'create')?

Comment on lines +257 to +258
requests: v.resources.requests as Record<string, never>,
limits: v.resources.limits as Record<string, never>,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please consider using V1ResourceList instead of Record<string, never>.


cy.wait('@updateWorkspaceKindError');

cy.get('[data-testid="workspace-kind-form-error"]').should('be.visible');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
cy.get('[data-testid="workspace-kind-form-error"]').should('be.visible');
cy.findByTestId('workspace-kind-form-error').should('be.visible');


cy.wait('@updateWorkspaceKindError');

cy.get('[data-testid="workspace-kind-form-error"]').should('be.visible');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This assertion could be encapsulated as a method in the editWorkspaceKind page object (e.g., assertFormErrorVisible()), rather than using a raw selector in the test file. This keeps selectors centralized and the test more readable.

@paulovmr
Copy link
Copy Markdown

/ok-to-test

@caponetto
Copy link
Copy Markdown

No further comments from my side other than Paulo's!

Signed-off-by: Charles Thao <cthao@redhat.com>
@thaorell thaorell force-pushed the 1085_enable_workspacekind_update branch from 20ea6c2 to a8e84ad Compare May 15, 2026 19:47
@google-oss-prow
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from paulovmr. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@thaorell thaorell requested a review from paulovmr May 15, 2026 19:47
@thaorell
Copy link
Copy Markdown
Author

@caponetto @paulovmr fixed the code up! Please re-review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/frontend area - related to frontend components area/v2 area - version - kubeflow notebooks v2 ok-to-test size/L

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

3 participants