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

fix(v2): Toggle off Auto Save and warn user after save error #3359

Merged
merged 11 commits into from
Dec 16, 2024

Conversation

traeok
Copy link
Member

@traeok traeok commented Dec 11, 2024

Proposed changes

Fixes #2406, #2627

Error message shown when Auto Save is enabled:
image

How to test

  • Locate a UNIX file or data set with insufficient write permissions.
  • Open this resource in Zowe Explorer.
  • Enable Auto Save and make changes to the file
  • Notice that when the save error occurs, the document is marked unsaved and no more save requests are made. Notice that Auto Save is also disabled.
    • Try enabling the Auto Save feature using either the "Enable Auto Save" option in this dialog, or by using the Command Palette -> "Files: Toggle Auto Save". The process will repeat at this point, but the save request will only happen once.

When Auto Save is used with v2.18.0, save requests were continuously added for each data set and file that failed to save. Even if you would try to close the file or dismiss the error, another request would be added, and a reload of VS Code was necessary to stop the loop.

Release Notes

Milestone: 2.18.1

Changelog:

  • Fixed an issue when Auto Save is enabled where a failed UNIX file or data set save operation resulted in an indefinite loop of additional save requests. #2406, #2627

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds or improves functionality)
  • Breaking change (a change that would cause existing functionality to not work as expected)
  • Documentation (Markdown, README updates)
  • Other (please specify above in "Proposed changes" section)

Checklist

General

  • I have read the CONTRIBUTOR GUIDANCE wiki
  • All PR dependencies have been merged and published (if applicable)
  • A GIF or screenshot is included in the PR for visual changes
  • The pre-publish command has been executed:
    • v2 and below: yarn workspace vscode-extension-for-zowe vscode:prepublish
    • v3: pnpm --filter vscode-extension-for-zowe vscode:prepublish

Code coverage

  • There is coverage for the code that I have added
  • I have added new test cases and they are passing
  • I have manually tested the changes

Deployment

  • I have added developer documentation (if applicable)
  • Documentation should be added to Zowe Docs
    • If you're an outside contributor, please post in the #zowe-doc Slack channel to coordinate documentation.
    • Otherwise, please check with the rest of the squad about any needed documentation before merging.
  • These changes may need ported to the appropriate branches (list here):

@traeok traeok marked this pull request as ready for review December 12, 2024 14:19
Copy link

📅 Suggested merge-by date: 12/26/2024

JillieBeanSim
JillieBeanSim previously approved these changes Dec 12, 2024
Copy link
Contributor

@JillieBeanSim JillieBeanSim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks for this fix @traeok

JillieBeanSim
JillieBeanSim previously approved these changes Dec 12, 2024
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.41%. Comparing base (d7f1903) to head (ace4aef).
Report is 1 commits behind head on v2-lts.

Additional details and impacted files
@@            Coverage Diff             @@
##           v2-lts    #3359      +/-   ##
==========================================
+ Coverage   93.39%   93.41%   +0.01%     
==========================================
  Files         105      105              
  Lines       11133    11161      +28     
  Branches     2465     2348     -117     
==========================================
+ Hits        10398    10426      +28     
  Misses        734      734              
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

zFernand0
zFernand0 previously approved these changes Dec 13, 2024
Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was a bit confused when I saw the localize function but then realized this was for V2 😋

LGTM! 🙏

Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still LGTM! 😋
thanks for adding the extra test 🙏

Copy link
Contributor

@JillieBeanSim JillieBeanSim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still LGTM! thanks @traeok

@JillieBeanSim JillieBeanSim merged commit cf55928 into v2-lts Dec 16, 2024
18 checks passed
@JillieBeanSim JillieBeanSim deleted the fix/v2/autosave-loop branch December 16, 2024 15:12
@traeok traeok linked an issue Dec 18, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Closed
3 participants