Remove ConditionUpdater's 'removeUntouched' argument
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
まず、コントローラーとテストにある ConditionUpdater とその呼び出し元を特定します。インポートを行うリポジトリでの使用箇所も含めます。removeUntouched スイッチを削除しつつ、変更されていない条件を保持する動作は維持します。その後、影響を受ける呼び出し元とテストを更新し、A、B、D の更新後も C などの条件が残ることを確認します。
索引モデルが issue の本文から書いたものです。
説明
What would you like to be added:
Currently, the ConditionUpdater takes a bool argument that specifies whether 'untouched conditions' are kept or deleted. We don't need this switch anymore. Let's remove it to simplify the code base.
Example
Let's assume the old condition list contains three conditions, with the types A, B, and C.
If the bool is false, updating A, B, and D will result in the new condition list containing A, B, C, and D.
If the bool is true, updating A, B, and D instead results in the new condition list containing A, B, and D. The condition C is removed, because it has not been touched with the latest update operation.
Why is this needed:
When the ConditionUpdater was originally implemented, the desired behavior of conditions had not been discussed, therefore the library was built to support both options.
Lately, we have not only switched to the Condition type from the k8s.io/apimachinery/pkg/apis/meta/v1 package, which contains an ObservedGeneration field that allows to identify outdated conditions, but we also decided that we don't want old conditions to be removed. Supporting both options is therefore no longer necessary.
Note
There are various controllers and other coding (e.g. tests) that currently use the ConditionUpdater with the value set to true. Removing the option (by implicitly always setting it to false) will lead to some refactoring in importing repositories.
- 主要言語
- Go
- スター
- 2
- フォーク
- 4
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 12
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openmcp-project/controller-utils のほかの issue
-
Dependency Dashboardオープン
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
openmcp-project/controller-utils#20 ·
メンテナーはふだん 1 日以内に返信
openmcp-project/controller-utils の issue をすべて見る
似ている issue
-
area:web p3
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Lets-Parley/Parley#912 ·
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Git-Hospital/githealthcheck#61 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
afreidah/s3-orchestrator#1824 ·
メンテナーはふだん 1 日以内に返信
-
Type: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
projectdiscovery/notify#569 ·
-
internal
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信