eclipse-che / che-theia

Eclipse Public License 2.0
125 stars 111 forks source link

[WIP] fix: Prevent overwriting the DevWorkspace in-cluster object by a flattened Devfile #1344

Open azatsarynnyy opened 2 years ago

azatsarynnyy commented 2 years ago

Signed-off-by: Artem Zatsarynnyi azatsary@redhat.com

What does this PR do?

The PR fixes the problem of overwriting the DevWorkspace in-cluster object by a flattened Devfile when adding/removing a project or changing a project's git configuration, e.g. adding another remote repository.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

fixes https://github.com/eclipse/che/issues/21244

How to test this PR?

  1. Start a workspace via factory link che-url/#https://github.com/che-samples/golang-example/tree/devfilev2
  2. Use ctrl+shift+p to Git: Add Remote... and enter e.g. https://github.com/golang/example.git
  3. Check the DevWorkspace. It should not be changed

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

Happy Path Channel

HAPPY_PATH_CHANNEL=stable

codecov[bot] commented 2 years ago

Codecov Report

Merging #1344 (3f6c66f) into main (c299f59) will increase coverage by 3.96%. The diff coverage is 37.99%.

@@            Coverage Diff             @@
##             main    #1344      +/-   ##
==========================================
+ Coverage   32.78%   36.75%   +3.96%     
==========================================
  Files         290      330      +40     
  Lines        9885    11333    +1448     
  Branches     1457     1568     +111     
==========================================
+ Hits         3241     4165     +924     
- Misses       6641     7163     +522     
- Partials        3        5       +2     
Impacted Files Coverage Δ
...theia-about/src/browser/about-che-theia-dialog.tsx 0.00% <0.00%> (ø)
...credentials/src/browser/che-credentials-service.ts 0.00% <0.00%> (ø)
...entials/src/browser/credentials-frontend-module.ts 0.00% <0.00%> (ø)
...eia-credentials/src/common/credentials-protocol.ts 0.00% <0.00%> (ø)
...eia-credentials/src/node/che-credentials-server.ts 0.00% <0.00%> (ø)
...s/src/node/che-theia-credentials-backend-module.ts 0.00% <0.00%> (ø)
...ashboard/src/browser/che-theia-dashboard-module.ts 0.00% <0.00%> (ø)
...ia-dashboard/src/browser/theia-dashboard-client.ts 0.00% <0.00%> (ø)
...rowser/src/browser/che-mini-browser-environment.ts 0.00% <0.00%> (ø)
...in-ext/src/browser/che-sidecar-file-system-main.ts 100.00% <ø> (ø)
... and 294 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 39511b7...3f6c66f. Read the comment docs.