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

IG installation: lenient comparison of 'current' version in dependencies #229

Open
qligier opened this issue Apr 29, 2024 · 0 comments
Open
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request

Comments

@qligier
Copy link
Member

qligier commented Apr 29, 2024

When installing an IG that depends on another IG with current version, Matchbox could be lenient and continue if any version of that IG is already installed. A warning could be generated for that special case.

Currently, an error is returned, but the IG still appears in the list of installed packages.

Not sure if the validator engine would support that, though. Can it automatically resolve the latest version of the package?

Example: MeOw depends on ihe.domain.logical-datatypes#0.0.1-current, which has a single version.

Failure logs
2024-04-29 19:26:29.044 [main] DEBUG c.a.f.h.j.v.ImplementationGuideProviderR5 [ImplementationGuideProviderR5.java:190] Loading package ihe.pharm.meow#0.1.0 from property hapi.fhir.implementationGuides
2024-04-29 19:26:29.714 [main] INFO  c.u.f.j.p.loader.PackageLoaderSvc [PackageLoaderSvc.java:119] Parsing package .tar.gz (168141 bytes) from https://build.fhir.org/ig/IHE/pharm-meow/branches/main/package.tgz
2024-04-29 19:26:30.159 [main] INFO  o.h.f.u.npm.BasePackageCacheManager [BasePackageCacheManager.java:88] Failed to resolve package ihe.domain.logical-datatypes#current from server: https://packages.fhir.org (Not Found)
2024-04-29 19:26:30.699 [main] INFO  o.h.f.u.npm.BasePackageCacheManager [BasePackageCacheManager.java:88] Failed to resolve package ihe.domain.logical-datatypes#current from server: https://packages2.fhir.org/packages (Not found)
2024-04-29 19:26:30.721 [main] ERROR o.s.boot.SpringApplication [SpringApplication.java:851] Application run failed
ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException: HAPI-1301: Unable to locate package ihe.domain.logical-datatypes#current
	at ca.uhn.fhir.jpa.packages.loader.PackageLoaderSvc.fetchPackageFromServerInternal(PackageLoaderSvc.java:90)
	at ca.uhn.fhir.jpa.packages.loader.PackageLoaderSvc.fetchPackageFromPackageSpec(PackageLoaderSvc.java:81)
	at ca.uhn.fhir.jpa.packages.JpaPackageCache.loadPackage(JpaPackageCache.java:510)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:351)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:765)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:385)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:765)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:717)
	at ca.uhn.fhir.jpa.packages.JpaPackageCache$$SpringCGLIB$$0.loadPackage(<generated>)
	at ch.ahdis.matchbox.util.MatchboxPackageInstallerImpl.fetchAndInstallDependencies(MatchboxPackageInstallerImpl.java:294)
	at ch.ahdis.matchbox.util.MatchboxPackageInstallerImpl.install(MatchboxPackageInstallerImpl.java:204)
	at ch.ahdis.fhir.hapi.jpa.validation.ImplementationGuideProviderR5.load(ImplementationGuideProviderR5.java:154)
	at ch.ahdis.fhir.hapi.jpa.validation.ImplementationGuideProviderR5.loadAll(ImplementationGuideProviderR5.java:203)
	at ch.ahdis.matchbox.spring.MatchboxEventListener.onApplicationEvent(MatchboxEventListener.java:35)
	at ch.ahdis.matchbox.spring.MatchboxEventListener.onApplicationEvent(MatchboxEventListener.java:17)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:178)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:171)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:149)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:451)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:384)
	at org.springframework.boot.context.event.EventPublishingRunListener.ready(EventPublishingRunListener.java:109)
	at org.springframework.boot.SpringApplicationRunListeners.lambda$ready$6(SpringApplicationRunListeners.java:80)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118)
	at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:112)
	at org.springframework.boot.SpringApplicationRunListeners.ready(SpringApplicationRunListeners.java:80)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:348)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
	at ca.uhn.fhir.jpa.starter.Application.main(Application.java:36)
@qligier qligier added enhancement New feature or request dependencies Pull requests that update a dependency file labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant