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

Wrong behavior in the editor when perform git pull after delete files #11648

Closed
artaleks9 opened this issue Oct 17, 2018 · 0 comments
Closed
Assignees
Labels
e2e-test/failure Issues that is related to a test failures reported by our CI platform and our QE. kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@artaleks9
Copy link
Contributor

artaleks9 commented Oct 17, 2018

Description

Reproduction Steps:

  • Open the IDE and import a project (e.g. https://github.com/artaleks9/Spoon-Knife.git)
  • Expand the project and open in the editor all five files
  • Go to GitHub side and delete three files from the plan-files folder
  • Go to back the IDE and perform git pull

Expected behavior:

  • the editor should be updated
  • all tabs of the deleted files should disappear from the editor

Observed behavior:

  • one or two tabs of the deleted files are present in the editor
  • after refreshing the browser page the deleted
    tabs disappear,
    but in the browser console there is an error

Che version: 6.13.0
OS and version: Fedora 28
Che install: docker/ocp
Docker version: 17.09
API docker version: 1.32

Additional information:

screenshots:

after git pull
git-pull-test-2

after refresh browser page
git-pull-test-1

github page
git-pull-test-3

@artaleks9 artaleks9 added kind/bug Outline of a bug - must adhere to the bug report template. team/ide severity/P2 Has a minor but important impact to the usage or development of the system. e2e-test/failure Issues that is related to a test failures reported by our CI platform and our QE. labels Oct 17, 2018
@vparfonov vparfonov added severity/P1 Has a major impact to usage or development of the system. and removed severity/P2 Has a minor but important impact to the usage or development of the system. labels Jan 4, 2019
vzhukovs added a commit that referenced this issue Jan 24, 2019
### What does this PR do?
This changes proposal adds fix for the problem related to sequential handling file watcher events. The problem is in mechanism of receiving events: https://github.com/eclipse/che/blob/master/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/impl/FileWatcherService.java#L272. We try to get events and continue work with them but we don't check that in this moment we can receive additional events.

Use case to reproduce such problem: use git repository with the following structure:
```
.
├── dir
│   ├── file1
│   ├── file2
│   └── file3
└── other.file
```
clone this repo into che and make outside operation to make the following structure:
```
.
├── dir
└── other.file
```
file watcher detects changes and we call https://github.com/eclipse/che/blob/master/wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/watcher/server/impl/FileWatcherService.java#L272 we receive two events about delete `file1` and `dir`, but in a moment we receive rest two events that is not handled for `file2` and `file3`.

Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com>

### What issues does this PR fix or reference?
#11648 
<!-- #### Changelog -->
<!-- The changelog will be pulled from the PR's title. 
     Please provide a clear and meaningful title to the PR and don't include issue number -->


#### Release Notes
<!-- markdown to be included in marketing announcement - N/A for bugs -->
N/A


#### Docs PR
<!-- Please add a matching PR to [the docs repo](https://github.com/eclipse/che-docs) and link that PR to this issue.
Both will be merged at the same time. -->
N/A
@vzhukovs vzhukovs added this to the 6.18.0 milestone Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e-test/failure Issues that is related to a test failures reported by our CI platform and our QE. kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

3 participants