Bootstrap fails when embedding config server

Aperta
#1,257 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à
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
java, spring, spring-boot
Ambito
backend, cloud

Direzione di ricerca

Inizia con la documentazione di embedding-the-config-server e riproduci il flusso di bootstrap usando spring-cloud-context 3.1.4 e la versione corrente. Traccia ConfigClientProperties e ConfigurationPropertiesRebinder attraverso i contesti di bootstrap e dell’applicazione, usando fix #1158 come contesto. Il lavoro è completato quando un Config Server incorporato può eseguire correttamente il bootstrap senza che il comportamento deprecato comprometta il binding della configurazione.

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

Descrizione

waiting-for-triage

When embedding a Cloud Config Server and bootstrapping from that config server, the steps require using the spring.cloud.config.server.bootstrap: true flag.
https://cloud.spring.io/spring-cloud-config/multi/multi__embedding_the_config_server.html

However, the bootstrapping has been deprecated and was broken with the fix for #1158 .
Previous to this fix, when bootstrapping, two contexts would be created. The top-level was the bootstrap context and the second level was the application's context. The bootstrap context contained the bean for org.springframework.cloud.config.client.ConfigClientProperties, but the application context contained the propertySource for bootstrap.yml.

Before the fix for #1158, the ConfigurationPropertiesRebinder would bind the bean found in the bootstrap context using the application context's propertySources. I agree that this seems wrong, and can cause issues like described in #1158, however, now that the bean and propertySources need to be in the same context, I can't see a way to get an application to bootstrap properly. I believe this is a bug.

The last working version was org.springframework.cloud:spring-cloud-context: 3.1.4.

Lingua principale
Java
Stelle
751
Fork
748
Merge medio
1g 1h
PR unite (30g)
17

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 spring-cloud/spring-cloud-commons

Tutte le issue di spring-cloud/spring-cloud-commons

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.