-
Notifications
You must be signed in to change notification settings - Fork 92
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
VSC Compare function, not working with Favorites from Zowe Explorer #2522
VSC Compare function, not working with Favorites from Zowe Explorer #2522
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know!. |
Is this for 2.12.0? @JillieBeanSim @SanthoshiBoyina |
I am not opposed to it being included if the tests are fixed and the coverage is good in time, not seeing the coverage report yet with failing tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am seeing the diff editor open then when trying to save that I get the pop up to compare, I would assume one or the other happen but not both and the second right behind the first encounter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this bug fix @SanthoshiBoyina!
I'm running into the same situation as @JillieBeanSim - the side-by-side diff appears, but the dialog with Compare/Overwrite does not. However, this occurs for non-favorited nodes as well. I think this is because calls to willForceUpload
(in src/shared/utils.ts
) were removed with a previous PR, and this function was responsible for showing the dialog:
Gui.infoMessage(localize("saveFile.info.confirmUpload", "Would you like to overwrite the remote file?"), {
items: [localize("saveFile.overwriteConfirmation.yes", "Yes"), localize("saveFile.overwriteConfirmation.no", "No")],
})
(lines 284-286 in the mentioned file)
I'm wondering if we still want to use this willForceUpload
function somewhere? As a quick solution, if we add a similar dialog to the compareFileContent
function in src/shared/utils.ts
, or if we show a dialog before calling compareFileContent
, it should fix the issue.
I don't think we should be forceUploading anything unless the decision came from user. |
@JillieBeanSim I agree. My comment was mostly to bring awareness that the "conflict prompt" (showed before the diff) is no longer there. We used to call this Update: this dialog is the dialog I was referring to, sorry for the confusion. It was removed sometime between 2.8 and 2.9. |
ok, if we had a regression maybe the popup can be added/moved to the shared.utils.compareFileContent() method. this will cut down on introducing duplicate code to bring it back in other cases and fix the duplication here in this PR |
I'm not sure if we should override this option during that process, as it might interfere with other local files that the user is editing within VS Code. Unfortunately, we are unable to use VS Code's built-in conflict management directly with a remote system such as an LPAR. Currently, data sets and USS file contents are written to temp. files, so VS Code has no way of checking whether the document has a different e-tag than the mainframe. It calculates an e-tag for the temp. file on disk, but it's different from the one that the mainframe generates, so we have to handle the remote save separately from the temp. file. Until we switch to something like a FileSystemProvider (#2207), we can only check to see if conflict resolution is needed after saving the temp file. If there is a conflict, we un-save the temp. file and then present a similar dialog to VS Code's. |
Seems like the issue here with the compare editor not showing is because the |
Signed-off-by: Santhoshi Boyina <[email protected]>
Signed-off-by: Santhoshi Boyina <[email protected]>
Signed-off-by: Santhoshi Boyina <[email protected]>
Signed-off-by: Santhoshi Boyina <[email protected]>
Signed-off-by: Santhoshi Boyina <[email protected]>
Signed-off-by: Billie Simmons <[email protected]>
Signed-off-by: Billie Simmons <[email protected]>
Signed-off-by: Santhoshi Boyina <[email protected]>
Signed-off-by: Santhoshi Boyina <[email protected]>
3451334
to
aba4048
Compare
…-mismatch-not-triggering-compare
SonarCloud Quality Gate failed. 0 Bugs No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Proposed changes
The feature of Visual Studio Code to compare 2 files, if the file on the mainframe has changed in the meantime, doesn't work if you open a Member under Favorites. It overrides the file automatically. In this bug fix, we are able to trigger Compare function when ETAGs are mismatched.
Release Notes
Milestone:
Changelog:
Types of changes
What types of changes does your code introduce to Zowe Explorer?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This checklist will be used as reference for both the contributor and the revieweryarn workspace vscode-extension-for-zowe vscode:prepublish
has been executedFurther comments