normalize NCID by stripping Swift prefix #2343
Merged
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.
Reason for Change:
#1767 introduced a bug where, if the NC in state does not have the
Swift_prefix, when we unconditionally add the prefix we become unable to identify it in the NMA responses which don't have it and are stuck:{"httpStatusCode":"200","networkContainers":[{"networkContainerId":"de043d23-a135-401c-b6a8-1ab6a09f980a","version":"0"}]}and yet
After investigating, this it seems like nobody knows where or even if we actually have NCs in the wild with the
Swift_prefix, but it is possible that we do as a legacy artifact, and it could be unsafe to remove the prefixing entirely.However, for the purposes of the lookup in the NC version list query, we can strip the prefix when add items to this in-memory map, and strip prefixes when we attempt to look objects up in the map, and unstick ourselves. This additional prefixing is not done anywhere else, and no usages of these objects escape this local map, so it should be safe and back-compat.
Issue Fixed:
Requirements:
Notes: