Closed phaumer closed 1 week ago
Attention: Patch coverage is 93.75000%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 92.97%. Comparing base (
e07e839
) to head (071ec81
). Report is 1 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
packages/zowe-explorer/src/utils/ProfilesUtils.ts | 93.75% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
📅 Suggested merge-by date: 11/21/2024
Proposed changes
On systems on which the default credentials manager is not available, such as Eclipse Che, activation would run into an endless loop of prompting the user to accept disabling secure credentials, reload, and the same dialog again. This was caused by code that when reading the setting.json file would rewrite it again and triggering the new file watcher to reload it again. Asynchronous behavior would also intermingle prompts to the user of broken team configuration files as it tried to load credentials using the non-existent credentials manager.
I rewrote the code to add an independent check for the default credentials manager. It tests if it can be loaded by trying
ProfilesCache.requireKeyring()
and only calling thesetupDefaultCredentialManager()
when it succeeds. Before, it was always calling it wasting cycles by catching more exceptions.I also changed the prompt to an info dialog (could discuss if it should be warning) with the Reload button only, to tell the user that credential management was disabled and they should consider installing a credentials manager (such as the K8s one). The reason is that the user really does not have a choice and prompting makes no difference. If they would select the No in the old dialog, it would just prompt them again after reload. Also storing the setting only makes sense for the global scope as the credentials manager would not be available for other workspaces either. So that button in the dialog is also not needed. Therefore, the only button left now is the Reload button. When clicked, the setting is stored, the settings.json is written, and the editor reloads without any additional prompts.
Release Notes
Milestone:
Changelog:
Types of changes
Checklist
General
yarn workspace vscode-extension-for-zowe vscode:prepublish
pnpm --filter vscode-extension-for-zowe vscode:prepublish
Code coverage
Deployment
Further comments