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

Fail or warn on build when application.properties/application.yaml is missing but application-<profile>.properties/application-<profile>.yaml is present #44871

Open
yrodiere opened this issue Dec 2, 2024 · 0 comments
Assignees
Labels
area/config kind/enhancement New feature or request

Comments

@yrodiere
Copy link
Member

yrodiere commented Dec 2, 2024

Description

When using profile aware files, we require the main file also to be present: https://quarkus.io/guides/config-reference#profile-aware-files

There's an actual reason for that, see here for an explanation: #37574 (comment)

However:

  1. This requirement is easy to miss, and missing from some relevant places, e.g. YAML config documentation: https://quarkus.io/guides/config-yaml#profiles
  2. The behavior when someone missed that requirement can be very confusing... the profile-aware file is simply ignored.

We should probably add a build-time check (at least) that detects profile-aware files, and fails the build (or warns... but I'd personally prefer a failure) if the corresponding application.properties/application.yaml file is missing, causing the profile-aware file to be ignored.

See #44807.

Implementation ideas

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants