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

Deleting published feed versions causes errors loading alerts. #527

Open
binh-dam-ibigroup opened this issue Apr 3, 2023 · 0 comments
Open

Comments

@binh-dam-ibigroup
Copy link
Contributor

binh-dam-ibigroup commented Apr 3, 2023

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.

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