-
Notifications
You must be signed in to change notification settings - Fork 10
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
dhis2: Update tracked entities endpoints to V42 #819
Conversation
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
…-update Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
.changeset/wild-dodos-rush.md
Outdated
--- | ||
'@openfn/language-dhis2': patch | ||
--- | ||
Removed support for DHIS2 v42 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changeset needs updating. Is this the old changeset from the last fixes?
Anyway this needs to be a major update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this changelog doesn't apply it needs to be removed, because it'll create an inaccurate release note and confuse users
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
.changeset/wild-dodos-rush.md
Outdated
--- | ||
'@openfn/language-dhis2': patch | ||
--- | ||
Removed support for DHIS2 v42 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this changelog doesn't apply it needs to be removed, because it'll create an inaccurate release note and confuse users
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're about there @hunterachieng. Sorry this is late, and I won't be able to get to it now until Wednesday.
I'm a bit worried about some of the docs. Big docs changes are out of scope for this work but I also think there are some innaccuracies.
Unless anyone else volunteers before Wednesday, I'll do a light sweep of the docs, do a final check, and we can release.
packages/dhis2/src/Adaptor.js
Outdated
@@ -41,6 +41,11 @@ export function execute(...operations) { | |||
`WARNING: This adaptor is incompatible with DHIS2 API version 42+. See here: https://docs.dhis2.org/en/develop/using-the-api/dhis-core-version-master/tracker.html.` | |||
); | |||
|
|||
if (+version < 42) | |||
console.warn( | |||
`WARNING: This adaptor is incompatible with DHIS2 tracker API version less than 42. See here: https://docs.dhis2.org/en/develop/using-the-api/dhis-core-version-master/tracker.html.` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think version 36+ is OK?
The new tracker API, which we use for eg create
, was introduced in v36. So it should work with anything from 36+.
Also, please remove the trailing fullstop at the end of the URL. It's unnecessary and will break the URL if someone accidentally copies it into the address bar
@hunterachieng have you called the actual DHIS2 sandbox with the new APIs, or have you only tested against unit tests? |
@josephjclark Yes I did |
Signed-off-by: Hunter Achieng <[email protected]>
@hunterachieng the PR body is very out of date with the changes here, which is a big problem for audit trails and working in the open. I'm going to start getting more strict about this - it's super important that PRs actually do what they say they do when they are merged. I've updated the description to be more accurate. |
Signed-off-by: Hunter Achieng <[email protected]>
Signed-off-by: Hunter Achieng <[email protected]>
TODO: remove all support for This is because the datastructure for an entity on the new tracker is different to the datastructure to the old one. It's not worth pretending to maintain support. |
TODO: |
TODO: on the new tracker, we need to pass TODO: raise an issue to later support |
clean utils function
Hiya @josephjclark, please give this another round
|
remove lodash import export
Summary
Update tracked entities endpoints to the new v42.
Fixes #754
Details
Updates
create
,update
,upsert
anddestroy
so that resources are mapped to the new tracker endpoints.HTTP helpers are not affected.
AI Usage
Please disclose how you've used AI in this work (it's cool, we just want to know!):
You can read more details in our Responsible AI Policy
Review Checklist
Before merging, the reviewer should check the following items:
dev only changes don't need a changeset.