Skip to content

Consider replacing SnapshotStatus enum with booleans #302

@saad-ali

Description

@saad-ali

An enum when used for "state" encourages clients to write switch statements or or statements capturing every currently known state of enum and fail if the state is unrecognized. This leads to clients breaking when a new value is added to the enum (which should be a non-breaking additive change).

In Kubernetes we've moved to a model where we flaten the enum in to booleans, e.g. is_ready, which makes it harder for a client to be written in a forward incompatible way.

So request is to consider replacing SnapshotStatus enum with booleans.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions