Skip to content
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

Factory loading flow refactoring #576

Merged
merged 5 commits into from
Aug 4, 2022
Merged

Conversation

akurinnoy
Copy link
Contributor

@akurinnoy akurinnoy commented Jul 14, 2022

What does this PR do?

This PR splits the whole factory loading functionality into separate components that represent individual steps of the loading flow: StepInitialize, StepFetchResources, StepFetchDevfile, StepCreateWorkspace, StepApplyResources, and StepApplyDevfile.

The other goal of this refactoring was to align factory and workspaces loading flows. It allowed delegating the two last steps of the factory flow (StepStartWorkspace and StepOpenWorkspace) to the workspace loader.

What issues does this PR fix or reference?

resolves eclipse-che/che#21449
fixes eclipse-che/che#21308

Is it tested? How?

The PR can be tested here: https://eclipse-che.apps.cluster-h8r9f.h8r9f.sandbox1016.opentlc.com/

@openshift-ci
Copy link

openshift-ci bot commented Jul 14, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@codecov
Copy link

codecov bot commented Jul 14, 2022

Codecov Report

Merging #576 (61abdb3) into main (2481aeb) will increase coverage by 2.20%.
The diff coverage is 89.75%.

@@            Coverage Diff             @@
##             main     #576      +/-   ##
==========================================
+ Coverage   56.01%   58.21%   +2.20%     
==========================================
  Files         221      244      +23     
  Lines        7477     7878     +401     
  Branches     1272     1286      +14     
==========================================
+ Hits         4188     4586     +398     
- Misses       3103     3116      +13     
+ Partials      186      176      -10     
Flag Coverage Δ
unittests 58.21% <89.75%> (+2.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...dashboard-frontend/src/Layout/Navigation/index.tsx 0.00% <0.00%> (ø)
packages/dashboard-frontend/src/Layout/index.tsx 0.00% <0.00%> (ø)
...-frontend/src/components/Loader/Progress/index.tsx 66.66% <ø> (ø)
...board-frontend/src/pages/UserPreferences/index.tsx 0.00% <0.00%> (ø)
...ontend/src/store/Workspaces/cheWorkspaces/index.ts 11.25% <ø> (ø)
...ontend/src/store/Workspaces/devWorkspaces/index.ts 9.16% <0.00%> (-0.04%) ⬇️
...oard-frontend/src/store/DevfileRegistries/index.ts 66.40% <16.66%> (-11.48%) ⬇️
...nd/src/store/FactoryResolver/normalizeDevfileV2.ts 15.38% <16.66%> (+5.86%) ⬆️
...hboard-frontend/src/services/registry/resources.ts 33.33% <33.33%> (ø)
...orkspace-client/devworkspace/devWorkspaceClient.ts 49.72% <33.33%> (-0.28%) ⬇️
... and 66 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@olexii4
Copy link
Contributor

olexii4 commented Jul 25, 2022

I have a stable bug with this solution - just try to stop the target workspace from a separate tab:
Знімок екрана 2022-07-25 о 17 20 35

@akurinnoy akurinnoy marked this pull request as ready for review August 1, 2022 08:48
@akurinnoy akurinnoy requested a review from ibuziuk August 1, 2022 08:48
@akurinnoy akurinnoy self-assigned this Aug 1, 2022
@olexii4
Copy link
Contributor

olexii4 commented Aug 1, 2022

"Restart" and "Open in Verbose mode" buttons are not working for the factory flow:

Знімок екрана 2022-08-01 о 15 11 24

@che-bot
Copy link
Contributor

che-bot commented Aug 3, 2022

Click here to review and test in web IDE: Contribute

@github-actions
Copy link

github-actions bot commented Aug 3, 2022

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-576

@eclipse-che eclipse-che deleted a comment from openshift-ci bot Aug 3, 2022
@eclipse-che eclipse-che deleted a comment from che-bot Aug 3, 2022
@eclipse-che eclipse-che deleted a comment from github-actions bot Aug 3, 2022
@eclipse-che eclipse-che deleted a comment from che-bot Aug 3, 2022
@eclipse-che eclipse-che deleted a comment from github-actions bot Aug 3, 2022
@eclipse-che eclipse-che deleted a comment from github-actions bot Aug 3, 2022
@eclipse-che eclipse-che deleted a comment from che-bot Aug 3, 2022
@eclipse-che eclipse-che deleted a comment from github-actions bot Aug 3, 2022
@eclipse-che eclipse-che deleted a comment from che-bot Aug 3, 2022
Copy link
Contributor

@olexii4 olexii4 left a comment

Choose a reason for hiding this comment

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

I tested this PR on both platforms(minikube and OpenShift). It works as expected.
Great job!

@eclipse-che eclipse-che deleted a comment from github-actions bot Aug 3, 2022
@openshift-ci openshift-ci bot added the lgtm label Aug 3, 2022
@eclipse-che eclipse-che deleted a comment from che-bot Aug 3, 2022
@eclipse-che eclipse-che deleted a comment from github-actions bot Aug 3, 2022
@eclipse-che eclipse-che deleted a comment from che-bot Aug 3, 2022
Copy link
Member

@ibuziuk ibuziuk left a comment

Choose a reason for hiding this comment

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

Great Job! great job
verified locally against dogfooding
It feel like the startup is much faster now

@openshift-ci
Copy link

openshift-ci bot commented Aug 3, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: akurinnoy, ibuziuk, olexii4

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

@akurinnoy akurinnoy merged commit f4b2988 into main Aug 4, 2022
@akurinnoy akurinnoy deleted the refactor-factory-loading branch August 4, 2022 06:31
@che-bot che-bot added this to the 7.52 milestone Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants