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

Make TopologyService refuse to load archived RegionConfigs #1315

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

KlaasH
Copy link
Collaborator

@KlaasH KlaasH commented Jun 22, 2023

Overview

As described in issue #1314, some endpoint is causing an archived RegionConfig to get added to the layers list, and since it happens to be a broken layer that crashes when you try to load it, it's causing lots of problems.

Ideally we'd know where that request is coming from and fix it (like we did in #1241), but having a check in TopologyService.get() will solve the bigger part of the issue, and will be a good thing to have as a failsafe even if we do find the source.

Checklist

  • Description of PR is in an appropriate section of CHANGELOG.md and grouped with similar changes, if possible

Testing Instructions

Since I don't know where the bad call is coming from, the best I can come up with for how to test this would be to modify the code locally to trigger it. E.g. manually archive a region_config instance, then hard-code its ID into one of the calls in projects.controller.ts (in either the createOne or duplicateOne methods), then do the corresponding operation and confirm that it produces the error message.

Closes #1314

Copy link
Collaborator

@aaronxsu aaronxsu left a comment

Choose a reason for hiding this comment

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

🤞🏼

@KlaasH KlaasH force-pushed the feature/kjh/update-postgres-terraform-module branch from 25d9f42 to d9437b1 Compare June 23, 2023 18:28
Base automatically changed from feature/kjh/update-postgres-terraform-module to develop June 23, 2023 18:29
This shouldn't get called for archived regions, but somehow it is, and it causes
big problems when the region in question is broken.
This will make it bail out rather than try to load an archived region, which
should limit the scope of the problem to whatever old entity is trying to
load it, rather than breaking the whole site.
@KlaasH KlaasH force-pushed the feature/kjh/dont-load-archived-regionconfig branch from b7a99e6 to 2dd0387 Compare June 23, 2023 18:30
@KlaasH KlaasH merged commit 1f65eff into develop Jun 23, 2023
1 check passed
@KlaasH KlaasH deleted the feature/kjh/dont-load-archived-regionconfig branch June 23, 2023 18:57
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.

Make TopologyService refuse to load archived RegionConfigs
2 participants