Repository navigation
fix: require transfers stop ids when transfer_type is empty - #2177
davidgamez merged 3 commits into
Conversation
|
|
📝 Acceptance Test Report📋 Summary✅ The rule acceptance has passed for commit fdc2ea4 📊 Notices ComparisonNew Errors (0 out of 1001 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Errors (0 out of 1001 datasets, ~0%) ✅No changes were detected due to the code change. New Warnings (0 out of 1001 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Warnings (0 out of 1001 datasets, ~0%) ✅No changes were detected due to the code change. New Info Notices (0 out of 1001 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Info Notices (0 out of 1001 datasets, ~0%) ✅No changes were detected due to the code change. 🛡️ Corruption Check2 out of 1003 sources (~0 %) are corrupted.
🔍 System errors for mdb-1114 (reference)[
{
"code": "i_o_error",
"severity": "ERROR",
"totalNotices": 1,
"sampleNotices": [
{
"exception": "java.util.zip.ZipException",
"message": "Archive is not a ZIP archive"
}
]
}
]🔍 System errors for mdb-1114 (latest)[
{
"code": "i_o_error",
"severity": "ERROR",
"totalNotices": 1,
"sampleNotices": [
{
"exception": "java.util.zip.ZipException",
"message": "Archive is not a ZIP archive"
}
]
}
]🔍 System errors for mdb-1123 (reference)[
{
"code": "i_o_error",
"severity": "ERROR",
"totalNotices": 1,
"sampleNotices": [
{
"exception": "java.util.zip.ZipException",
"message": "Archive is not a ZIP archive"
}
]
}
]🔍 System errors for mdb-1123 (latest)[
{
"code": "i_o_error",
"severity": "ERROR",
"totalNotices": 1,
"sampleNotices": [
{
"exception": "java.util.zip.ZipException",
"message": "Archive is not a ZIP archive"
}
]
}
]💾 Out of Memory CheckNo datasets experienced an OutOfMemoryError. ⏱️ Performance Assessment📈 Validation TimeAssess the performance in terms of seconds taken for the validation process.
📜 Memory Consumption
|
davidgamez
left a comment
There was a problem hiding this comment.
LGTM!
@yasumorishima, thanks for your time and contributions!

Summary:
Closes #2105.
The spec change in google/transit@a806576 (google/transit#591) made
transfers.from_stop_idandtransfers.to_stop_idRequired iftransfer_typeis empty,0,1,2or3— previously the reference only required them for1,2and3.TransferStopIdsConditionalValidatorwraps its per-row check inif (transfer.hasTransferType()), so rows whosetransfer_typeis empty are skipped entirely and the newly required case is never validated. An emptytransfer_typeis a recommended transfer point, which is the same astransfer_type=0— a value the validator already treats as requiring both stop ids.This drops that guard so every row is checked. In-seat transfer types (
4and5) keep their exemption through the existingisTransferTypeInSeatcheck, so the only behavior that changes is the empty case.Expected behavior:
transfers.txtrowtransfer_typeempty, nofrom_stop_id/to_stop_idmissing_required_fieldnotices, one per fieldtransfer_typeempty, both stop ids presenttransfer_type0–3, stop ids missingtransfer_type4or5, stop ids missingNo new notice type is introduced — this reuses
missing_required_field— soRULES.mdneeds no change.Two unit tests are added for the empty
transfer_typecase, which the existing tests never covered (every existing case callssetTransferType()).One note on CI: I ran the checks on my fork first.
Format code,Test Package Document(teston Java 17 for both ubuntu-latest and windows-latest) andPackage Installersare green.Rule acceptance testscannot run on a fork — itsget-reportsmatrix requires theubuntu-latest-4-coresrunner label, which forks do not have — so that comparison needs to run here. Since this rule newly fires on real feeds that leavetransfer_typeempty, the acceptance report is worth a look before merging.Please make sure these boxes are checked before submitting your pull request - thanks!
gradle testto make sure you didn't break anything