[MAGNOLIA-7810] Fail when specified configuration profile doesn't exist Created: 25/May/20  Updated: 24/Jun/20  Resolved: 16/Jun/20

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: None
Fix Version/s: 6.2.2

Type: Improvement Priority: Neutral
Reporter: Michael Duerig Assignee: Michael Duerig
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split from MAGNOLIA-7781 Follow-up - Improve profile and magno... Closed
documentation
to be documented by MAGNOLIA-7821 DOC: Environment variable for profile... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Epic Link: Product improvements for Cloud project features
Sprint: TE 4
Story Points: 3

 Description   

Since MAGNOLIA-7781 a configuration profile can be specified through the MAGNOLIA_PROFILE environment variable. If such a profile does not exist Magnolia silently falls back to the default profile. We should change this and make Magnolia fail in such a case. (If explicitly specified the default profile could still be used).

To implement this we need to clarify what it means for a profile to exist. As an initial approach I suggest to only implement this for the case where PROFILE_INITIALIZATION_PARAMETER is not overridden and in this case fail if the directory WEB-INF/config/${env/MAGNOLIA_PROFILE} does not exit. Further refinements like checking if the directory is non empty or even whether it contains files that are actually resolved would be possible but could easily become unwieldy.


Generated at Mon Feb 12 04:27:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.