Skip to content

feat(ws): stop using mocks for frontend get workspaces #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

Open
wants to merge 13 commits into
base: notebooks-v2
Choose a base branch
from

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
Yehudit Kerido added 2 commits March 17, 2025 11:58
Signed-off-by: Yehudit Kerido <[email protected]>
Signed-off-by: Yehudit Kerido <[email protected]>
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

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found 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

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

@ederign
Copy link
Member

ederign commented May 6, 2025

@paulovmr @yehudit1987 if this is still planned, would mind to rebase it?

@caponetto
Copy link

Please hold this merge until the PR for #269 is integrated, if possible. We have many overlapping changes.

@yehudit1987
Copy link
Author

yehudit1987 commented May 7, 2025

@paulovmr @yehudit1987 if this is still planned, would mind to rebase it?

@ederign Are we planning to merge that?, rebase involves reviewing so many conflicts so I prefer to do it once and only when it's relevant.

@paulovmr
Copy link

paulovmr commented May 7, 2025

@yehudit1987 Let's wait for a little bit. Once all PRs that will conflict with yours are merged we can do the rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Triage
Development

Successfully merging this pull request may close these issues.

5 participants