gtfs-validator icon indicating copy to clipboard operation
gtfs-validator copied to clipboard

foreign_key_violation doesn't catch a missing trip_id

Open tzujenchanmbd opened this issue 9 months ago • 3 comments

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

tzujenchanmbd avatar May 09 '24 03:05 tzujenchanmbd

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:

welcome[bot] avatar May 09 '24 03:05 welcome[bot]

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 avatar May 16 '24 19:05 qcdyx

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

qcdyx avatar May 21 '24 14:05 qcdyx

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

cka-y avatar Oct 02 '24 16:10 cka-y

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

emmambd avatar Oct 07 '24 13:10 emmambd