[MAGNOLIA-8635] Property Injection in VersionHandler DeltaTask not working Created: 11/Nov/22 Updated: 23/Oct/23 |
|
| Status: | Open |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 6.2.25 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Antonio Tuor | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 3 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| 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)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Documentation update required: |
Yes
|
| Epic Link: | DevX Bucket |
| Team: |
| Description |
|
We inject properties in the versionHandler like this: @Inject(optional = true) @Named("smtp.server") private Provider<String> smtpServer = () -> "myDefaultValue"; However, there is a different behaviour between extraInstallTasks and a deltaTask. For the DeltaTask (after a clean install) the default value is set, even if there is different value configured in the magnolia.properties file. I'm expecting that this injection works in both cases exactly the same way and holds the value from the magnolia.properties if one is set. Debug Info from getUpdateTask: I recommend to update the documentation about the properties, since it uses a deprecated method from 4.5 instead using the new MagnoliaConfigurationProperties, see: https://docs.magnolia-cms.com/product-docs/6.2/Modules/maintaining-your-module.html#_options_2_magnoliaconfigurationproperties Futhermore I recommend adding more information about the ability to inject properties with DI.
|