Closed johnclary closed 1 month ago
I also wanted to point out this graphql response error that I'm having a hard time replicating besides randomly adding/removing filters in the CR3 crashes table at the bottom of the Location page. Looks like something on the Postgres side that isn't bubbling up through Hasura maybe?
{
"errors": [
{
"extensions": {
"path": "$",
"code": "unexpected"
},
"message": "database query error"
}
Here are the filters that I ran into this with (same filters on the aggregate part but didn't want to paste a giant blob):
crashes_list_view(offset: 0, order_by: {est_comp_cost_crash_based: desc}, where: {location_id: {_eq: "137B922D05"}, crash_date: {_gte: "2023-06-27", _lte: "2024-06-27"}, private_dr_fl: {_neq: true}, in_austin_full_purpose: {_eq: true}, address_secondary: {_ilike: "%rutland%"}, _or: [{cris_fatality_count: {_gt: 0}}]})
When i search in the Non-CR3 table by case id im getting the error "Error! GraphQL error: field '_ilike' not found in type: 'Int_comparison_exp'"
When i search in the Non-CR3 table by case id im getting the error
"Error! GraphQL error: field '_ilike' not found in type: 'Int_comparison_exp'"
thanks @roseeichelmann —this bug exists in prod 🫠
i will make a follow-up issue!
I also wanted to point out this graphql response error that I'm having a hard time replicating besides randomly adding/removing filters in the CR3 crashes table at the bottom of the Location page.
@mddilley i haven't been able to reproduce this through the UI, or by running the query in the console
{
crashes_list_view(offset: 0, order_by: {est_comp_cost_crash_based: desc}, where: {location_id: {_eq: "137B922D05"}, crash_date: {_gte: "2023-06-27", _lte: "2024-06-27"}, private_dr_fl: {_neq: true}, in_austin_full_purpose: {_eq: true}, address_secondary: {_ilike: "%rutland%"}, _or: [{cris_fatality_count: {_gt: 0}}]}) {
crash_id
case_id
crash_date
address_primary
address_secondary
sus_serious_injry_count
vz_fatality_count
est_comp_cost_crash_based
collsn_desc
}
}
i'll flag this and ask you to test again in a later PR 🙏
Associated issues
Testing
Follow the steps in https://github.com/cityofaustin/atd-vz-data/pull/1440 to start your local stack, including running the CRIS import.
After you run the CRIS import, use your SQL client to refresh the location list view:
In the VZE, test out the locations list by sorting all columns, searching by location ID, and searching by street name
Inspect the location details page, ideally using a location that has a high number of fatalities and crashes. Make sure each of the cards are rendering correctly. Do some rough cross checking that the various metric cards are lining up with the crashes associated with the location. Test the search/filtering functions on the CR3 and Non-CR3 crashes tables. Add a location note.
Test the "Download Global Data" button. It should work, but it is still pointed at the old
atd_txdot_crashes
table. We will fix that here: https://github.com/cityofaustin/atd-data-tech/issues/17944.Head over to the crashes list and crash details pages and make sure those are loading normally 👍
Ship list