Skip to content
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

Support for properties with dynamic names (e.g. Quarkus' "%dev,test") in Map-based configuration #986

Closed
jskillin-idt opened this issue Aug 29, 2023 · 2 comments · Fixed by #1080

Comments

@jskillin-idt
Copy link

jskillin-idt commented Aug 29, 2023

I was told to report an issue here as the issue stems from a lack of feature support in smallrye-config:

Given this Quarkus application.yaml file:

"%dev,test":
  quarkus:
    keycloak:
      devservices:
        roles:
          alice: sample_role

...I was expecting Quarkus (and underneath, it sounds like smallrye-config) to understand that the "quarkus" dictionary to belong to both the "dev" and "test" Quarkus profiles, but Quarkus failed to apply this configuration.

Instead, I was forced to break out the config into two duplicate copies:

---
"%dev":
  quarkus:
    keycloak:
      devservices:
        roles:
          alice: sample_role
---
"%test":
  quarkus:
    keycloak:
      devservices:
        roles:
          alice: sample_role

This works as expected if I used a properties formatted file instead, so this is specific to how YAML is interpreted. Update: this is not true. This does not work whenever the configuration terminates in a Map.

@jskillin-idt
Copy link
Author

jskillin-idt commented Aug 29, 2023

ejba added a commit to ejba/smallrye-config that referenced this issue Sep 3, 2023
ejba added a commit to ejba/smallrye-config that referenced this issue Sep 3, 2023
@radcortez
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants