onaio / fhir-tooling

A command line utility to support FHIR Core content authoring
Other
2 stars 1 forks source link

Add support for uploading/artifact management on Efsity #29

Closed ndegwamartin closed 11 months ago

ndegwamartin commented 1 year ago

Overview

We need to add a new feature that supports app configs and fhir resources publishing and versioning

Implementation scope

New fct sub command publish

Flags

FHIR Resources/Doc versioning

Publishing state management

Note: :

Diff changes state management

Standard output/Logging

Properties Management

ndegwamartin commented 1 year ago

Current draft of the Proposed FHIR Resources project structure referenced above

Screenshot 2023-09-28 at 17 47 39
ndegwamartin commented 1 year ago

FHIR Resources managed in fhir-resources repository include:

ndegwamartin commented 1 year ago

Related conversation on versioning for the APK and handling Migrations https://www.notion.so/onaio/How-to-bundle-the-configuration-and-target-a-specific-app-version-0075da94ace04551b7ebde984ed975f2?pvs=4

pld commented 1 year ago

some thoughts:

pld commented 1 year ago

We made changes to the content structure, the latest is in this discussion and we can use for reference when implementing this, https://github.com/opensrp/fhircore/discussions/2787

pld commented 1 year ago

some thoughts:

* on 1 vs 2 digits, what is a breaking change in the context of content version? (if we can't define this deterministically, maybe we just use 1 digit for version? easier math, fewer decisions)

* we still need to tweak the folder structure

* for time, need to enforce including the TZ

@ndegwamartin can you give you're thoughts on this?

ndegwamartin commented 1 year ago

some thoughts:

* on 1 vs 2 digits, what is a breaking change in the context of content version? (if we can't define this deterministically, maybe we just use 1 digit for version? easier math, fewer decisions)

* we still need to tweak the folder structure

* for time, need to enforce including the TZ

@ndegwamartin can you give you're thoughts on this?

On the breaking changes, perhaps we can come up with some list of potentially breaking and non breaking changes e.g. if we remove an element that was existing before it is (most likely) breaking but if for instance we edit the Display, Text or Description elements the app logic will not necessarily break. Normally adding stuff would not break but we could add something like a sub element (some element within an element) and that breaks the app in some context.

We could provide some guidelines but this will ultimately be left to the discretion of the user since they'd be best placed to provide the judgment. In future though A.I. could help us out here 😀 .

ndegwamartin commented 1 year ago

@pld greed on the TZ, we can use the ISO 8601 variant with the Date + Time + TZ

ndegwamartin commented 1 year ago

On the versioning though, I think the main reason we needed it was to support APK runtime versioning. However if we go with the Manifest/Composition approach to tell the client what it can or cannot run gracefully then the versioning here would be redundant.

What may be more useful for us to do is to replace the versioning mentioned here with the Manifest/Composition/IG approach versioning meaning the versions update of the supported APK range would need to be made to those resources instead and in the new format. Notion ticket here

pld commented 1 year ago

OK, yes I think that's correct, I'm going to update the description to remove the version and include what we've agreed otherwise.

pld commented 1 year ago

hi @Wambere can you please take a look at this scope and let us know what unclear or needs further specification?

Note that the bottom section links to a v2 ticket that will not implemented in this issue, it's here so it can be taken into account the the v1/MVP version

Wambere commented 11 months ago

Diff changes state management

This will solve for issue on reposting all resources including unedited ones to the backend server Update file with the SHA1s of all files updated .efsity/publish_index.json The tool should only update meta tag and upload to the server files whose SHA1 is different After uploading each SHA1 entry is updated

It's technically not possible to re-post a resource with no changes, the server won't even accept it. So I don't see the value of having this functionality. Leaving it out until this is clarified