_introspect_all_indexes can break during GSI deletion
jseakle opened this issue · comments
This block expects the 'Projection' field to exist in each index, but when the index has the "DELETING" status (or similar, I can no longer quickly find the actual status string), this field is not present, causing a KeyError. We luckily discovered this in testing, but were at significant risk of having it impact a production system.
We've worked around it by monkey-patching the function to add
try:
field['Projection']
field['Projection']['ProjectionType']
except KeyError:
continue
but this is of course brittle and undesirable.
+1