fix(kubernetes): missing `kubernetes_kind` or `attribute_path` errors are dropped
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
src/tirith/providers/kubernetes/handler.py から始めてください。ここでは get_value が "kubernetes_kind must be provided" と "attribute_path must be provided" の結果を outputs に追加せず返しており、provide() が戻り値を破棄しています。issue に示された呼び出しで再現し、その後 tests/providers/kubernetes/ 配下にテストを追加してください。テストでは、不足している引数ごとに対応する err を持つ結果が1件あることを期待します。両方のケースがそのエラーを返し、pytest tests/ が通れば完了です。
索引モデルが issue の本文から書いたものです。
説明
Problem
In src/tirith/providers/kubernetes/handler.py, get_value returns the "kubernetes_kind must be provided" and "attribute_path must be provided" results instead of appending them to outputs. provide() ignores the return value, so it returns [] and the policy author never sees the error.
To reproduce:
from tirith.providers.kubernetes.handler import provide
provide({"operation_type": "attribute", "attribute_path": "spec"}, [{"kind": "Pod", "spec": {}}])
# -> []
What to change
Append both error results to outputs (as the "kind is not found" branch already does) and return.
Done when
A new test in tests/providers/kubernetes/ calls provide() without each argument and gets one result carrying the matching err.
Comment to claim this issue and wait to be assigned. Unclaimed or inactive for 3 days, it returns to the pool. Run pytest tests/ and black --line-length 120 before opening the PR.
- 主要言語
- Python
- スター
- 170
- フォーク
- 46
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 9
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
StackGuardian/tirith のほかの issue
-
chore: remove stale TODOs and commented-out code対応中かも @krishna2707 が 1 日前に担当しました。 オープンchore good first issue hacktoberfest
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
StackGuardian/tirith#408 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
test(evaluators): edge cases for `Equals` and `NotEquals`対応中かも @Ankit-cs が今日担当しました。 オープンgood first issue hacktoberfest tests
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
StackGuardian/tirith#406 ·
メンテナーはふだん 1 日以内に返信
-
test(kubernetes): cover the provider's main paths対応中かも @afsuyadi が今日担当しました。 オープンgood first issue hacktoberfest tests
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
StackGuardian/tirith#405 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
good first issue hacktoberfest tests
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
StackGuardian/tirith#403 ·
メンテナーはふだん 1 日以内に返信
-
research
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
StackGuardian/tirith#356 ·
メンテナーはふだん 1 日以内に返信
StackGuardian/tirith の issue をすべて見る
似ている issue
-
documentation good first issue
難易度 2/5 半日 初心者へのやさしさ 72/100
sujithputta02/Esapay#13 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
gke-labs/kube-agents#3277 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
jbacalso24/mimry#291 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 2/5 1時間未満 初心者へのやさしさ 82/100
eli-alvarado/us-watchlist-alerts#14 ·
メンテナーはふだん 1 日以内に返信