Closed shankari closed 1 year ago
This is 100% related to the configuration.
DB_HOST
on a local dev instance of the dashboard, and I see non-zero trips.STUDY_CONFIG
to smart-commute-ebike
, I see zero tripsDB_HOST
back to db
So the issue is definitely with the study config.
smart-commute-ebike
STUDY_CONFIG
doesn't have the public dashboard configured; stage
does.
If there is no admin dashboard configuration, we default to {}
permissions = config.get("admin_dashboard", {})
And by commenting in the print statements in `db_utils.py, we do have some data
DEBUG:root:After filtering, the actual data is data.start_fmt_time ... replaced_mode
0 2021-09-20T16:00:08-06:00 ... no_travel
1 2021-09-20T16:30:32.960140-06:00 ... drove_alone
2 2021-09-20T16:56:13.353779-06:00 ... drove_alone
3 2021-09-20T17:19:25.349600-06:00 ... drove_alone
4 2021-09-21T06:59:10.899343-06:00 ... bike
DEBUG:root:After filtering, df columns are Index(['data.start_fmt_time', 'data.distance', 'data.start_loc.coordinates',
'data.user_input.mode_confirm', 'data.user_input.purpose_confirm',
'data.end_fmt_time', 'data.duration', 'user_id',
'data.user_input.replaced_mode', 'data.end_loc.coordinates',
'trip_start_time_str', 'trip_end_time_str', 'start_coordinates',
'end_coordinates', 'mode_confirm', 'purpose_confirm', 'replaced_mode'],
dtype='object')
Not sure why this is not showing up.
Quick check on whether this works for (say) denver-casr, which does have the admin dasboard currently configured.
That works. So this is indeed because the admin dashboard entry was not in the dynamic config.
But why doesn't the workaround work? (permissions = config.get("admin_dashboard", {})
)
And where does the data get lost given that it apparently is read correctly in db_utils
?
The dashboard is working fine on staging, but while checking production instances, we see zero trips.