Stream: IG creation
Topic: fhir.ca.template
Elliot Silver (Feb 25 2022 at 20:23):
We have an IG that uses a local customization of fhir.ca.template. It builds fine locally, but is failing in the CI build. If we change it to use fhir.ca.template or fhir.base.template as the template it succeeds in both the CI build and locally. The error is about not being able to find fhir.ca.template at http://packages.fhir.org/fhir.ca.template/0.1.0. I think, but am not sure that this is related to the great reclamation, and I've triggered a rebuild of the template, but I think something else is missing. Current code is at https://github.com/HL7-Canada/ca-baseline/tree/master (currently using fhir.ca.template, not the local template). Any ideas?
David Pyke (Feb 25 2022 at 20:24):
If all else fails, you can point to the github location and that will work. Make sure you say current if there's no release that FHIR knows about
John Moehrke (Feb 25 2022 at 20:26):
there is a fhir.ca.template - https://fhir.org/templates/
John Moehrke (Feb 25 2022 at 20:27):
but, did it get rebuilt since the great IG purge? If not, then it can cause build errors.
Grahame Grieve (Feb 25 2022 at 20:28):
I don't know what the issue is but the purge is irrelevant when it comes to released templates
Grahame Grieve (Feb 25 2022 at 20:35):
except that there's no evidence I have that the canadian template has ever been released, so of course there's no source for it on packages.fhir.org
Grahame Grieve (Feb 25 2022 at 20:35):
I'm going to guess that you built your ca template locally, and you'd fail too if you cleared your package cache before building
Elliot Silver (Feb 25 2022 at 20:37):
I recall @Lloyd McKenzie asking you to do a release of the template, and you doing so.
Elliot Silver (Feb 25 2022 at 22:05):
John Moehrke said:
there is a fhir.ca.template - https://fhir.org/templates/
I've never seen this. Huh, learn something every day. And to answer your question, no, it hasn't been rebuilt since the purge, but you and Grahame seem to differ on the importance of that.
Elliot Silver (Feb 26 2022 at 00:20):
@Grahame Grieve , yes, you did publish it (or something that I'm not knowledgable enough to distinguish from publishing):
Grahame Grieve said:
I have to publish it. What's the github repo ID? And I need to have commit access to it (I will only use that for versioning new releases)
...
ok done.should just automatically work now
After clearing the fhir cache, ./temp, and ./template directories, I get the following when building using fhir.ca.template, although the output uses the correct template:
Package Cache: /Users/elliot/.fhir/packages (00:00.0049)
Load Template from fhir.ca.template (00:00.0644)
2022-02-25 15:49:39.245 [main] INFO o.h.f.u.n.FilesystemPackageCacheManager [FilesystemPackageCacheManager.java:232] Failed to determine latest version of package fhir.ca.template from server: http://packages.fhir.org
2022-02-25 15:49:40.267 [main] INFO o.h.f.u.npm.BasePackageCacheManager [BasePackageCacheManager.java:80] Failed to resolve package fhir.ca.template#0.1.0 from server: http://packages.fhir.org (Invalid HTTP response 404 from http://packages.fhir.org/fhir.ca.template/0.1.0 (Not Found) (content in /var/folders/wy/qyscnv3n0v76wp03lr9nvbsw0000gn/T/fhir-http-3.log))
Installing fhir.ca.template#0.1.0 to the package cache
Fetching:
Installing: done.
Load Template from fhir.base.template#0.2.2 (00:03.0006)
2022-02-25 15:49:41.337 [main] INFO o.h.f.u.npm.BasePackageCacheManager [BasePackageCacheManager.java:80] Failed to resolve package fhir.base.template#0.2.2 from server: http://packages.fhir.org (Invalid HTTP response 404 from http://packages.fhir.org/fhir.base.template/0.2.2 (Not Found) (content in /var/folders/wy/qyscnv3n0v76wp03lr9nvbsw0000gn/T/fhir-http-4.log))
Installing fhir.base.template#0.2.2 to the package cache
Fetching:.
Installing: . done.
Clearing the cache, and switching to the local template (which is based on fhir.ca.template#current), I get:
Load Template from ./cabaseline-template (00:00.0666)
Load Template from fhir.ca.template#current (00:00.0730)
org.hl7.fhir.exceptions.FHIRException: Unable to fetch: Invalid HTTP response 404 from https://build.fhir.org/ig/hl7/ig-template-ca/package.tgz (Not Found) (content in /var/folders/wy/qyscnv3n0v76wp03lr9nvbsw0000gn/T/fhir-http-2.log)
at org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager.fetchFromUrlSpecific(FilesystemPackageCacheManager.java:523)
at org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager.loadFromCIBuild(FilesystemPackageCacheManager.java:531)
at org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager.loadPackage(FilesystemPackageCacheManager.java:503)
at org.hl7.fhir.igtools.templates.TemplateManager.loadPackage(TemplateManager.java:251)
at org.hl7.fhir.igtools.templates.TemplateManager.installTemplate(TemplateManager.java:93)
at org.hl7.fhir.igtools.templates.TemplateManager.installTemplate(TemplateManager.java:108)
at org.hl7.fhir.igtools.templates.TemplateManager.loadTemplate(TemplateManager.java:79)
at org.hl7.fhir.igtools.publisher.Publisher.initializeFromIg(Publisher.java:1831)
at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:1645)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:794)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:9099)
Caused by: java.io.IOException: Invalid HTTP response 404 from https://build.fhir.org/ig/hl7/ig-template-ca/package.tgz (Not Found) (content in /var/folders/wy/qyscnv3n0v76wp03lr9nvbsw0000gn/T/fhir-http-2.log)
at org.hl7.fhir.utilities.SimpleHTTPClient$HTTPResult.checkThrowException(SimpleHTTPClient.java:75)
at org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager.fetchFromUrlSpecific(FilesystemPackageCacheManager.java:517)
... 10 more
Publishing Content Failed: Error loading template fhir.ca.template#current: Unable to fetch: Invalid HTTP response 404 from https://build.fhir.org/ig/hl7/ig-template-ca/package.tgz (Not Found) (content in /var/folders/wy/qyscnv3n0v76wp03lr9nvbsw0000gn/T/fhir-http-2.log) (00:03.0182)
One more time, using the local template, and basing it on fhir.ca.template#0.1.0, I get the following, but the build appears to complete, and the local template is used:
Package Cache: /Users/elliot/.fhir/packages (00:00.0056)
Load Template from ./cabaseline-template (00:00.0705)
Load Template from fhir.ca.template#0.1.0 (00:00.0765)
2022-02-25 16:14:10.425 [main] INFO o.h.f.u.npm.BasePackageCacheManager [BasePackageCacheManager.java:80] Failed to resolve package fhir.ca.template#0.1.0 from server: http://packages.fhir.org (Invalid HTTP response 404 from http://packages.fhir.org/fhir.ca.template/0.1.0 (Not Found) (content in /var/folders/wy/qyscnv3n0v76wp03lr9nvbsw0000gn/T/fhir-http-2.log))
Installing fhir.ca.template#0.1.0 to the package cache
Fetching:
Installing: done.
Load Template from fhir.base.template#0.2.2 (00:02.0783)
2022-02-25 16:14:12.107 [main] INFO o.h.f.u.npm.BasePackageCacheManager [BasePackageCacheManager.java:80] Failed to resolve package fhir.base.template#0.2.2 from server: http://packages.fhir.org (Invalid HTTP response 404 from http://packages.fhir.org/fhir.base.template/0.2.2 (Not Found) (content in /var/folders/wy/qyscnv3n0v76wp03lr9nvbsw0000gn/T/fhir-http-3.log))
Installing fhir.base.template#0.2.2 to the package cache
Fetching:.
Installing: . done.
So, it looks like we can't use fhir.ca.template#current, but specifying 0.1.0 is fine.
Grahame Grieve (Feb 28 2022 at 23:45):
@Elliot Silver how do I reproduce this?
Elliot Silver (Mar 01 2022 at 02:59):
You should be able to grab https://github.com/HL7-Canada/ca-baseline/tree/master and play around with which template is specified in ig.ini and in the local template dependency.
Grahame Grieve (Mar 01 2022 at 04:07):
well, I rebuilt the ca template and it seems ok now
Elliot Silver (Mar 01 2022 at 04:11):
Looks good from here now too. Did you see the errors before rebuilding?
Grahame Grieve (Mar 01 2022 at 04:16):
yes
Elliot Silver (Mar 01 2022 at 04:16):
OK, good to know it wasn't something I was messing up locally. Thank you.
Notification Bot (Mar 01 2022 at 04:17):
Elliot Silver has marked this topic as resolved.
Notification Bot (Mar 01 2022 at 04:22):
Elliot Silver has marked this topic as unresolved.
Elliot Silver (Mar 01 2022 at 04:25):
Weird -- looking at the template QA report, I see the build output is going to http://build.fhir.org/ig/hl7/ig-template-ca/. All the other HL7 builds are going to http://build.fhir.org/ig/HL7/ (Note the capitalization of HL7). And, included in the HL7 directory is an empty ig-template-ca directory. I don't know if this is relevant, but it does seem odd.
Grahame Grieve (Mar 01 2022 at 04:27):
templates are built differently. So I'm not surprised. I won't think about that unless there's a problem
Elliot Silver (Mar 01 2022 at 04:27):
OK. Thanks again.
Sheila Connelly (Mar 31 2022 at 15:06):
Hello @Elliot Silver - Looking at your ca-baseline has been helpful. I want to create a template with our group's internal colors/logos/design, and probably more. I think your example should give me what I need. If you or anyone knows of other examples, please do tell!
John Moehrke (Mar 31 2022 at 15:13):
the documentation for customizing templates is at http://build.fhir.org/ig/FHIR/ig-guidance/
John Moehrke (Mar 31 2022 at 15:14):
you can see there a couple of examples
John Moehrke (Mar 31 2022 at 15:14):
IHE also has our template at https://github.com/IHE/ihe-ig-template
Sheila Connelly (Mar 31 2022 at 15:39):
Thank you @John Moehrke - Yes, I did use the ig-guidance to change colors and make other changes.
Now I am ready to make my "template" available to other IGs for our team.
With IHE as an example, do the other IHE IGs somehow point to: http://fhir.org/templates/ihe.fhir.template in an ig.ini file or otherwise?
Do you have an example of an IG basing its design/colors on your template? So I can see how it references the template?
John Moehrke (Mar 31 2022 at 15:46):
IHE - I have Grahame publish the IHE template to the IG template registry https://fhir.org/templates/... thus, yes the IHE IGs simply use
template = ihe.fhir.template
Actually most of the IGs I can point at further refine that in that IG to eliminate the automatic header numbering, because some of the IHE IGs want to use pre-determined header numbering to fit within the IHE Technical Framework more broadly. https://github.com/IHE/ITI.MHD
I don't have an example of using an external template that is not published on the template registry.
Sheila Connelly (Mar 31 2022 at 15:52):
Thank you. This is helpful.
Elliot Silver (Mar 31 2022 at 16:17):
@Sheila Connelly, I can't take credit for the Canadian template. I just tweaked a couple of colo(u)rs that hadn't been overridden from the defaults, and within the CA Baseline helped with adding a feedback link in the footer.
You don't need to get a template registered if you have the template locally (e.g. in your project, or in a directory beside your project). In that case you can say template=./path/to/my/template
.
Jose Costa Teixeira (Mar 31 2022 at 18:05):
@Sheila Connelly most IG templates are based on the base template. in Belgium, for example, there are local templates based on the Belgian base template, but those are just local templates as described in the guidance.
Jose Costa Teixeira (Mar 31 2022 at 18:06):
https://github.com/costateixeira/ig_templates/blob/master/README.md
Sheila Connelly (Mar 31 2022 at 20:53):
Thank you all!
Last updated: Apr 12 2022 at 19:14 UTC