Make TopologyService refuse to load archived RegionConfigs #1315
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
CHANGELOG.md
and grouped with similar changes, if possibleTesting 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 inprojects.controller.ts
(in either thecreateOne
orduplicateOne
methods), then do the corresponding operation and confirm that it produces the error message.Closes #1314