eclipse-che / che-theia

Eclipse Public License 2.0
125 stars 111 forks source link

Prevent overwriting the DevWorkspace in-cluster object by a flattened Devfile #1346

Closed azatsarynnyy closed 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?

it's a quick fix for https://github.com/eclipse/che/issues/21244

How to test this PR?

  1. Start a workspace via factory link che-url/#https://github.com/azatsarynnyy/che-editor-test
  2. Use ctrl+shift+p to Git: Add Remote... and enter e.g. https://github.com/golang/example.git
  3. Check the Devfile. 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 #1346 (1bcd7b7) into main (c299f59) will increase coverage by 3.79%. The diff coverage is 37.99%.

@@            Coverage Diff             @@
##             main    #1346      +/-   ##
==========================================
+ Coverage   32.78%   36.58%   +3.79%     
==========================================
  Files         290      330      +40     
  Lines        9885    11331    +1446     
  Branches     1457     1568     +111     
==========================================
+ Hits         3241     4145     +904     
- Misses       6641     7181     +540     
- 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...1bcd7b7. Read the comment docs.