Skip to content

Merging already merged feeds may create duplicate IDs #142

@hbruch

Description

@hbruch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions