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

ZPM fails to load package after switching to another namespace #433

Closed
isc-tstolker opened this issue Nov 20, 2023 · 6 comments
Closed

ZPM fails to load package after switching to another namespace #433

isc-tstolker opened this issue Nov 20, 2023 · 6 comments

Comments

@isc-tstolker
Copy link

Last Friday, November 17, 2023, we experienced a new issue in our project on 3 different laptops,

In short, when I switch to my target namespace and the load my package in developer mode, it does not continue after loading:

zn "FHIR"
zpm "load /home/irisowner/irisdev/ -v":1:1

This is the output:
92.93 Load started on 11/20/2023 11:19:05
92.93 Loading file /home/irisowner/irisdev/module.xml as xml
93.14 Imported document: samples-customizing-your-fhir-repo.ZPM
93.14 Load finished successfully.
93.42
93.42 ERROR! Object open failed because 'Name' key value of 'samples-customizing-your-fhir-repo' was not found

When I do not switch the namespace (so stay in "USER") the package loading continues.

This originally happened in a project we are actively developing, so we expected the issue to be at our end.
Later I found out that this issues actually occurs also for a project that hasn't been changed for a while, which is in https://github.com/intersystems/SamplesCustomizingYourFHIRRepo

@isc-tstolker isc-tstolker changed the title ZPM no longer loads package after switching to another namespace ZPM fails to load package after switching to another namespace Nov 20, 2023
@daimor
Copy link
Collaborator

daimor commented Nov 20, 2023

Looks like %IPM already made his way to the kit, and I have no idea now what's actually happening there now
So, probably guys behind %IPM may help with it

@daimor
Copy link
Collaborator

daimor commented Nov 20, 2023

The new version of %IPM part of IRIS for Health, and it's incompatible with latest release of %ZPM
In USER namespace, only original %ZPM works, that's why all good there
in HSLIB connected namespace, now %IPM available, and it reuses some logic from %ZPM, and makes it incompatible

@isc-tstolker
Copy link
Author

Thanks, @daimor, I hope indeed someone from the product team can comment...

@isc-tleavitt
Copy link
Contributor

To provide an update, there is ongoing internal discussion and investigation on this issue. No recommendations yet, but they're coming soon.

@isc-tleavitt
Copy link
Contributor

isc-tleavitt commented Dec 12, 2023

Here's the minimally invasive workaround:

To enable use of the InterSystems Package Manager (from GitHub / the Open Exchange) in an InterSystems IRIS for Health™ 2023.3 or HealthShare® Health Connect 2023.3 interoperability-enabled namespace, run the following ObjectScript commands in that namespace:

do ##class(%ZPM.PackageManager.Developer.Utils).AddGlobalMapping($namespace,"oddStudioDocument:(BEGIN):(""%ZP"")","IRISLIB")
do ##class(%ZPM.PackageManager.Developer.Utils).AddGlobalMapping($namespace,"oddStudioDocument:(""%ZP""):(""A"")","IRISSYS")
do ##class(%ZPM.PackageManager.Developer.Utils).AddGlobalMapping($namespace,"oddStudioDocument:(""Ens""):(""Ent"")","ENSLIB")

This is equivalent to the following iris.cpf changes – for example, given namespace IPMTEST:

[Map.IPMTEST]
Global_oddStudioDocument=IPMTEST
Global_oddStudioDocument(BEGIN):("%ZP")=IRISLIB
Global_oddStudioDocument("%ZP"):("A")=IRISSYS
Global_oddStudioDocument("Ens"):("Ent")=ENSLIB

These mappings should be removed after the next upgrade; the issue is expected to be resolved in the next release.

@isc-tleavitt
Copy link
Contributor

These issues have been resolved in IRIS 2024.1. We're not planning to do anything about them in IPM itself.

@isc-tleavitt isc-tleavitt closed this as not planned Won't fix, can't repro, duplicate, stale Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants