-
Notifications
You must be signed in to change notification settings - Fork 94
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
Opening files. Download new copy or reuse local? #458
Comments
My opinion is that clicking the name of the data-set or USS file in the tree would download a fresh version of the file given that it isn't currently being edited in a VSCode frame. When I start editing a file, I would like to start with the latest version to reduce possible merge conflicts. However, we need to keep in mind the use case where someone is using the tree to navigate between files while editing. I would not want my local changes to be overridden in that case. Personally though, I do find it odd that the Explorer tries to use a local version even after the local version has been closed in the editor. |
Could you open the local file and concurrently do a diff check on the remote file and if a diff is found, notify the user? |
@Colin-Stone @jelaplan I analysed what we currently have for this problem, the situation is we already have implemented conflict solver which analyses ETags. The only case which should be covered looks like this:
So for (2) I think we need to pre-download the file before user actually sees it to override the saved content. But it should be done wisely taking into account the following rules:
Please, let me know about your opinion. |
Hi Stepan. I had a suggestion from a user today that if a they have closed a file that it should always warrant reloading it if opened again. The rationale being that if he wanted to look at it again in it's current state he would have left it open. It's sort of logical and creates less surprise I think. I would also apply that rule to +10MB rather than add too many caveats |
Hey @Colin-Stone, that's exactly what I tried to describe. Point (1) is just for warranting us that download will be done only when file was really changed on the mainframe side. |
If you have downloaded a big +10MB file and subsequently closed it. I would expect that by reopening it to get a new copy downloaded rather than the one I closed earlier. I think we may be lucky with machines that are pretty quick so I appeciate this may not be the case for everyone. Saving a local copy was done for performance reasons but I have aways felt it confuses more users than the extra time downloading annoys users. What does everyone else reckon?. |
@Colin-Stone I think we still can compare ETag, but we should definitely ask user if he wants to download such files. Not everyone has great internet connection and traffic might matter here. |
Also, as I promised I tried to formulate other connected enhancements which can be done before this one: #461 |
Considering again and unless we get further ideas I am happy if you go ahead with your original suggestions. |
@Colin-Stone I will assign it to myself then. |
Checking to see if the ETag changed sounds like a good idea. |
Was the classic approach of comparing timestamps to decide whether to download or not considered? |
Yes, we can use it. As I discussed with @stepanzharychevbroadcom, it would save us some unnecessary downloads.
I would see how we can benefit from this approach as well, as we would only use a For example, currently the merge conflict is generated as follows:
*this is generated by rewriting the content of the file on disk, without modifying the content of the file displayed by VS Code, then calling |
I believe that ETag will serve the same purpose as a timestamp comparison : ) |
@Alexandru-Dumitru - this problem has been solved numerous times using the timestamps (translates to - approach is proved in the field and a variety of real customers shops), and to your point that approach has not been resource intensive, however I don't know how it compares to ETag. So a quick POC would be worthwhile. |
@Alexandru-Dumitru is your PoC proposal only for the purpose of getting a more up-to-date local copy? It seems the |
@dkelosky I was thinking to look into the possibility to replace |
@Alexandru-Dumitru I don't think that
So I guess the best one would be still to extend Zowe CLI with ETag check and download only if local and remote don't match. |
@stepan Zharychev - while that is a legit scenario - how often does that happen in the real world? |
@venkatzhub - Agreed it may not happen often and worst case there is an unnecessary download. For upload ( In the client code with an Behind the scenes this starts a TSO address space. Depending on workload and policy, this could take some time, during which, the file could be altered via ISPF or some other means. A completed upload after this could overwrite content. Perhaps this would not occur often, but the consequences might be a bit more severe. What do you think? |
Going through https://tools.ietf.org/html/rfc7232 (HTTP conditional requests) and z/OSMF documentation and it seems that z/OSMF implements only strong validation with entity tags. There is no header to pass Last-Modified Dates to handle , meaning that all the validation logic should be taken care by us (the client). I am not objecting this, just wanted to highlight it. |
@dkelosky - the consequence of overwriting are indeed a bit more severe, however the chances are still low. But using ETag on Save is worthwhile to prevent any possible loss of data cases. |
Hi @Alexandru-Dumitru - sorry but I don't fully understand the link. z/OSMF implements strong validation but validation should be taken care of by the client? |
Sorry for the confusion created. I meant that z/OSMF only implements Etags to address conditional processing of HTTP requests. They have the option to supply and accept |
@stepanzharychevbroadcom is this fixed? if yes, can you please close the issue? |
@jellypuno It's still pending. So let's keep it for now. |
Hi, +1 for adding a preference " always download" with default "on". |
Hey @travatine, (and everyone on the thread) |
Adding a note that with Jobs. If it is Active, it should always have everything downloaded again |
We want to implement the following approach, following the poll: Add a Setting. Default: Always Download |
Thank you for raising this issue. |
This enhancement has had no community activity for 12 months. The issue also has less than 10 up-votes by the community. No action on this enhancement is targeted for the next 2 calendar quarters. Therefore, this enhancement is being closed. If you feel that this enhancement should continue to be available for community up-votes, you may reopen this issue. |
One concern that has been raised to me regarding the editor is that when opening a file, Zowe Explorer always tries to use an existing local version of a dataset or USS file rather than download a fresh version of the file. Although this is fine for files that don't change, if you are looking at a file that frequently changes it may be preferable to download every time.
We do provide the download icon to override the "already exists check" but apart from very big files is it a massive overhead to download each and everytime the user clicks on the file name in the explorer?.
Options are
The text was updated successfully, but these errors were encountered: