Fix two issues around uninstalling IPM - #1235
Open
isc-dchui wants to merge 1 commit into
Open
Conversation
isc-dchui
requested review from
isc-cborbonm,
isc-egabhart,
isc-eneil,
isc-jili,
isc-jlechtne,
isc-kiyer,
isc-pbarton and
isc-tleavitt
as code owners
September 2, 2026 19:11
isc-kiyer
requested changes
Sep 4, 2026
isc-kiyer
left a comment
Collaborator
There was a problem hiding this comment.
@isc-dchui few small notes
| // Check if other modules are installed | ||
| set hasModules = 0 | ||
| // List the other modules that a full cleanup would remove | ||
| set rs = ##class(%SQL.Statement).%ExecDirect(, |
Collaborator
There was a problem hiding this comment.
Should have $$$ThrowSQLIfError(rs.%SQLCODE,rs.%Message)
| write !,"This is required for downgrading IPM. [y/N]: " | ||
| read fullCleanupResponse | ||
| set tParams("Clean","FullCleanup") = $case($zconvert(fullCleanupResponse,"L"),"y":1,"yes":1,:0) | ||
| set hasModules = 0 |
Collaborator
There was a problem hiding this comment.
You can check this by checking %SQLCODE. if its 100, then there were no records returned
| read fullCleanupResponse | ||
| set tParams("Clean","FullCleanup") = $case($zconvert(fullCleanupResponse,"L"),"y":1,"yes":1,:0) | ||
| set hasModules = 0 | ||
| while rs.%Next() { |
Collaborator
There was a problem hiding this comment.
Should check status here and $$$ThrowOnError(sc) outside the loop
| if 'tForce { | ||
| // Dialog: Ask about full cleanup (downgrade scenario) | ||
| write !,"Do you want to fully remove all modules and IPM metadata (except history log)?" | ||
| write !,"This is required for downgrading IPM. [y/N]: " |
Collaborator
There was a problem hiding this comment.
Use %Library.Prompt here so default answer can be provided (default should be no?)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Testing
Manually tested by trying to uninstall IPM without another module installed and the prompt to delete metadata appeared. Reinstalling IPM in the same process also allowed me to use it without being kicked out of the shell after every command
Checklist
mainbranch rebased or merged.zpm test -only) and integration tests (zpm verify -only) pass.