-
Notifications
You must be signed in to change notification settings - Fork 40.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConfigurationMetadataProperty name not stripped with same source types #16549
Comments
|
@philwebb |
@jvalkeal Understood. It just took me a while to work out why the same |
@philwebb I had a chat with Stephane when he was just to board his flight and I think he was planning to poke around things while being on a cloud. |
OK, I'll assign it to him so nobody else picks it up. |
Sample for this issue is in https://github.com/jvalkeal/randomstuff/tree/master/metadatanaming which uses
2.1.4.RELEASE
.Running a sample app prints (
ConfigurationMetadataProperty.getId() / ConfigurationMetadataProperty.getName()
):As you can see every property under
spring.rabbitmq.listener.simple.retry
group will not stripgroupId
from itsname
.When you i.e. use
ConfigurationMetadataRepositoryJsonBuilder
manually to build repository to get access toConfigurationMetadataProperty
's,RawConfigurationMetadata
is getting slightly confused when it's trying to strip group id from a fully qualified property name to set a simple name.Below is metadata for
spring.rabbitmq.listener.direct.retry.enabled
andspring.rabbitmq.listener.simple.retry.enabled
which have a samesourceType
.Issue seem to be
RawConfigurationMetadata.getSource()
which returns firstConfigurationMetadataSource
matching a source type. As seen above, these two properties have different group but samesourceType
, thus first match is returned. However as seen in below, when actualConfigurationMetadataItem
name is tried to re-set to a simple name(stripping group id), group prefix doesn't match, thus stripping doesn't happen.spring-boot/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/RawConfigurationMetadata.java
Lines 83 to 86 in ddc8b6f
I created this issue from spring-cloud/spring-cloud-dataflow-ui#769 and as @snicoll asked to create a sample to provide more details.
MetadataResolver
class in a sample is pretty much how we're using boot metadata in a dataflow space.The text was updated successfully, but these errors were encountered: