fix(FIR-50579): Avoid breaking on unknown engine configs#473
Conversation
ad49470 to
f151c0e
Compare
|
| M = "M" | ||
| L = "L" | ||
| XL = "XL" | ||
| UNKNOWN = "UNKNOWN" # instance type could not be determined |
There was a problem hiding this comment.
These are not the only supported Types, we have others in certain cases, SDKs should not break due to this. Please treat them as a string.
There was a problem hiding this comment.
This is exactly what this PR addresses - not breaking due to unexpected values.
| REPAIRING = "REPAIRING" | ||
| FAILED = "FAILED" | ||
| DELETING = "DELETING" | ||
| RESIZING = "RESIZING" |
There was a problem hiding this comment.
REPAIRING = "REPAIRING", STARTED = "STARTED", FAILED = "FAILED" and DROPPING = "DROPPING" does not exist in V2
There was a problem hiding this comment.
These are not set by the user, but are more informational. However, it will be cleaner to remove unused settings - agreed.
| ("INVALID_TYPE", InstanceType.UNKNOWN, "INVALID_STATUS", EngineStatus.UNKNOWN), | ||
| ("XXL", InstanceType.UNKNOWN, "WEIRD_STATE", EngineStatus.UNKNOWN), |
There was a problem hiding this comment.
These 2 do not exist today, but they can. We also have type families, not sure whether SDKs care, though.
There was a problem hiding this comment.
We can't really support what does not exist today. Once they're added on the backend we can add them here as well.
Filed https://packboard.atlassian.net/browse/FIR-50661 for type families.



If we encounter an unknown engine setting we should not break, since this value is coming from the server. Adding
UNKNOWNenum and default to it.Also extending engine statuses to all currently supported.