issue with profile

When we request /foo/dev to config server the Git Repository get config from following files: * foo-dev.yml * application-dev.yml * foo.yml * application.yml

the Jdbc Repository get config from following lines: application | profile | label | key | value -- | -- | -- | -- | -- foo | dev | master | ... | ... foo | default | master | ... | ... application | dev | master | ... | ... application | default | master | ... | ...

When we request /foo/default to config server the Git Repository get config from following files: * foo-default.yml * application-default.yml * foo.yml * application.yml

the Jdbc Repository get config from following lines: application | profile | label | key | value -- | -- | -- | -- | -- foo | default | master | ... | ... application | default | master | ... | ...

they treat profile default differently and Jdbc Repository don't support following config: application | profile | label | key | value -- | -- | -- | -- | -- foo | null | master | ... | ... application | null | master | ... | ...

I thought they were the same as foo.yml and application.yml but they weren't.

issue with label

the Git Repository first try label main then master. the Jdbc Repository only try label master

Are they designed to be like this? If not, how should we fix this?

Comment From: ryanjbaxter

In the future please separate each issue into separate GitHub issues.

I do think that what you are saying about the profile behavior is correct, we should also get profiles with null values if default is specified.

I am not sure there is an issue with the label. We try main then master because it was a default for Git repos. That doesn't mean much in terms of JDBC.

Comment From: woshikid

OK, I'll move the label issue to a new issue. Let's focus on profiles here.

Comment From: woshikid

There's another difference that when profile dev is specified, the Git Repository will not get files with default profile but the Jdbc Repository does.

Comment From: woshikid

To keep consistency of repository behaviors, we shall make two changes to Jdbc Repository. 1. when profile dev is specified, no default profile is returned. 2. whatever the profiles is, profiles with null values should always returned.

Comment From: woshikid

@ryanjbaxter would you please check my PR #2171 , or maybe there's a better solution.