Skip to content

Conversation

@ptiurin
Copy link
Contributor

@ptiurin ptiurin commented Nov 6, 2025

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

@ptiurin ptiurin force-pushed the fix-resource-manager-unknown-configs branch from ad49470 to f151c0e Compare November 6, 2025 09:45
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2025

@ptiurin ptiurin marked this pull request as ready for review November 6, 2025 10:08
@ptiurin ptiurin requested a review from a team as a code owner November 6, 2025 10:08
@ptiurin ptiurin merged commit 4808e81 into main Nov 6, 2025
17 checks passed
@ptiurin ptiurin deleted the fix-resource-manager-unknown-configs branch November 6, 2025 10:27
M = "M"
L = "L"
XL = "XL"
UNKNOWN = "UNKNOWN" # instance type could not be determined
Copy link

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is exactly what this PR addresses - not breaking due to unexpected values.

REPAIRING = "REPAIRING"
FAILED = "FAILED"
DELETING = "DELETING"
RESIZING = "RESIZING"
Copy link

Choose a reason for hiding this comment

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

REPAIRING = "REPAIRING", STARTED = "STARTED", FAILED = "FAILED" and DROPPING = "DROPPING" does not exist in V2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are not set by the user, but are more informational. However, it will be cleaner to remove unused settings - agreed.

Comment on lines +237 to +238
("INVALID_TYPE", InstanceType.UNKNOWN, "INVALID_STATUS", EngineStatus.UNKNOWN),
("XXL", InstanceType.UNKNOWN, "WEIRD_STATE", EngineStatus.UNKNOWN),
Copy link

Choose a reason for hiding this comment

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

These 2 do not exist today, but they can. We also have type families, not sure whether SDKs care, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

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.

4 participants