Skip to content

test(ws): Add workspaces tests #188

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

Merged

Conversation

yehudit1987
Copy link

This PR resolve issue #142

@yehudit1987 yehudit1987 changed the title Fetch workspace list feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces Feb 3, 2025
@ederign
Copy link
Member

ederign commented Feb 5, 2025

@paulovmr would mind to take a look on this one?

@ederign
Copy link
Member

ederign commented Feb 5, 2025

/assign @paulovmr

@yehudit1987 yehudit1987 force-pushed the fetch-workspace-list branch 2 times, most recently from ebfda26 to 9ab07f3 Compare February 12, 2025 13:34
@thesuperzapper
Copy link
Member

/ok-to-test

@thesuperzapper thesuperzapper changed the title feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): stop using mocks for frontend get workspaces Feb 27, 2025
@yehudit1987 yehudit1987 marked this pull request as draft February 27, 2025 16:31
@thesuperzapper
Copy link
Member

@yehudit1987 this can be rebased now that #213 is merged.

The backend changes from this PR should no longer be needed, but the frontend will need to understand the new "services" part of the API from that PR.

@yehudit1987 yehudit1987 force-pushed the fetch-workspace-list branch from c15e8e5 to 6814730 Compare March 9, 2025 07:23
@yehudit1987 yehudit1987 marked this pull request as ready for review March 12, 2025 12:36
Copy link

@paulovmr paulovmr left a comment

Choose a reason for hiding this comment

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

Hi @yehudit1987 , thanks for the PR! I've made a partial review, and will test it as well after the backend PR is merged and this one is rebased. I've left a few comments inline. Also:

  • A .gitignore entry was added and already merged in the notebooks-v2 branch to avoid the workspaces/frontend/src/__tests__/cypress/cypress/downloads/downloads.htm file to be versioned. Your PR is trying to add the file. My guess is that because when you opened the PR the .gitignore entry did not exist, the download.htm file was already added to your commit, so you might need to remove it manually in your branch.

