MobilityData / gtfs-validator

Canonical GTFS Validator project for schedule (static) files.
https://gtfs-validator.mobilitydata.org/
Apache License 2.0
290 stars 101 forks source link

foreign_key_violation doesn't catch a missing trip_id #1752

Closed tzujenchanmbd closed 1 month ago

tzujenchanmbd commented 6 months ago

Describe the bug

When testing a feed with GTFS-flex data where there is a missing trip_id in trip.txt(parent file) but being referenced in stop_times.txt, validator doesn't show a foreign_key_violation error.

Here is the report link: https://gtfs-validator-results.mobilitydata.org/83a0d446-3a65-4258-92c1-22b61c5dd6fe/report.html

Steps/Code to Reproduce

  1. Download the test feed provided below
  2. Upload the feed to Canonical GTFS Schedule Validator

Expected Results

Validator shows a foreign_key_violation error that indicates trip_id=t_5298041_b_77503_tn_0 in stop_times.txt cannot be found in trips.txt.

Actual Results

Validator doesn't show the error

Screenshots

No response

Files used

on-demand_services_between_multiple_zones.zip

Validator version

5.0.1

Operating system

MacOS

Java version

No response

Additional notes

No response

welcome[bot] commented 6 months ago

Thanks for opening your first issue in this project! If you haven't already, you can join our slack and join the #gtfs-validators channel to meet our awesome community. Come say hi :wave:!

Welcome to the community and thank you for your engagement in open source! :tada:

qcdyx commented 6 months ago
image

I got too deep into analyzing the issue—it actually stems from a parsing error in the stop_times.txt file. Let's delve into how we can improve the presentation of this error for our end users.

qcdyx commented 6 months ago

3 of the Flex gtfs data sets got parsing issues listed here https://docs.google.com/document/d/1QABoIeOdR6lAB7A6_X6WIbZwC7EnAIZvm_hRNwNQeoI/edit#heading=h.xt9phhoxqouq New issue created https://github.com/MobilityData/gtfs-validator/issues/1767

cka-y commented 1 month ago

Closing this as the issue is not reproducible. I was able to observe the foreign key error notice for the specified example feed and trip ID.

Image

emmambd commented 1 month ago

Wondering if this works now because of other modifications we've made so Flex feeds are parseable. Regardless, glad to see this is corrected.