Skip to content

Do not invoke single file validators if table indices were not generated#1300

Merged
aababilov merged 1 commit intoMobilityData:masterfrom
aababilov:invokeSingleFileValidators
Dec 14, 2022
Merged

Do not invoke single file validators if table indices were not generated#1300
aababilov merged 1 commit intoMobilityData:masterfrom
aababilov:invokeSingleFileValidators

Conversation

@aababilov
Copy link
Copy Markdown
Collaborator

If a table has duplicated keys, then its indices won't be generated and the noticeContainer will contain errors. Single file validators may have undefined behaviour when called for such incomplete indices.

If a table has duplicated keys, then its indices won't be generated and
the noticeContainer will contain errors. Single file validators may have
undefined behaviour when called for such incomplete indices.
Copy link
Copy Markdown
Collaborator

@asvechnikov2 asvechnikov2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@aababilov aababilov merged commit a6cb3ed into MobilityData:master Dec 14, 2022
@bdferris-v2
Copy link
Copy Markdown
Collaborator

I gotta say, I have thoughts on this PR. I hear @aababilov 's concern, but this seems a heavy-handed way of addressing it. As implemented, a single-entity validation error will caused all single-file validators to skip execution, potentially missing out on a lot of useful validation. I'd rather write validators to be resilient to underlying data that is malformed than disable them entirely.

What's more, multi-file validation rules are still run for feeds that potentially have duplicate key and foreign key validation errors as well. Do we have to disable those as well?

aababilov added a commit to aababilov/gtfs-validator that referenced this pull request Dec 15, 2022
aababilov added a commit that referenced this pull request Dec 15, 2022
@aababilov
Copy link
Copy Markdown
Collaborator Author

Makes sense to me, Brian. Reverted in #1303

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants