Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa
#3,627 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java, kubernetes
Ambito
build-system

Direzione di ricerca

Inizia individuando Utils.loadFromProperties() e la configurazione di git-commit-id-maven-plugin che crea version.properties. Rinomina la risorsa di operator-framework-core e aggiorna la relativa ricerca, quindi crea uno shaded jar contenente entrambi gli artefatti del framework e verifica che il log di avvio riporti il commit id e l'ora di build dell'operator framework.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).

Lingua principale
Java
Stelle
943
Fork
245
Merge medio
2g 1h
PR unite (30g)
45

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di operator-framework/java-operator-sdk

Tutte le issue di operator-framework/java-operator-sdk

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.