-
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 #2549
VSC Compare function, not working with Favorites from Zowe Explorer #2549
Conversation
Signed-off-by: Santhoshi Boyina <[email protected]>
Signed-off-by: Santhoshi Boyina <[email protected]>
Codecov ReportAttention:
📢 Thoughts on this report? Let us know! |
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.
Hi @SanthoshiBoyina, thanks for working on resolving conflict management - looks great so far.
After a discussion w/ @t1m0thyj, I do have a concern regarding the Data Set tree. On line 523 in the openPS
function (dataset/actions.ts
), I noticed that we set the e-tag regardless of its value in the response:
const response = await responsePromise;
node.setEtag(response?.apiResponse?.etag);
statusMsg.dispose();
If a response does not return an e-tag, it will set the e-tag to null, which will cause the first save to bypass the e-tag mismatch on the mainframe.
To avoid this, we'll need to add a check to see if response?.apiResponse?.etag
is a valid value before calling node.setEtag
.
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.
Agree with @traeok's comment, here are steps for how I reproduced the issue:
- Open a data set in preview mode by single-clicking on it in the tree
- Make changes to the data set on the mainframe
- Make changes to the data set locally in ZE
This will switch the editor from preview mode (title italicized) to edit mode 👍
It will also reset the etag for the current node to null which we don't want 😢 - Save the changes and notice that no conflict is detected
IMO we should fix this before 2.12.1 to avoid risk of data loss, potentially in this PR since its related to compare functionality? I also don't mind opening a separate PR to fix it if preferred 🙂
Based on discussion at standup, I'll open another PR against this one with the fix for etag being set to null 🙂 Edit: Opened #2551 |
Signed-off-by: Timothy Johnson <[email protected]>
Signed-off-by: Timothy Johnson <[email protected]>
Signed-off-by: Timothy Johnson <[email protected]>
Signed-off-by: Timothy Johnson <[email protected]>
Fix undefined etag for dataset nodes
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.
LGTM! thanks for the fix
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 @SanthoshiBoyina !
Only thing I see is some code coverage missing but not sure if this will be an issue since I know we want to get the release out?
Signed-off-by: Billie Simmons <[email protected]>
9c78cd4
Signed-off-by: Billie Simmons <[email protected]>
Signed-off-by: Billie Simmons <[email protected]>
Signed-off-by: Billie Simmons <[email protected]>
Signed-off-by: Billie Simmons <[email protected]>
SonarCloud Quality Gate failed. 0 Bugs No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
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.
LGTM, thanks @SanthoshiBoyina and @JillieBeanSim!
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.
Nice catch @t1m0thyj !
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