Stream: hapi
Topic: Recovering from bad IG load
Ole Hedegaard (Mar 07 2022 at 07:50):
Hi,
I need advise on how to recover from a failed IG update in HAPI 5.6.2. We have had several IG versions over time, which have been loaded in .tgz format using the PackageInstallerSvcImpl. We have the issue with two different IGs atm, so it may be a general issue. It is not an option to wipe our database (Postgres), as it contains previously create resources.
We don't see any errors while updating the new IG with PackageInstallerSvcImpl, but after the update, the validation of new resources fails with strange errors, that don't happen when we load the IG to a clean database. So there seems to be an issue with the IG update.
Our current "false errors" are of this kind:
The value provided ('message') is not in the value set <valueset URL> (<valueset URL>), and a code is required from this value set) (error message = Unable to validate code null#message - Unknown code null#message. Code validation occurred using a ValueSet expansion that was pre-calculated at 2022-01-19T10:36:55.224+00:00 (40 days ago))
The value provided ('urn:oid:1.2.208.176.1.2') is not in the value set <valueset URL> (<valueset URL>), and a code is required from this value set) (error message = Unable to validate code null#urn:oid:1.2.208.176.1.2 - Unknown code null#urn:oid:1.2.208.176.1.2. Code validation occurred using a ValueSet expansion that was pre-calculated at 2022-02-08T13:55:22.917+01:00 (24 days ago))
So my questions are:
- First and foremost: Can somebody provide a recipe for cleaning up a bad IG load?
- Has anyone experienced errors of this kind, and a possible solution?
Any hints are appreciated!
Thanks,
Ole Hedegaard
Patrick Werner (Mar 07 2022 at 18:08):
Hi Ole,
unfortunately the jpastarter project doesn't expose a mechanism to do so. There is internal hapi code for deleting loaded packages, but these are reachable by REST. afaik
You could add this to the jpastarter project, eventually just a quick&dirty mod to trigger ig deletion hardcoded. Would be nice to have a (REST) Interface, or config option to do so in the future.
Feel free to open a feature request issue at the jpastarter project.
Ole Hedegaard (Mar 08 2022 at 09:34):
Hi Patrick,
That sounds really interesting. I'm currently looking into doing a manual database IG cleanup, so if there's existing code for doing that, I'm all ears. Can you point me in the direction of the module where this is going on? I'm sure it's better than anything I would come up with :)
Ole Hedegaard (Mar 09 2022 at 08:35):
For the record: the root cause was that our implementation guide changed package id from one version to the other. That caused us to have two active implementation guides running simultaneously, because HAPI has no chance to see that it was an update to the old IG. The quick fix was to set current_version=false in the npm_package_ver table for the old IG. But it would really be nice to have some API for this instead of needing to update the database behind the scenes. It doesn't seem to be an academic use case that you need to disable an implementation guide.
Last updated: Apr 12 2022 at 19:14 UTC