[ 
https://issues.apache.org/jira/browse/OAK-11816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Scott Yuan updated OAK-11816:
-----------------------------
    Description: 
Currently, oak-run fails with *IllegalArgumentException* when the provided  
*FileDataStore.config* file contains properties not directly writable to the 
*FileDataStore* bean (e.g., 
{*}org.apache.sling.installer.configuration.persist{*}).  These extra 
properties are common in AEM and Sling environments for ensuring configuration 
is not written back to the JCR.

This behavior makes oak-run harder to use in real-world Oak-based setups. 

*+Proposed Improvement:+* 

Instead of failing, oak-run should:
 * Ignore unknown properties in the config file
 * Log a warning indicating the property was ignored

Code change to consider:
 * In oak-run CLI commands (e.g., {*}BlobStoreFixtureProvider{*}), enable this 
behavior by default with an option --strict-config-check to enforce unknow 
properties check.
 * Update *BlobStoreFixtureProvider.create(...)* to use this new option to set 
the the *validate* parameter when calling *PropertiesUtil.populate(...)* 

This change would improve usability of oak-run tooling in production-like AEM 
deployments and bring it in line with user expectations from OSGi configs.

Let me know if you'd like a patch or PR — happy to help!

  was:
Currently, oak-run fails with *IllegalArgumentException* when the provided  
*FileDataStore.config* file contains properties not directly writable to the 
*FileDataStore* bean (e.g., 
{*}org.apache.sling.installer.configuration.persist{*}).  These extra 
properties are common in AEM and Sling environments for ensuring configuration 
is not written back to the JCR.

This behavior makes oak-run harder to use in real-world Oak-based setups. 

*+Proposed Improvement:+* 

Instead of failing, oak-run should:
 * Ignore unknown properties in the config file
 * Log a warning indicating the property was ignored

Code change to consider:
 * Update *PropertiesUtil.populate(...)* to optionally allow ignoring unknown 
properties
 * In oak-run CLI commands (e.g., {*}BlobStoreFixtureProvider{*}), enable this 
behavior by default

This change would improve usability of oak-run tooling in production-like AEM 
deployments and bring it in line with user expectations from OSGi configs.

Let me know if you'd like a patch or PR — happy to help!


> oak-run fails on Sling-specific config properties in FileDataStore config – 
> should warn and ignore instead
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: OAK-11816
>                 URL: https://issues.apache.org/jira/browse/OAK-11816
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>         Environment: RHEL 9 + JDK 11+ Apache Sling 1.22
>            Reporter: Scott Yuan
>            Priority: Major
>
> Currently, oak-run fails with *IllegalArgumentException* when the provided  
> *FileDataStore.config* file contains properties not directly writable to the 
> *FileDataStore* bean (e.g., 
> {*}org.apache.sling.installer.configuration.persist{*}).  These extra 
> properties are common in AEM and Sling environments for ensuring 
> configuration is not written back to the JCR.
> This behavior makes oak-run harder to use in real-world Oak-based setups. 
> *+Proposed Improvement:+* 
> Instead of failing, oak-run should:
>  * Ignore unknown properties in the config file
>  * Log a warning indicating the property was ignored
> Code change to consider:
>  * In oak-run CLI commands (e.g., {*}BlobStoreFixtureProvider{*}), enable 
> this behavior by default with an option --strict-config-check to enforce 
> unknow properties check.
>  * Update *BlobStoreFixtureProvider.create(...)* to use this new option to 
> set the the *validate* parameter when calling *PropertiesUtil.populate(...)* 
> This change would improve usability of oak-run tooling in production-like AEM 
> deployments and bring it in line with user expectations from OSGi configs.
> Let me know if you'd like a patch or PR — happy to help!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to