podConfigDisplayName: string,
pvcName: string,
): {
name: string;

Choose a reason for hiding this comment

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

Could this return type be replaced by the Workspace type directly?

@@ -16,7 +16,7 @@ type WorkspaceDetailsActivityProps = {
export const WorkspaceDetailsActivity: React.FunctionComponent<WorkspaceDetailsActivityProps> = ({
workspace,
}) => {
const { activity, pauseTime, pendingRestart } = workspace.status;
const { activity, pausedTime: pauseTime, pendingRestart } = workspace;

Choose a reason for hiding this comment

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

Just to keep the consistency, please consider keeping all usages as pausedTime (also label and usage in lines 38 to 40).

Suggested change
const { activity, pausedTime: pauseTime, pendingRestart } = workspace;
const { activity, pausedTime, pendingRestart } = workspace;

</DescriptionListGroup>
<Divider />
<DescriptionListGroup>
<DescriptionListTerm>Labels</DescriptionListTerm>
<DescriptionListDescription>
{workspace.podTemplate.podMetadata.labels.join(', ')}
{workspace.podTemplate.options.podConfig.current.labels.length > 0

Choose a reason for hiding this comment

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

I believe we could leverage PatternFly Label component to better list the labels here. Since it is out of the scope of this PR, I've created a different issue for it: #232

</DescriptionListDescription>
</DescriptionListGroup>
<Divider />
<DescriptionListGroup>
<DescriptionListTerm>Pod config</DescriptionListTerm>
<DescriptionListDescription>{workspace.options.podConfig}</DescriptionListDescription>
<DescriptionListDescription>
{JSON.stringify(workspace.podTemplate.options.podConfig, null, 2)}

Choose a reason for hiding this comment

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

Suggested change
{JSON.stringify(workspace.podTemplate.options.podConfig, null, 2)}
{workspace.podTemplate.options.podConfig.current.displayName}

@yehudit1987 yehudit1987 force-pushed the fetch-workspace-list branch from 61c4593 to bfade6d Compare March 17, 2025 06:34
Copy link

@paulovmr paulovmr left a comment

Choose a reason for hiding this comment

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

/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label Mar 17, 2025
Copy link
Member

@ederign ederign left a comment

Choose a reason for hiding this comment

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

@paulovmr @yehudit1987 my suggestion is to hold this until we:

  • Have a better controller installation/setup with feat: setup tilt for easier local controller development #220
  • Figure out where we should mock. I suggest we discuss mocking this on BFF layer to avoid dependency on controller for front-end development. After we finish a feature we can always test it integrated (ideally with automated tests and at least with tilt)

@ederign
Copy link
Member

ederign commented Mar 19, 2025

/hold

@yehudit1987 yehudit1987 changed the title feat(ws): stop using mocks for frontend get workspaces feat(ws): Add workspaces tests May 20, 2025
@yehudit1987 yehudit1987 force-pushed the fetch-workspace-list branch 4 times, most recently from 04ba978 to 5f22655 Compare May 20, 2025 13:25
@yehudit1987 yehudit1987 marked this pull request as ready for review May 20, 2025 13:29
Copy link

@caponetto caponetto left a comment

Choose a reason for hiding this comment

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

@yehudit1987 I left one comment on the code, and I think we are good to go.

In addition:

  • Could you please use the test prefix for this PR instead of feat?
  • Could you please squash the 12 commits into a single one?

Thank you!

@@ -7756,6 +7756,7 @@
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz",
"integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==",
"dev": true,
"license": "MIT",

Choose a reason for hiding this comment

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

Was this change required? It seems unnecessary for this PR.

@yehudit1987 yehudit1987 force-pushed the fetch-workspace-list branch from 5f22655 to f27f745 Compare May 21, 2025 06:26
@yehudit1987 yehudit1987 changed the title feat(ws): Add workspaces tests test(ws): Add workspaces tests May 21, 2025
@caponetto
Copy link

/lgtm

@paulovmr there are some flaky tests on this PR that we're turning off for now. In a follow-up PR, we need to upload cypress screenshots and videos to the CI output so we're able to revisit these tests and verify what's going on.

Copy link

@caponetto: changing LGTM is restricted to collaborators

In response to this:

/lgtm

@paulovmr there are some flaky tests on this PR that we're turning off for now. In a follow-up PR, we need to upload cypress screenshots and videos to the CI output so we're able to revisit these tests and verify what's going on.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Signed-off-by: Yehudit Kerido <[email protected]>

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

Signed-off-by: Yehudit Kerido <[email protected]>

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

Signed-off-by: Yehudit Kerido <[email protected]>

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

Signed-off-by: Yehudit Kerido <[email protected]>

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

Signed-off-by: Yehudit Kerido <[email protected]>

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

Signed-off-by: Yehudit Kerido <[email protected]>

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

Signed-off-by: Yehudit Kerido <[email protected]>

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

Signed-off-by: Yehudit Kerido <[email protected]>

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

Signed-off-by: Yehudit Kerido <[email protected]>

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

Signed-off-by: Yehudit Kerido <[email protected]>

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

Signed-off-by: Yehudit Kerido <[email protected]>

fix cypress tests

Signed-off-by: Yehudit Kerido <[email protected]>
@yehudit1987 yehudit1987 force-pushed the fetch-workspace-list branch from f27f745 to 88fab63 Compare May 21, 2025 13:27
Copy link

@paulovmr paulovmr left a comment

Choose a reason for hiding this comment

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

/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label May 21, 2025
@ederign
Copy link
Member

ederign commented May 21, 2025

/lgtm
/approve

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ederign

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

The pull request process is described here

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

@paulovmr
Copy link

/unhold

@google-oss-prow google-oss-prow bot merged commit 8737db2 into kubeflow:notebooks-v2 May 22, 2025
7 checks passed
@github-project-automation github-project-automation bot moved this from Needs Triage to Done in Kubeflow Notebooks May 22, 2025
@yehudit1987 yehudit1987 deleted the fetch-workspace-list branch May 27, 2025 05:41
mkoushni pushed a commit to mkoushni/notebooks that referenced this pull request May 28, 2025
feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

fix cypress tests

Signed-off-by: Yehudit Kerido <[email protected]>
Co-authored-by: Yehudit Kerido <[email protected]>
Signed-off-by: CI Bot <[email protected]>
mkoushni pushed a commit to mkoushni/notebooks that referenced this pull request May 28, 2025
feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces



feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces



feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces



feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces



feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces



feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces



feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces



feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces



feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces



feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces



fix cypress tests

Signed-off-by: Yehudit Kerido <[email protected]>
Co-authored-by: Yehudit Kerido <[email protected]>
mkoushni pushed a commit to mkoushni/notebooks that referenced this pull request Jun 4, 2025
feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces

fix cypress tests

Signed-off-by: Yehudit Kerido <[email protected]>
Co-authored-by: Yehudit Kerido <[email protected]>
Signed-off-by: CI Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

5 participants