You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Robert Munteanu <ro...@apache.org> on 2018/08/01 18:56:42 UTC
Re: /etc/map units tests and the issue of recursive mapping
Hi Andy,
On Mon, 2018-07-30 at 14:32 -0700, Andreas Schaefer wrote:
> Hi
>
> For SLING-7768 I created two unit test classes
> (org.apache.sling.resourceresolver, branch: feature/SLING-7768) that
> test the basic etc mapping behaving directly with MapEntries and one
> through the Resource Resolver which also includes tests using
> resolve().
>
> During my tests I ran into an issue with the /etc/map mapping that
> led to an issue where Sling became unresponsive and luckily can be
> fixed by changing the path to the /etc/map in the Resource Resolver
> Factory configuration. It might be good to provide a configuration
> settings where certain paths like the one from Composum can be
> excluded from the mapping to avoid loosing access to composum due to
> a misconfiguration in the mapping.
Do these issues appear only with the new interpolation code? If that's
not the case, please file a separate SLING issue as we should prevent
it from happening. In any case, relying on configuration is not a
definitive solution, we must avoid Sling locking up.
Thanks,
Robert
Re: /etc/map units tests and the issue of recursive mapping
Posted by Robert Munteanu <ro...@apache.org>.
On Mon, 2018-08-06 at 08:47 -0700, Andreas Schaefer wrote:
> I extracted the Etc Mapping tests and added it to master including a
> test that showcases the endless circular mapping:
>
> - EtcMappingResourceResolverTest.endless_circular_mapping()
>
> Create a ticket here:
> https://issues.apache.org/jira/browse/SLING-7810
Thanks! I think it would be much safer to guard against this in code,
rather than rely on configuration.
One option would be to stop mapping after a configurable number of
steps, e.g. 100. Maybe there are other options as well?
Thanks,
Robert
Re: /etc/map units tests and the issue of recursive mapping
Posted by Andreas Schaefer <sc...@me.com.INVALID>.
I extracted the Etc Mapping tests and added it to master including a test that showcases the endless circular mapping:
- EtcMappingResourceResolverTest.endless_circular_mapping()
Create a ticket here: https://issues.apache.org/jira/browse/SLING-7810 <https://issues.apache.org/jira/browse/SLING-7810>
Cheers - Andy Schaefer
> On Aug 2, 2018, at 11:56 AM, Andreas Schaefer <sc...@me.com.INVALID> wrote:
>
> I will migrate my tests without the Sling Interpolation to master and will add this test showcasing it and then report an issue.
>
> - Andy
>
>> On Aug 1, 2018, at 11:56 AM, Robert Munteanu <ro...@apache.org> wrote:
>>
>> Hi Andy,
>>
>> On Mon, 2018-07-30 at 14:32 -0700, Andreas Schaefer wrote:
>>> Hi
>>>
>>> For SLING-7768 I created two unit test classes
>>> (org.apache.sling.resourceresolver, branch: feature/SLING-7768) that
>>> test the basic etc mapping behaving directly with MapEntries and one
>>> through the Resource Resolver which also includes tests using
>>> resolve().
>>>
>>> During my tests I ran into an issue with the /etc/map mapping that
>>> led to an issue where Sling became unresponsive and luckily can be
>>> fixed by changing the path to the /etc/map in the Resource Resolver
>>> Factory configuration. It might be good to provide a configuration
>>> settings where certain paths like the one from Composum can be
>>> excluded from the mapping to avoid loosing access to composum due to
>>> a misconfiguration in the mapping.
>>
>> Do these issues appear only with the new interpolation code? If that's
>> not the case, please file a separate SLING issue as we should prevent
>> it from happening. In any case, relying on configuration is not a
>> definitive solution, we must avoid Sling locking up.
>>
>> Thanks,
>>
>> Robert
>
Re: /etc/map units tests and the issue of recursive mapping
Posted by Andreas Schaefer <sc...@me.com.INVALID>.
I will migrate my tests without the Sling Interpolation to master and will add this test showcasing it and then report an issue.
- Andy
> On Aug 1, 2018, at 11:56 AM, Robert Munteanu <ro...@apache.org> wrote:
>
> Hi Andy,
>
> On Mon, 2018-07-30 at 14:32 -0700, Andreas Schaefer wrote:
>> Hi
>>
>> For SLING-7768 I created two unit test classes
>> (org.apache.sling.resourceresolver, branch: feature/SLING-7768) that
>> test the basic etc mapping behaving directly with MapEntries and one
>> through the Resource Resolver which also includes tests using
>> resolve().
>>
>> During my tests I ran into an issue with the /etc/map mapping that
>> led to an issue where Sling became unresponsive and luckily can be
>> fixed by changing the path to the /etc/map in the Resource Resolver
>> Factory configuration. It might be good to provide a configuration
>> settings where certain paths like the one from Composum can be
>> excluded from the mapping to avoid loosing access to composum due to
>> a misconfiguration in the mapping.
>
> Do these issues appear only with the new interpolation code? If that's
> not the case, please file a separate SLING issue as we should prevent
> it from happening. In any case, relying on configuration is not a
> definitive solution, we must avoid Sling locking up.
>
> Thanks,
>
> Robert