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

Colliding root-level version.properties can misreport the SDK version

クローズ
#3,627 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java, kubernetes
領域
build-system

調査の方向性

まず、Utils.loadFromProperties() と version.properties を作成する git-commit-id-maven-plugin の設定を探します。operator-framework-core のリソース名を変更してその検索処理を更新し、続いて両方の framework アーティファクトを含む shaded jar をビルドし、起動ログに operator framework の commit id と build time が出力されることを確認します。

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

説明

Bug Report

What did you do?

Built an operator as a single shaded jar depending on both io.javaoperatorsdk:operator-framework-core (5.6.1) and io.javaoperatorsdk:kubernetes-webhooks-framework-core (3.0.4). Both artifacts generate a root-level version.properties via the git-commit-id-maven-plugin, so the two files collide at the same jar entry path.

What did you expect to see?

The operator startup log reports operator-framework-core's commit id and build time, which Utils.loadFromProperties() reads from version.properties.

What did you see instead? Under which circumstances?

ClassLoader.getResourceAsStream returns the first match, so Utils can silently report the webhooks framework's commit id and build time as the SDK version. This only surfaces when the jars are merged into one (or the classpath puts the webhooks jar first), which is probably why it went unnoticed: setups that keep the jars separate, such as Quarkus, usually resolve the operator-framework-core copy first.

Possible Solution

Give each artifact a uniquely named properties file:

  • operator-framework-core: operator-sdk-version.properties, updating the lookup in Utils.loadFromProperties() (its only reader)
  • kubernetes-webhooks-framework-core: for example kubernetes-webhooks-framework-version.properties (nothing reads it today, so it is only a rename); I can file a companion issue there

Happy to contribute PRs (for both repos if needed).

主要言語
Java
スター
944
フォーク
242
平均マージ
1日 14時間
マージ済み PR(30日)
46

環境構築

はじめの一歩

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

operator-framework/java-operator-sdk のほかの issue

operator-framework/java-operator-sdk の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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