Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging already merged feeds may create duplicate IDs #142

Open
hbruch opened this issue Mar 16, 2020 · 0 comments
Open

Merging already merged feeds may create duplicate IDs #142

hbruch opened this issue Mar 16, 2020 · 0 comments

Comments

@hbruch
Copy link
Contributor

hbruch commented Mar 16, 2020

Summary:

Trying to merge multiple regional feeds together with another, already merged feed resulted in duplicate schedule_ids for calendar.txt entries.

Steps to reproduce:
Merge a feed with two schedules with IDs T0, a-T0 with another feed with another, different schedule with ID T0.

Expected behavior:
Resulting feed has calendar entries with unique IDs.

Observed behavior:
Resulting feed has calendar entries with duplicate IDs a-T0.

Root cause
This behavior is caused by MergeSupport.renameAgencyAndId which prepends a prefix without further checking for uniqueness which might result in duplicates.

As long as no feed contains IDs starting with single letters followed by a hyphen (e.g. "a-"), this will not cause an issue. However, the documentation should describe this duplicate resolution strategy.

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

No branches or pull requests

1 participant