-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
useview_telemetry
is failing for instances running on CHT-Core > 3.8.0
#87
Comments
Assigning myself because I'll work today in the solution for #86 that affects the same view, and doing separate PRs from each one would imply 2 different migrations scripts, recreating 2 times the same view, because PG does not allow to alter views to just change column definitions. |
Ready for AT, along with the issues #85 and #86, branch The description of the changes are described in the PR description: #91 More on what to test: #86 (comment) |
confirmed that versions 3.11.0 and 3.7.0 creating telemetry and thing syncing to postgress are not failing and have the proper month set. |
…ily telemetry (#91) Deprecate old `medic-users-meta` views and create new ones fixing bugs and making compatible with upcoming daily telemetry. **Issues**: #85 , #86 , #87 **Changes**: - [Bug] Change the indexes for both views (telemetry and feedback) based on the columns user_name and period_start, the PR remove the unique constraint to avoid collisions, and instead the uuid of the records are used as unique index to allow concurrent refresh of the views (#86). - [Bug] Fix bug that causes records being parsed with months 0-indexed as 1-indexed and vice versa (thanks to @kitsao ) (#87). - [Improvement] The column period_start from the telemetry view has the same DATE type, but the day component is parsed from the JSON metadata.day field if present (daily aggregation telemetry from this upcoming CHT feature), otherwise defaulted to 1 as it was before to maintain backward compatibility with monthly aggregation telemetry (#85). **Affected views**: - Feedback view: `useview_feedback` - Telemetry view: `useview_telemetry`
Reported error:
It seems like this is related to this migration:
https://github.com/medic/medic-couch2pg/blob/master/libs/medic-users-meta/migrations/202102191153.do.54-create-couchdb-users-meta-table.sql#L27
Where, instead of adding +1 when the instance version is lower than 3.8.0, we end up adding +1 when the instance is equal or greater, ending up with 13th month dates.
The text was updated successfully, but these errors were encountered: