crossplane / crossplane/function-runtime-oci

XFN Runner: Show STDOUT of failed composition function (exit code >= 1)

オープン
#42 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Go
スター
6
フォーク
2
PR マージ指標
30日以内にマージされた PR はありません

説明

### What problem are you facing?

We've implemented a function similar to the example functions from [docs](https://docs.crossplane.io/master/concepts/composition-functions/#an-example-function). If this functions fails, it returns a exit code greater than 0 and prints the error message in STDOUT.

```
[..] "error": "cannot run Composition Function pipeline: cannot run function \"service-versioning\": cannot run container: rpc error: code = Unknown desc = exit status 1: xfn: error: spark.Command.Run(): OCI runtime error: exit status 1"
```

Currenty, I cannot debug a composition function that fails to execute. When the function in the OCI container fails, I see the exit code but no additional information printed in STDOUT.

### How could Crossplane help solve your problem?

Provide a way to see the STDOUT of functions that failed. That may be behind a flag/option like verbosity level/debug mode, etc.
Perhaps, also STDERR could be used, as it would be the more appropriate place for error messages.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

issue にはソースファイルもテストも指定されていません。まず OCI コンテナの実行パスを特定し、STDOUT に書き込みながらゼロ以外の終了ステータスで終了する composition function を再現してください。失敗した出力をどのように公開すべきか(STDERR を処理するかどうかを含む)を確認し、診断テキストが表示されることを示すテストカバレッジを追加してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
go
領域
backend
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。