Skip to content

Deleting published feed versions causes errors loading alerts. #527

@binh-dam-ibigroup

Description

@binh-dam-ibigroup

Observed behavior

The error message "Error fetching GTFS entities via GraphQL [...] ERROR relation .stops/routes does not exist" is shown while the /alerts page is loading. This can happen when a feed version gets deleted but for some reason not all tables in that namespace get deleted.

Expected behavior

No error message is shown while loading the /alerts page.

Steps to reproduce the problem

  1. Open a feed source.
  2. Possible scenarios
    a. Find the lastest feed version with the published status set to "Published".
    b. Import a feed version. Then in Mongo, edit the feed source (FeedSource collection) by adding a publishedVersionId field to the corresponding document, with field value equal to the namespace of the imported feed version.
  3. Possible scenarios
    a. Delete the feed version above using the UI (Delete Feed Version).
    b. To simulate a partial feed version delete: Using a PostgreSQL client, delete the routes and stops tables of the namespace indicated by the publishedVersionId. Optionally, delete in Mongo that feed version from the FeedVersion collection.
  4. Open/Refresh the /alerts page.
  5. Observe the error message mentioned above are shown, or, if you picked scenario 3a, a GraphQL error message with "No rows found" in the details.

Any special notes on configuration used

Requires:

  • MTC extension with the alerts module and external feed publishing service configured,
  • Alerts from the RTD system
  • In "MTC Properties" (ExternalFeedSourceProperty collection), the AgencyId attribute and value must be set for the feed source to test.
  • in server.yml, change application->public_url to http://localhost:4000.

Version of datatools-server and datatools-ui if applicable (exact commit hash or branch name)

mtc-deploy branch.

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