-
Notifications
You must be signed in to change notification settings - Fork 43
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
base: notebooks-v2
Are you sure you want to change the base?
feat(ws): stop using mocks for frontend get workspaces #188
Conversation
5feeff6
to
6aac5ce
Compare
9ba35a6
to
d356044
Compare
@paulovmr would mind to take a look on this one? |
/assign @paulovmr |
ebfda26
to
9ab07f3
Compare
/ok-to-test |
@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. |
c15e8e5
to
6814730
Compare
There was a problem hiding this 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 thenotebooks-v2
branch to avoid theworkspaces/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, thedownload.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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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).
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 |
There was a problem hiding this comment.
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)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{JSON.stringify(workspace.podTemplate.options.podConfig, null, 2)} | |
{workspace.podTemplate.options.podConfig.current.displayName} |
Signed-off-by: Yehudit Kerido <[email protected]>
Signed-off-by: Yehudit Kerido <[email protected]>
Signed-off-by: Yehudit Kerido <[email protected]>
Signed-off-by: Yehudit Kerido <[email protected]>
Signed-off-by: Yehudit Kerido <[email protected]>
Signed-off-by: Yehudit Kerido <[email protected]>
Signed-off-by: Yehudit Kerido <[email protected]>
Signed-off-by: Yehudit Kerido <[email protected]>
Signed-off-by: Yehudit Kerido <[email protected]>
Signed-off-by: Yehudit Kerido <[email protected]>
Signed-off-by: Yehudit Kerido <[email protected]>
61c4593
to
bfade6d
Compare
Signed-off-by: Yehudit Kerido <[email protected]>
Signed-off-by: Yehudit Kerido <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: paulovmr 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 |
There was a problem hiding this 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)
/hold |
@paulovmr @yehudit1987 if this is still planned, would mind to rebase it? |
Please hold this merge until the PR for #269 is integrated, if possible. We have many overlapping changes. |
@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. |
@yehudit1987 Let's wait for a little bit. Once all PRs that will conflict with yours are merged we can do the rebase. |
This PR resolve issue #142