Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Remove ConditionUpdater's 'removeUntouched' argument

オープン
#90 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
go, kubernetes
領域
backend

調査の方向性

まず、コントローラーとテストにある ConditionUpdater とその呼び出し元を特定します。インポートを行うリポジトリでの使用箇所も含めます。removeUntouched スイッチを削除しつつ、変更されていない条件を保持する動作は維持します。その後、影響を受ける呼び出し元とテストを更新し、A、B、D の更新後も C などの条件が残ることを確認します。

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

説明

area/open-control-plane

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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

openmcp-project/controller-utils のほかの issue

openmcp-project/controller-utils の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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