99designs / 99designs/cmdstalk
Proposal: Opt-in for additional meaningful exit-codes
- 主要言語
- Go
- スター
- 76
- フォーク
- 14
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
In handover we have some tasks that have various failure scenarios; sometimes it would be most appropriate to bury a task, other times it could be re-queued, maybe with a delay.
Currently cmdstalk is quite opinionated as to how to handle job failures, this one size fits all policy makes for a fine default, but it would be nice if cmdstalk supported some opt-in behaviour to allow the job command a little more control of the release strategy.
Exit codes are already meaningful, in that a non-zero code will cause cmdstalk to act based on it's opinion to either bury or release the task with a delay. With that in mind I propose allow that default behaviour to be extended, via additional args to cmdstalk, along the lines of:
`cmdstalk -on-exit=255:BURY -on-exit=254:BACKOFF -on-exit=253:RELEASE ...`
This would override the default cmdstalk exit code handling, which is still a valid use-case for when it is not possible to control the exit codes of the job command, with a more targeted approach that allows the job command input into what happens next.
Possible release / verbs would look something like (_BURY_, _DELETE_, _RELEASE_, _BACKOFF_) with backoff representing an (exponential) backoff strategy similar to cmdstalk's current default mode of operation.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Look at the cmdstalk source code to understand how exit codes are currently handled and where the job release strategy is implemented. The main entry point is likely in the command parsing and job execution logic. Examine the existing behavior for non-zero exit codes and identify where to add the new flag parsing and custom exit code mapping. Testing will involve running cmdstalk with the proposed flags and verifying the job release actions (BURY, DELETE, RELEASE, BACKOFF) work as expected.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- go, shell
- 領域
- backend, cli
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 40/100