siderolabs / omni-feedback

Omni feature requests, bug reports
https://www.siderolabs.com/platform/saas-for-kubernetes/
MIT License
2 stars 0 forks source link

[feature] Unique status codes on error #43

Closed ArcherSeven closed 1 year ago

ArcherSeven commented 1 year ago

Problem Description

It would be nice if specific errors had a specific error code to test against. Looking to test if a cluster already exists. A failure on omnictl get cluster ${CLUSTER_ID} might be because the cluster does not exist, or might be because omni could not be reached.

Solution

omnictl get cluster ${CLUSTER_ID} returns 0 if the cluster exists, perhaps 68 for omni being unreachable and 69 for the cluster not existing, based on a loose interpretation of sysexits? But really just unique.

Alternative Solutions

No response

Notes

No response

smira commented 1 year ago

It might be better to build higher-level automation using the Omni client SDK: https://github.com/siderolabs/omni-client

We are happy to talk about it further