[jira] [Commented] (SLING-12313) bump oak.version to 1.62.0 for compatibility

2024-05-15 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17846598#comment-17846598
 ] 

Julian Reschke commented on SLING-12313:


Oak and Jackrabbit dependencies should be in sync. Like that:

{noformat}
diff --git a/pom.xml b/pom.xml
index 24fb059..2e43fa7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -43,8 +43,8 @@

   
 
-2.16.3
-1.56.0
+2.20.15
+1.62.0
 4.13.3
 
2023-10-09T22:21:44Z
   
@@ -98,8 +98,8 @@
 
 
   org.apache.jackrabbit
-  jackrabbit-api
-  ${jackrabbit.version}
+  oak-jackrabbit-api
+  ${oak.version}
   provided
 
 

{noformat}

> bump oak.version to 1.62.0 for compatibility
> 
>
> Key: SLING-12313
> URL: https://issues.apache.org/jira/browse/SLING-12313
> Project: Sling
>  Issue Type: Improvement
>Reporter: Eric Norman
>Assignee: Eric Norman
>Priority: Major
> Fix For: JCR Oak Server 1.4.2
>
>
> Oak 1.62.0 has bumped the version of the shaded guava packages to a new major 
> version (from 32 to 33) which results in a failure to resolve the 
> o.a.sling.jcr.oak.server bundle with that version of the Oak bundles.
> {code:java}
> org.osgi.framework.BundleException: Unable to resolve 
> org.apache.sling.jcr.oak.server [144](R 144.0): missing requirement 
> [org.apache.sling.jcr.oak.server [144](R 144.0)] osgi.wiring.package; 
> (&(osgi.wiring.package=org.apache.jackrabbit.guava.common.base)(version>=32.1.0)(!(version>=33.0.0)))
>  Unresolved requirements: [[org.apache.sling.jcr.oak.server [144](R 144.0)] 
> osgi.wiring.package; 
> (&(osgi.wiring.package=org.apache.jackrabbit.guava.common.base)(version>=32.1.0)(!(version>=33.0.0)))]
> {code}



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


[jira] [Commented] (SLING-12266) Cache initial repository state to improve JCR_OAK performance

2024-04-11 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17836072#comment-17836072
 ] 

Julian Reschke commented on SLING-12266:


bq. there was some need form other sling modules to have a slightly newer 
version from oak in sling-mock-oak than 1.22

Would be interesting to dig out why; might be a confusion about how versioning 
is handled over in Oak.

> Cache initial repository state to improve JCR_OAK performance
> -
>
> Key: SLING-12266
> URL: https://issues.apache.org/jira/browse/SLING-12266
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing Sling Mock 3.4.18
>Reporter: Csaba Varga
>Assignee: Stefan Seifert
>Priority: Minor
>
> A lot of effort goes into preparing an Oak Mock repository from scratch: node 
> types need to be registered, indexes need to be created, and all this happens 
> over several commits. None of this work depends on the test case itself, so 
> it will always result in the exact same repository state. We could take the 
> root NodeState from the first repository we build, then build subsequent 
> repositories on top of it, avoiding most of the redundant work. Commits can 
> be relatively expensive even in memory, so each one we avoid can save a lot 
> of time in the long term.
>  
> This would require extending the contract between Testing Sling Mock and the 
> ResourceResolverTypeAdapters, to add optional "make snapshot" and "build repo 
> from snapshot" operations. For adapters that don't support them, we would 
> keep rebuilding things from scratch.



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


[jira] [Commented] (SLING-12266) Cache initial repository state to improve JCR_OAK performance

2024-04-11 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17836061#comment-17836061
 ] 

Julian Reschke commented on SLING-12266:


Yep - that's an unsupported version. Either use a recent version from the 
maintenance branch (1.22.x), or the "latest & greatest".

> Cache initial repository state to improve JCR_OAK performance
> -
>
> Key: SLING-12266
> URL: https://issues.apache.org/jira/browse/SLING-12266
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing Sling Mock 3.4.18
>Reporter: Csaba Varga
>Assignee: Stefan Seifert
>Priority: Minor
>
> A lot of effort goes into preparing an Oak Mock repository from scratch: node 
> types need to be registered, indexes need to be created, and all this happens 
> over several commits. None of this work depends on the test case itself, so 
> it will always result in the exact same repository state. We could take the 
> root NodeState from the first repository we build, then build subsequent 
> repositories on top of it, avoiding most of the redundant work. Commits can 
> be relatively expensive even in memory, so each one we avoid can save a lot 
> of time in the long term.
>  
> This would require extending the contract between Testing Sling Mock and the 
> ResourceResolverTypeAdapters, to add optional "make snapshot" and "build repo 
> from snapshot" operations. For adapters that don't support them, we would 
> keep rebuilding things from scratch.



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


[jira] [Commented] (SLING-12266) Cache initial repository state to improve JCR_OAK performance

2024-04-11 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17836055#comment-17836055
 ] 

Julian Reschke commented on SLING-12266:


AEM 6.5 should be on Oak 1.22.18 with the latest SP. If you really need to 
support older SPs, there are matching Oak versions for each.

AEM pre 6.5 is EOL and does not receive any fixes anymore.

> Cache initial repository state to improve JCR_OAK performance
> -
>
> Key: SLING-12266
> URL: https://issues.apache.org/jira/browse/SLING-12266
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing Sling Mock 3.4.18
>Reporter: Csaba Varga
>Assignee: Stefan Seifert
>Priority: Minor
>
> A lot of effort goes into preparing an Oak Mock repository from scratch: node 
> types need to be registered, indexes need to be created, and all this happens 
> over several commits. None of this work depends on the test case itself, so 
> it will always result in the exact same repository state. We could take the 
> root NodeState from the first repository we build, then build subsequent 
> repositories on top of it, avoiding most of the redundant work. Commits can 
> be relatively expensive even in memory, so each one we avoid can save a lot 
> of time in the long term.
>  
> This would require extending the contract between Testing Sling Mock and the 
> ResourceResolverTypeAdapters, to add optional "make snapshot" and "build repo 
> from snapshot" operations. For adapters that don't support them, we would 
> keep rebuilding things from scratch.



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


[jira] [Commented] (SLING-12266) Cache initial repository state to improve JCR_OAK performance

2024-04-10 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17835795#comment-17835795
 ] 

Julian Reschke commented on SLING-12266:


I'm not an expert on mocking and Oak APIs, so I really can't provide feedback 
here. If it works...

That said: please make sure to update Jackrabbit/Oak references to non-EOLd 
releases...

> Cache initial repository state to improve JCR_OAK performance
> -
>
> Key: SLING-12266
> URL: https://issues.apache.org/jira/browse/SLING-12266
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing Sling Mock 3.4.18
>Reporter: Csaba Varga
>Assignee: Stefan Seifert
>Priority: Minor
>
> A lot of effort goes into preparing an Oak Mock repository from scratch: node 
> types need to be registered, indexes need to be created, and all this happens 
> over several commits. None of this work depends on the test case itself, so 
> it will always result in the exact same repository state. We could take the 
> root NodeState from the first repository we build, then build subsequent 
> repositories on top of it, avoiding most of the redundant work. Commits can 
> be relatively expensive even in memory, so each one we avoid can save a lot 
> of time in the long term.
>  
> This would require extending the contract between Testing Sling Mock and the 
> ResourceResolverTypeAdapters, to add optional "make snapshot" and "build repo 
> from snapshot" operations. For adapters that don't support them, we would 
> keep rebuilding things from scratch.



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


[jira] [Comment Edited] (SLING-12250) Adding Resource with sling:vanityPath set causes mismatch when resolving vanity URL (timing issue)

2024-02-26 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17820743#comment-17820743
 ] 

Julian Reschke edited comment on SLING-12250 at 2/26/24 3:21 PM:
-

Well, it should resolve to what is persisted in the repo. If the test *changes* 
the repo and the resolves it, it might make time until bg init has finished and 
events are processed.

You may want to inspect DEBUG logs...


was (Author: reschke):
Well, it should resolve.

If you have a repro test case, I can have a look.

> Adding Resource with sling:vanityPath set causes mismatch when resolving 
> vanity URL (timing issue)
> --
>
> Key: SLING-12250
> URL: https://issues.apache.org/jira/browse/SLING-12250
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock 3.4.18
>Reporter: Henry Kuijpers
>Priority: Major
>
> It could happen that a Resource containing sling:vanityPath is added and then 
> resolved, but the Resource did not end up yet in the vanity logic.
> Observed with JCR_OAK mock context.
> Adding Thread.sleep(1000) fixes the issue, but it's of course not a very good 
> solution.



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


[jira] [Commented] (SLING-12250) Adding Resource with sling:vanityPath set causes mismatch when resolving vanity URL (timing issue)

2024-02-26 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17820743#comment-17820743
 ] 

Julian Reschke commented on SLING-12250:


Well, it should resolve.

If you have a repro test case, I can have a look.

> Adding Resource with sling:vanityPath set causes mismatch when resolving 
> vanity URL (timing issue)
> --
>
> Key: SLING-12250
> URL: https://issues.apache.org/jira/browse/SLING-12250
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock 3.4.18
>Reporter: Henry Kuijpers
>Priority: Major
>
> It could happen that a Resource containing sling:vanityPath is added and then 
> resolved, but the Resource did not end up yet in the vanity logic.
> Observed with JCR_OAK mock context.
> Adding Thread.sleep(1000) fixes the issue, but it's of course not a very good 
> solution.



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


[jira] [Commented] (SLING-12250) Adding Resource with sling:vanityPath set causes mismatch when resolving vanity URL (timing issue)

2024-02-26 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17820732#comment-17820732
 ] 

Julian Reschke commented on SLING-12250:


AFAIU, the path should *always* resolve. If it does not, it might be because we 
have a bug, or because the test is doing something silly :-).

> Adding Resource with sling:vanityPath set causes mismatch when resolving 
> vanity URL (timing issue)
> --
>
> Key: SLING-12250
> URL: https://issues.apache.org/jira/browse/SLING-12250
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock 3.4.18
>Reporter: Henry Kuijpers
>Priority: Major
>
> It could happen that a Resource containing sling:vanityPath is added and then 
> resolved, but the Resource did not end up yet in the vanity logic.
> Observed with JCR_OAK mock context.
> Adding Thread.sleep(1000) fixes the issue, but it's of course not a very good 
> solution.



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


[jira] [Commented] (SLING-12250) Adding Resource with sling:vanityPath set causes mismatch when resolving vanity URL (timing issue)

2024-02-13 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17817039#comment-17817039
 ] 

Julian Reschke commented on SLING-12250:


While the vanity path cache is populated, the resource resolver will query the 
repo for the path (and cache that result).

Once the cache is ready, timing will depend on event delivery.

> Adding Resource with sling:vanityPath set causes mismatch when resolving 
> vanity URL (timing issue)
> --
>
> Key: SLING-12250
> URL: https://issues.apache.org/jira/browse/SLING-12250
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock 3.4.18
>Reporter: Henry Kuijpers
>Priority: Major
>
> It could happen that a Resource containing sling:vanityPath is added and then 
> resolved, but the Resource did not end up yet in the vanity logic.
> Observed with JCR_OAK mock context.
> Adding Thread.sleep(1000) fixes the issue, but it's of course not a very good 
> solution.



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


[jira] [Commented] (SLING-11906) Migrate to slf4j 2.x

2024-01-24 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17810479#comment-17810479
 ] 

Julian Reschke commented on SLING-11906:


Awesome. Thanks.

> Migrate to slf4j 2.x
> 
>
> Key: SLING-11906
> URL: https://issues.apache.org/jira/browse/SLING-11906
> Project: Sling
>  Issue Type: Improvement
>Reporter: Eric Norman
>Priority: Major
> Fix For: Commons Log 6.0.0
>
>
> Increasingly more libraries have been migrating to slf4j 2.x (for example 
> logback 1.3+, tika 2.5+ and jetty 10+)
> To be compatible with those, the sling commons log bundle should migrate to 
> slf4j v2.x (and logback v1.4.x or v1.3.x?)
> It looks like slf4j 2.x exports both 2.x and 1.7.36 versions of the exported 
> packages, so it should hopefully be compatible with existing bundles that are 
> importing the 1.x version of the slf4j packages.



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


[jira] [Commented] (SLING-11906) Migrate to slf4j 2.x

2024-01-24 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17810475#comment-17810475
 ] 

Julian Reschke commented on SLING-11906:


[~kwin] - IIUC, Oak has similar problems wrt using SLF packages it should not? 
Could you open an issue over there once we fully understand what needs to be 
done?

> Migrate to slf4j 2.x
> 
>
> Key: SLING-11906
> URL: https://issues.apache.org/jira/browse/SLING-11906
> Project: Sling
>  Issue Type: Improvement
>Reporter: Eric Norman
>Priority: Major
> Fix For: Commons Log 6.0.0
>
>
> Increasingly more libraries have been migrating to slf4j 2.x (for example 
> logback 1.3+, tika 2.5+ and jetty 10+)
> To be compatible with those, the sling commons log bundle should migrate to 
> slf4j v2.x (and logback v1.4.x or v1.3.x?)
> It looks like slf4j 2.x exports both 2.x and 1.7.36 versions of the exported 
> packages, so it should hopefully be compatible with existing bundles that are 
> importing the 1.x version of the slf4j packages.



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


[jira] [Updated] (SLING-11511) Allow checking the map/resolve result for an empty path

2024-01-16 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-11511:
---
Fix Version/s: (was: Resource Resolver 1.11.6)

> Allow checking the map/resolve result for an empty path
> ---
>
> Key: SLING-11511
> URL: https://issues.apache.org/jira/browse/SLING-11511
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
>Reporter: Robert Munteanu
>Assignee: Robert Munteanu
>Priority: Major
>
> The resource resolver API supports mapping/resolving empty paths, although 
> this is an invalid path.
> The web console plug-in should support this as well, to better support 
> debugging for scenarios like SLING-10844 .



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


[jira] [Updated] (SLING-11513) Allow impersonating an user when checking the result of a map/resolve call

2024-01-16 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-11513:
---
Fix Version/s: (was: Resource Resolver 1.11.6)

> Allow impersonating an user when checking the result of a map/resolve call
> --
>
> Key: SLING-11513
> URL: https://issues.apache.org/jira/browse/SLING-11513
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
>Reporter: Robert Munteanu
>Assignee: Robert Munteanu
>Priority: Major
> Attachments: screenshot-1.png
>
>
> When debugging various resolve/map issues ( e.g. SLING-10844 ) it is useful 
> to be able to impersonate a user that does not have access to the web console.



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


[jira] [Resolved] (SLING-12222) MapEntries: Display the total number of loaded vanity urls / alias when loading is completed

2024-01-16 Thread Julian Reschke (Jira)


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

Julian Reschke resolved SLING-1.

Fix Version/s: Resource Resolver 1.11.6
   Resolution: Fixed

> MapEntries: Display the total number of loaded vanity urls / alias when 
> loading is completed
> 
>
> Key: SLING-1
> URL: https://issues.apache.org/jira/browse/SLING-1
> Project: Sling
>  Issue Type: Task
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.11.4
>Reporter: Joerg Hoh
>Assignee: Julian Reschke
>Priority: Minor
> Fix For: Resource Resolver 1.11.6
>
>
> Right now the completion of the loading process of vanity urls is logged like 
> this:
> {noformat}
> org.apache.sling.resourceresolver.impl.mapping.MapEntries vanity path 
> initialization - end, elapsed 459889ms
> {noformat}
> It would be nice, if the total number of vanity urls loaded during this 
> process is loaded as well; then it's possible to calculate the performance 
> ("vanity urls per second") and compare it via multiple instances.
> Would be good to have the same data for the aliases as well.



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


[jira] [Commented] (SLING-12222) MapEntries: Display the total number of loaded vanity urls / alias when loading is completed

2024-01-16 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17807154#comment-17807154
 ] 

Julian Reschke commented on SLING-1:


https://github.com/apache/sling-org-apache-sling-resourceresolver/commit/9eb03e021669a2520f96598968c00832ff6c0f47

> MapEntries: Display the total number of loaded vanity urls / alias when 
> loading is completed
> 
>
> Key: SLING-1
> URL: https://issues.apache.org/jira/browse/SLING-1
> Project: Sling
>  Issue Type: Task
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.11.4
>Reporter: Joerg Hoh
>Assignee: Julian Reschke
>Priority: Minor
> Fix For: Resource Resolver 1.11.6
>
>
> Right now the completion of the loading process of vanity urls is logged like 
> this:
> {noformat}
> org.apache.sling.resourceresolver.impl.mapping.MapEntries vanity path 
> initialization - end, elapsed 459889ms
> {noformat}
> It would be nice, if the total number of vanity urls loaded during this 
> process is loaded as well; then it's possible to calculate the performance 
> ("vanity urls per second") and compare it via multiple instances.
> Would be good to have the same data for the aliases as well.



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


[jira] [Resolved] (SLING-12225) resource resolver: revise documentation and naming of system properties for query paging

2024-01-15 Thread Julian Reschke (Jira)


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

Julian Reschke resolved SLING-12225.

Fix Version/s: Resource Resolver 1.11.6
   Resolution: Fixed

System properties removed.

https://github.com/apache/sling-org-apache-sling-resourceresolver/commit/56507f067ce057240ba9abdd2e8663b9206ef456

> resource resolver: revise documentation and naming of system properties for 
> query paging
> 
>
> Key: SLING-12225
> URL: https://issues.apache.org/jira/browse/SLING-12225
> Project: Sling
>  Issue Type: Task
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Minor
> Fix For: Resource Resolver 1.11.6
>
>
> See 
> https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/111#pullrequestreview-1792876455



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


[jira] [Commented] (SLING-12222) MapEntries: Display the total number of loaded vanity urls / alias when loading is completed

2024-01-10 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17805106#comment-17805106
 ] 

Julian Reschke commented on SLING-1:


sample output from PR'd resolver:

{noformat}
09.01.2024 17:47:51.581 *INFO* [ResourceResolverFactory registration] 
org.apache.sling.resourceresolver.impl.mapping.MapEntries alias initialization 
- end, processed 134066 resources with sling:alias properties in 34040ms (~3938 
resource/s)
09.01.2024 17:47:51.654 *INFO* [VanityPathInitializer] 
org.apache.sling.resourceresolver.impl.mapping.MapEntries vanity path 
initialization - end, processed 47 resources with sling:vanityPath properties 
in 43ms (~1083 resource/s)
{noformat}

> MapEntries: Display the total number of loaded vanity urls / alias when 
> loading is completed
> 
>
> Key: SLING-1
> URL: https://issues.apache.org/jira/browse/SLING-1
> Project: Sling
>  Issue Type: Task
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.11.4
>Reporter: Joerg Hoh
>Assignee: Julian Reschke
>Priority: Minor
>
> Right now the completion of the loading process of vanity urls is logged like 
> this:
> {noformat}
> org.apache.sling.resourceresolver.impl.mapping.MapEntries vanity path 
> initialization - end, elapsed 459889ms
> {noformat}
> It would be nice, if the total number of vanity urls loaded during this 
> process is loaded as well; then it's possible to calculate the performance 
> ("vanity urls per second") and compare it via multiple instances.
> Would be good to have the same data for the aliases as well.



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


[jira] [Commented] (SLING-12225) resource resolver: revise documentation and naming of system properties for query paging

2024-01-09 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17804677#comment-17804677
 ] 

Julian Reschke commented on SLING-12225:


It was suggested by Thomas Müller while trying different page size values.

I really do not care that much, but it's certainly easier to try different 
values without having to use a special build.

In any case, the answer should be the same & consistent for both vanity paths 
and aliases.


> resource resolver: revise documentation and naming of system properties for 
> query paging
> 
>
> Key: SLING-12225
> URL: https://issues.apache.org/jira/browse/SLING-12225
> Project: Sling
>  Issue Type: Task
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Minor
>
> See 
> https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/111#pullrequestreview-1792876455



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


[jira] [Updated] (SLING-12225) resource resolver: revise documentation and naming of system properties for query paging

2024-01-09 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-12225:
---
Summary: resource resolver: revise documentation and naming of system 
properties for query paging  (was: resource resolver: revise document and 
naming of system properties for paging)

> resource resolver: revise documentation and naming of system properties for 
> query paging
> 
>
> Key: SLING-12225
> URL: https://issues.apache.org/jira/browse/SLING-12225
> Project: Sling
>  Issue Type: Task
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Minor
>
> See 
> https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/111#pullrequestreview-1792876455



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


[jira] [Resolved] (SLING-11799) use keyset pagination for sling:alias query

2024-01-09 Thread Julian Reschke (Jira)


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

Julian Reschke resolved SLING-11799.

Fix Version/s: Resource Resolver 1.11.6
   Resolution: Fixed

> use keyset pagination for sling:alias query
> ---
>
> Key: SLING-11799
> URL: https://issues.apache.org/jira/browse/SLING-11799
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
> Fix For: Resource Resolver 1.11.6
>
>
> Similar to what was done for vanity paths (SLING-11581), we should use keyset 
> pagination for queries for sling:alias.
> This would work the same in principle, however we should keep in mind that - 
> due to the different type of data - we may have way more duplicates, so in 
> edge cases the pages might be bigger than expected. However, every size 
> reduction of "results of a single query" should help.



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


[jira] [Updated] (SLING-12225) resource resolver: revise document and naming of system properties for paging

2024-01-09 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-12225:
---
Description: See 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/111#pullrequestreview-1792876455

> resource resolver: revise document and naming of system properties for paging
> -
>
> Key: SLING-12225
> URL: https://issues.apache.org/jira/browse/SLING-12225
> Project: Sling
>  Issue Type: Task
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Minor
>
> See 
> https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/111#pullrequestreview-1792876455



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


[jira] [Created] (SLING-12225) resource resolver: revise document and naming of system properties for paging

2024-01-09 Thread Julian Reschke (Jira)
Julian Reschke created SLING-12225:
--

 Summary: resource resolver: revise document and naming of system 
properties for paging
 Key: SLING-12225
 URL: https://issues.apache.org/jira/browse/SLING-12225
 Project: Sling
  Issue Type: Task
Reporter: Julian Reschke
Assignee: Julian Reschke






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


[jira] [Commented] (SLING-12222) MapEntries: Display the total number of loaded vanity urls / alias when loading is completed

2024-01-08 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17804344#comment-17804344
 ] 

Julian Reschke commented on SLING-1:


(and the same for aliases...)

> MapEntries: Display the total number of loaded vanity urls / alias when 
> loading is completed
> 
>
> Key: SLING-1
> URL: https://issues.apache.org/jira/browse/SLING-1
> Project: Sling
>  Issue Type: Task
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.11.4
>Reporter: Joerg Hoh
>Assignee: Julian Reschke
>Priority: Minor
>
> Right now the completion of the loading process of vanity urls is logged like 
> this:
> {noformat}
> org.apache.sling.resourceresolver.impl.mapping.MapEntries vanity path 
> initialization - end, elapsed 459889ms
> {noformat}
> It would be nice, if the total number of vanity urls loaded during this 
> process is loaded as well; then it's possible to calculate the performance 
> ("vanity urls per second") and compare it via multiple instances.
> Would be good to have the same data for the aliases as well.



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


[jira] [Assigned] (SLING-12222) MapEntries: Display the total number of loaded vanity urls / alias when loading is completed

2024-01-08 Thread Julian Reschke (Jira)


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

Julian Reschke reassigned SLING-1:
--

Assignee: Julian Reschke

> MapEntries: Display the total number of loaded vanity urls / alias when 
> loading is completed
> 
>
> Key: SLING-1
> URL: https://issues.apache.org/jira/browse/SLING-1
> Project: Sling
>  Issue Type: Task
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.11.4
>Reporter: Joerg Hoh
>Assignee: Julian Reschke
>Priority: Minor
>
> Right now the completion of the loading process of vanity urls is logged like 
> this:
> {noformat}
> org.apache.sling.resourceresolver.impl.mapping.MapEntries vanity path 
> initialization - end, elapsed 459889ms
> {noformat}
> It would be nice, if the total number of vanity urls loaded during this 
> process is loaded as well; then it's possible to calculate the performance 
> ("vanity urls per second") and compare it via multiple instances.



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


[jira] [Commented] (SLING-11799) use keyset pagination for sling:alias query

2024-01-04 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17803164#comment-17803164
 ] 

Julian Reschke commented on SLING-11799:


[~thomasm] - that's what the PR imho does.

> use keyset pagination for sling:alias query
> ---
>
> Key: SLING-11799
> URL: https://issues.apache.org/jira/browse/SLING-11799
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
>
> Similar to what was done for vanity paths (SLING-11581), we should use keyset 
> pagination for queries for sling:alias.
> This would work the same in principle, however we should keep in mind that - 
> due to the different type of data - we may have way more duplicates, so in 
> edge cases the pages might be bigger than expected. However, every size 
> reduction of "results of a single query" should help.



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


[jira] [Updated] (SLING-12200) sling-org-apache-sling-graphql-core unnecessarily uses the shaded guava from graphql-java

2023-12-21 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-12200:
---
Affects Version/s: GraphQL Core 0.0.26

> sling-org-apache-sling-graphql-core unnecessarily uses the shaded guava from 
> graphql-java
> -
>
> Key: SLING-12200
> URL: https://issues.apache.org/jira/browse/SLING-12200
> Project: Sling
>  Issue Type: Improvement
>  Components: GraphQL
>Affects Versions: GraphQL Core 0.0.26
>Reporter: Manfred Baedke
>Assignee: Julian Reschke
>Priority: Trivial
>
> AFAIK shaded Guava is no longer part part of recent releases of graphql-java. 
> The only usage is 
> https://github.com/apache/sling-org-apache-sling-graphql-core/blob/30babad3caab0da0dc85bc0d645f76ca6784ef67/src/main/java/org/apache/sling/graphql/core/engine/SelectedFieldWrapper.java#L181,
>  which is trivial to replace with JavaSE.
> cc [~reschke]



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


[jira] [Assigned] (SLING-12200) sling-org-apache-sling-graphql-core unnecessarily uses the shaded guava from graphql-java

2023-12-21 Thread Julian Reschke (Jira)


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

Julian Reschke reassigned SLING-12200:
--

Assignee: Julian Reschke

> sling-org-apache-sling-graphql-core unnecessarily uses the shaded guava from 
> graphql-java
> -
>
> Key: SLING-12200
> URL: https://issues.apache.org/jira/browse/SLING-12200
> Project: Sling
>  Issue Type: Improvement
>  Components: GraphQL
>Reporter: Manfred Baedke
>Assignee: Julian Reschke
>Priority: Trivial
>
> AFAIK shaded Guava is no longer part part of recent releases of graphql-java. 
> The only usage is 
> https://github.com/apache/sling-org-apache-sling-graphql-core/blob/30babad3caab0da0dc85bc0d645f76ca6784ef67/src/main/java/org/apache/sling/graphql/core/engine/SelectedFieldWrapper.java#L181,
>  which is trivial to replace with JavaSE.
> cc [~reschke]



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


[jira] [Resolved] (SLING-12205) ResourceResolver: switch sling:alias query to JCR-SQL2

2023-12-21 Thread Julian Reschke (Jira)


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

Julian Reschke resolved SLING-12205.

Fix Version/s: Resource Resolver 1.11.6
   Resolution: Fixed

> ResourceResolver: switch sling:alias query to JCR-SQL2
> --
>
> Key: SLING-12205
> URL: https://issues.apache.org/jira/browse/SLING-12205
> Project: Sling
>  Issue Type: Task
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
> Fix For: Resource Resolver 1.11.6
>
>
> (needed to be able tp use paging later on)



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


[jira] [Updated] (SLING-12205) ResourceResolver: switch sling:alias query to JCR-SQL2

2023-12-20 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-12205:
---
Summary: ResourceResolver: switch sling:alias query to JCR-SQL2  (was: 
ResourceResolver: switch sling:alias query to JCR2)

> ResourceResolver: switch sling:alias query to JCR-SQL2
> --
>
> Key: SLING-12205
> URL: https://issues.apache.org/jira/browse/SLING-12205
> Project: Sling
>  Issue Type: Task
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
>
> (needed to be able tp use paging later on)



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


[jira] [Created] (SLING-12205) ResourceResolver: switch sling:alias query to JCR2

2023-12-20 Thread Julian Reschke (Jira)
Julian Reschke created SLING-12205:
--

 Summary: ResourceResolver: switch sling:alias query to JCR2
 Key: SLING-12205
 URL: https://issues.apache.org/jira/browse/SLING-12205
 Project: Sling
  Issue Type: Task
  Components: ResourceResolver
Reporter: Julian Reschke
Assignee: Julian Reschke


(needed to be able tp use paging later on)



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


[jira] [Resolved] (SLING-12204) ResourceResolver: refactor PagedQueryIterator for re-use

2023-12-20 Thread Julian Reschke (Jira)


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

Julian Reschke resolved SLING-12204.

Fix Version/s: Resource Resolver 1.11.6
   Resolution: Fixed

> ResourceResolver: refactor PagedQueryIterator for re-use
> 
>
> Key: SLING-12204
> URL: https://issues.apache.org/jira/browse/SLING-12204
> Project: Sling
>  Issue Type: Task
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Minor
> Fix For: Resource Resolver 1.11.6
>
>




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


[jira] [Updated] (SLING-12204) ResourceResolver: refactor PagedQueryIterator for re-use

2023-12-20 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-12204:
---
Summary: ResourceResolver: refactor PagedQueryIterator for re-use  (was: 
ResourceResolver: refactor PagedQUeryIterator for re-use)

> ResourceResolver: refactor PagedQueryIterator for re-use
> 
>
> Key: SLING-12204
> URL: https://issues.apache.org/jira/browse/SLING-12204
> Project: Sling
>  Issue Type: Task
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Minor
>




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


[jira] [Created] (SLING-12204) ResourceResolver: refactor PagedQUeryIterator for re-use

2023-12-19 Thread Julian Reschke (Jira)
Julian Reschke created SLING-12204:
--

 Summary: ResourceResolver: refactor PagedQUeryIterator for re-use
 Key: SLING-12204
 URL: https://issues.apache.org/jira/browse/SLING-12204
 Project: Sling
  Issue Type: Task
  Components: ResourceResolver
Reporter: Julian Reschke
Assignee: Julian Reschke






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


[jira] [Assigned] (SLING-12161) sling-org-apache-sling-testing-sling-mock: update to latest Oak releases

2023-11-17 Thread Julian Reschke (Jira)


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

Julian Reschke reassigned SLING-12161:
--

Assignee: Julian Reschke

> sling-org-apache-sling-testing-sling-mock: update to latest Oak releases
> 
>
> Key: SLING-12161
> URL: https://issues.apache.org/jira/browse/SLING-12161
> Project: Sling
>  Issue Type: Task
>  Components: Testing
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
>
> sling-org-apache-sling-testing-sling-mock currently uses Oak 1.22.5; it 
> should use the current maintenance release 1.22.17.



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


[jira] [Updated] (SLING-12161) sling-org-apache-sling-testing-sling-mock: update to latest Oak releases

2023-11-17 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-12161:
---
Summary: sling-org-apache-sling-testing-sling-mock: update to latest Oak 
releases  (was: sling-org-apache-sling-testing-sling-mock: update to latest Oak 
maintenance release 1.22.17)

> sling-org-apache-sling-testing-sling-mock: update to latest Oak releases
> 
>
> Key: SLING-12161
> URL: https://issues.apache.org/jira/browse/SLING-12161
> Project: Sling
>  Issue Type: Task
>  Components: Testing
>Reporter: Julian Reschke
>Priority: Major
>
> sling-org-apache-sling-testing-sling-mock currently uses Oak 1.22.5; it 
> should use the current maintenance release 1.22.17.



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


[jira] [Created] (SLING-12161) sling-org-apache-sling-testing-sling-mock: update to latest Oak maintenance release 1.22.17

2023-11-17 Thread Julian Reschke (Jira)
Julian Reschke created SLING-12161:
--

 Summary: sling-org-apache-sling-testing-sling-mock: update to 
latest Oak maintenance release 1.22.17
 Key: SLING-12161
 URL: https://issues.apache.org/jira/browse/SLING-12161
 Project: Sling
  Issue Type: Task
  Components: Testing
Reporter: Julian Reschke


sling-org-apache-sling-testing-sling-mock currently uses Oak 1.22.5; it should 
use the current maintenance release 1.22.17.




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


[jira] [Commented] (SLING-12025) ResourceResolver: different mapping when optimizedAliasResolution enabled

2023-09-29 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17770368#comment-17770368
 ] 

Julian Reschke commented on SLING-12025:


bq. Actually, when checking closer, the aliasing is not working at all, if the 
optimizedAliasing is not turned on...

Care to elaborate? :-)

> ResourceResolver: different mapping when optimizedAliasResolution enabled
> -
>
> Key: SLING-12025
> URL: https://issues.apache.org/jira/browse/SLING-12025
> Project: Sling
>  Issue Type: Task
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.10.0
>Reporter: Joerg Hoh
>Assignee: Joerg Hoh
>Priority: Major
> Fix For: Resource Resolver 1.11.2
>
>
> I found that the there is a different behavior in case the "optimized alias 
> resolution is enabled.
> Setup:
> {noformat}
> * /content/jcr:content
>   + sling:alias=foobar
> {noformat}
> In my opinion the expected behavior is that the {{content}} resource is 
> aliased and can be resolved via both {{/content}} and {{/foobar}}. You cannot 
> alias the {{jcr:content}} node. Unfortunately there are no unit tests for 
> that, and I just came across that behavior when I tried to write one.
> This works with the "optimized alias resolution" feature turned on, but if 
> it's turned off, it does not work anymore, and you can resolve that resource 
> only via its name. (In that case I assume that the jcr:content resource is 
> aliased.)
> I created 
> https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/105 to 
> demonstrate this problem.
> Is my assumption about the behavior correct?



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


[jira] [Comment Edited] (SLING-12025) ResourceResolver: different mapping when optimizedAliasResolution enabled

2023-09-18 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17766203#comment-17766203
 ] 

Julian Reschke edited comment on SLING-12025 at 9/18/23 6:57 AM:
-

I agree that the behaviour needs to be the same.

I disagree that special-casing jcr:content is useful, but it's unlikely that we 
can remove that as "feature".

Note, this might be an oversight, or it might be because the non-cached lookup 
would be even more expensive with that "feature".


was (Author: reschke):
I agree that the behaviour needs to be the same.

I disagree that special-casing jcr:content is usefuly, but it's unlikely that 
we can remove that as "feature".

> ResourceResolver: different mapping when optimizedAliasResolution enabled
> -
>
> Key: SLING-12025
> URL: https://issues.apache.org/jira/browse/SLING-12025
> Project: Sling
>  Issue Type: Task
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.10.0
>Reporter: Joerg Hoh
>Priority: Major
>
> I found that the there is a different behavior in case the "optimized alias 
> resolution is enabled.
> Setup:
> {noformat}
> * /content/jcr:content
>   + sling:alias=foobar
> {noformat}
> In my opinion the expected behavior is that the {{content}} resource is 
> aliased and can be resolved via both {{/content}} and {{/foobar}}. You cannot 
> alias the {{jcr:content}} node. Unfortunately there are no unit tests for 
> that, and I just came across that behavior when I tried to write one.
> This works with the "optimized alias resolution" feature turned on, but if 
> it's turned off, it does not work anymore, and you can resolve that resource 
> only via its name. (In that case I assume that the jcr:content resource is 
> aliased.)
> I created 
> https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/105 to 
> demonstrate this problem.
> Is my assumption about the behavior correct?



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


[jira] [Commented] (SLING-12025) ResourceResolver: different mapping when optimizedAliasResolution enabled

2023-09-17 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17766203#comment-17766203
 ] 

Julian Reschke commented on SLING-12025:


I agree that the behaviour needs to be the same.

I disagree that special-casing jcr:content is usefuly, but it's unlikely that 
we can remove that as "feature".

> ResourceResolver: different mapping when optimizedAliasResolution enabled
> -
>
> Key: SLING-12025
> URL: https://issues.apache.org/jira/browse/SLING-12025
> Project: Sling
>  Issue Type: Task
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.10.0
>Reporter: Joerg Hoh
>Priority: Major
>
> I found that the there is a different behavior in case the "optimized alias 
> resolution is enabled.
> Setup:
> {noformat}
> * /content/jcr:content
>   + sling:alias=foobar
> {noformat}
> In my opinion the expected behavior is that the {{content}} resource is 
> aliased and can be resolved via both {{/content}} and {{/foobar}}. You cannot 
> alias the {{jcr:content}} node. Unfortunately there are no unit tests for 
> that, and I just came across that behavior when I tried to write one.
> This works with the "optimized alias resolution" feature turned on, but if 
> it's turned off, it does not work anymore, and you can resolve that resource 
> only via its name. (In that case I assume that the jcr:content resource is 
> aliased.)
> I created 
> https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/105 to 
> demonstrate this problem.
> Is my assumption about the behavior correct?



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


[jira] [Resolved] (SLING-12020) resource resolver: alias metric has confusing name

2023-09-13 Thread Julian Reschke (Jira)


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

Julian Reschke resolved SLING-12020.

Fix Version/s: Resource Resolver 1.10.2
   Resolution: Fixed

> resource resolver: alias metric has confusing name
> --
>
> Key: SLING-12020
> URL: https://issues.apache.org/jira/browse/SLING-12020
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
> Fix For: Resource Resolver 1.10.2
>
>
> The metric "numberOfAliases" has a very very misleading name; actually it's 
> the number of nodes that have any number of child nodes with aliases. So, 
> this could be a magnitude less than the actual number of aliases.
> Rename? Fix? (that would require counting instead of just returning the map 
> size)



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


[jira] [Assigned] (SLING-12020) resource resolver: alias metric has confusing name

2023-09-13 Thread Julian Reschke (Jira)


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

Julian Reschke reassigned SLING-12020:
--

Assignee: Julian Reschke

> resource resolver: alias metric has confusing name
> --
>
> Key: SLING-12020
> URL: https://issues.apache.org/jira/browse/SLING-12020
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
>
> The metric "numberOfAliases" has a very very misleading name; actually it's 
> the number of nodes that have any number of child nodes with aliases. So, 
> this could be a magnitude less than the actual number of aliases.
> Rename? Fix? (that would require counting instead of just returning the map 
> size)



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


[jira] [Created] (SLING-12020) resource resolver: alias metric has confusing name

2023-09-08 Thread Julian Reschke (Jira)
Julian Reschke created SLING-12020:
--

 Summary: resource resolver: alias metric has confusing name
 Key: SLING-12020
 URL: https://issues.apache.org/jira/browse/SLING-12020
 Project: Sling
  Issue Type: Bug
  Components: ResourceResolver
Reporter: Julian Reschke


The metric "numberOfAliases" has a very very misleading name; actually it's the 
number of nodes that have any number of child nodes with aliases. So, this 
could be a magnitude less than the actual number of aliases.

Rename? Fix? (that would require counting instead of just returning the map 
size)




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


[jira] [Commented] (SLING-4228) Multi-value sling:alias property test fails (ResourceResolverTest)

2023-09-07 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-4228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17762697#comment-17762697
 ] 

Julian Reschke commented on SLING-4228:
---

Q: do we need insertion order or just stable ordering? (I don't see why we 
would need insertion order).

In the latter case, now that we are firmly beyond Java 7, we could move back to 
"HashMap()", and that should reduce the memory footprint.


> Multi-value sling:alias property test fails (ResourceResolverTest)
> --
>
> Key: SLING-4228
> URL: https://issues.apache.org/jira/browse/SLING-4228
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Bertrand Delacretaz
>Assignee: Antonio Sanso
>Priority: Minor
> Fix For: Resource Resolver 1.1.10
>
>
> The ResourceResolverTest.test_resolve_with_sling_alias_multi_value 
> server-side integration test currently fails.
> I ran it on revision 1640140 of the resourceresolver and it passes, so it 
> looks like it's http://svn.apache.org/r1640141 that broke it, which points to 
> [~asanso] committing SLING-3844
> That test sets a multi-value sling:alias property on its test node with { 
> "kind", "enfant" } as values - I'm not sure how that's supposed to work but 
> the behavior has definitely changed.
> FWIW here's how to quickly run this server-side test:
> {code}
> $ cd launchpad/testing
> $ mvn clean launchpad:run
> # in another terminal
> $ curl -X POST 
> http://localhost:/system/sling/junit/org.apache.sling.launchpad.testservices.serversidetests.ResourceResolverTest/test_resolve_with_sling_alias_multi_value.json
> ...
> "failure": 
> "test_resolve_with_sling_alias_multi_value(org.apache.sling.launchpad.testservices.serversidetests.ResourceResolverTest):
>  expected:<\/[kind]> but was:<\/[enfant]>",
> {code}
> The ResourceResolverTest  can then be debugged out of the 
> launchpad/test-services module.



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


[jira] [Resolved] (SLING-12018) resource resolver: add metrics for resources with sling:alias/vanityPath found on startup

2023-09-05 Thread Julian Reschke (Jira)


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

Julian Reschke resolved SLING-12018.

Resolution: Fixed

> resource resolver: add metrics for resources with sling:alias/vanityPath 
> found on startup
> -
>
> Key: SLING-12018
> URL: https://issues.apache.org/jira/browse/SLING-12018
> Project: Sling
>  Issue Type: New Feature
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
> Fix For: Resource Resolver 1.10.2
>
>
> ...because the data model on the resources is not the same as in the caches, 
> so we want to know the actual numbers as well.



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


[jira] [Created] (SLING-12018) resource resolver: add metrics for resources with sling:alias/vanityPath found on startup

2023-09-04 Thread Julian Reschke (Jira)
Julian Reschke created SLING-12018:
--

 Summary: resource resolver: add metrics for resources with 
sling:alias/vanityPath found on startup
 Key: SLING-12018
 URL: https://issues.apache.org/jira/browse/SLING-12018
 Project: Sling
  Issue Type: New Feature
  Components: ResourceResolver
Reporter: Julian Reschke
Assignee: Julian Reschke
 Fix For: Resource Resolver 1.10.2


...because the data model on the resources is not the same as in the caches, so 
we want to know the actual numbers as well.



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


[jira] [Resolved] (SLING-12017) resource resolver: add fallback when paged query fails due to missing index

2023-09-04 Thread Julian Reschke (Jira)


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

Julian Reschke resolved SLING-12017.

Resolution: Fixed

> resource resolver: add fallback when paged query fails due to missing index
> ---
>
> Key: SLING-12017
> URL: https://issues.apache.org/jira/browse/SLING-12017
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
> Fix For: Resource Resolver 1.10.2
>
>
> When the underlying repo supports the "first" operator, but the appropiate 
> index is missing, the query might fail with an UnspportedOperationException, 
> even though it might have suceeded without paging.
> Therefore, catch that exception and fallback to simple query.



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


[jira] [Created] (SLING-12017) resource resolver: add fallback when paged query fails due to missing index

2023-09-01 Thread Julian Reschke (Jira)
Julian Reschke created SLING-12017:
--

 Summary: resource resolver: add fallback when paged query fails 
due to missing index
 Key: SLING-12017
 URL: https://issues.apache.org/jira/browse/SLING-12017
 Project: Sling
  Issue Type: Bug
  Components: ResourceResolver
Reporter: Julian Reschke
 Fix For: Resource Resolver 1.10.2


When the underlying repo supports the "first" operator, but the appropiate 
index is missing, the query might fail with an UnspportedOperationException, 
even though it might have suceeded without paging.

Therefore, catch that exception and fallback to simple query.



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


[jira] [Assigned] (SLING-12017) resource resolver: add fallback when paged query fails due to missing index

2023-09-01 Thread Julian Reschke (Jira)


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

Julian Reschke reassigned SLING-12017:
--

Assignee: Julian Reschke

> resource resolver: add fallback when paged query fails due to missing index
> ---
>
> Key: SLING-12017
> URL: https://issues.apache.org/jira/browse/SLING-12017
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
> Fix For: Resource Resolver 1.10.2
>
>
> When the underlying repo supports the "first" operator, but the appropiate 
> index is missing, the query might fail with an UnspportedOperationException, 
> even though it might have suceeded without paging.
> Therefore, catch that exception and fallback to simple query.



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


[jira] [Comment Edited] (SLING-11799) use keyset pagination for sling:alias query

2023-08-31 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17760936#comment-17760936
 ] 

Julian Reschke edited comment on SLING-11799 at 8/31/23 1:46 PM:
-

Turns out that the number of distinct names is not *that* interesting. What 
would be needed is the (first) alias that has the most occurrences.

Assuming that aliases do not change that much, finding these during startup, 
logging interesting findings, and throwing away the data structure should be 
good enough.



was (Author: reschke):
Turns around that the number of distinct names is not *that* interesting. What 
would be needed is the (first) alias that has the most occurrences.

Assuming that aliases do not change that much, finding these during startup, 
logging interesting findings, and throwing away the data structure should be 
good enough.


> use keyset pagination for sling:alias query
> ---
>
> Key: SLING-11799
> URL: https://issues.apache.org/jira/browse/SLING-11799
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
>
> Similar to what was done for vanity paths (SLING-11581), we should use keyset 
> pagination for queries for sling:alias.
> This would work the same in principle, however we should keep in mind that - 
> due to the different type of data - we may have way more duplicates, so in 
> edge cases the pages might be bigger than expected. However, every size 
> reduction of "results of a single query" should help.



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


[jira] [Commented] (SLING-11799) use keyset pagination for sling:alias query

2023-08-31 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17760936#comment-17760936
 ] 

Julian Reschke commented on SLING-11799:


Turns around that the number of distinct names is not *that* interesting. What 
would be needed is the (first) alias that has the most occurrences.

Assuming that aliases do not change that much, finding these during startup, 
logging interesting findings, and throwing away the data structure should be 
good enough.


> use keyset pagination for sling:alias query
> ---
>
> Key: SLING-11799
> URL: https://issues.apache.org/jira/browse/SLING-11799
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
>
> Similar to what was done for vanity paths (SLING-11581), we should use keyset 
> pagination for queries for sling:alias.
> This would work the same in principle, however we should keep in mind that - 
> due to the different type of data - we may have way more duplicates, so in 
> edge cases the pages might be bigger than expected. However, every size 
> reduction of "results of a single query" should help.



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


[jira] [Commented] (SLING-11799) use keyset pagination for sling:alias query

2023-08-31 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17760896#comment-17760896
 ] 

Julian Reschke commented on SLING-11799:


I wonder whether it would be good to count the distinct alias names (or even 
the distinct first names in the alias array), and to report them as metrics. Or 
would it be sufficient to log that?

> use keyset pagination for sling:alias query
> ---
>
> Key: SLING-11799
> URL: https://issues.apache.org/jira/browse/SLING-11799
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
>
> Similar to what was done for vanity paths (SLING-11581), we should use keyset 
> pagination for queries for sling:alias.
> This would work the same in principle, however we should keep in mind that - 
> due to the different type of data - we may have way more duplicates, so in 
> edge cases the pages might be bigger than expected. However, every size 
> reduction of "results of a single query" should help.



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


[jira] [Commented] (SLING-11980) log tracer relies on Guava (15)

2023-07-21 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17745619#comment-17745619
 ] 

Julian Reschke commented on SLING-11980:


If we can't replace and don't want to embed, a potential improvement would be 
to relax the version range we can use.

> log tracer relies on Guava (15)
> ---
>
> Key: SLING-11980
> URL: https://issues.apache.org/jira/browse/SLING-11980
> Project: Sling
>  Issue Type: Improvement
>Affects Versions: Log Tracer 1.0.6
>Reporter: Julian Reschke
>Priority: Major
> Fix For: Log Tracer 1.0.8
>
>
> Log Traces has a hard dependency on Guava 15, which makes it hard to deploy 
> in environments with different Guava versions.



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


[jira] [Commented] (SLING-11980) log tracer relies on Guava 15

2023-07-21 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17745617#comment-17745617
 ] 

Julian Reschke commented on SLING-11980:


I hear you :-).

Replacing is a fine goal, but the Guava caches might make this tricky.

> log tracer relies on Guava 15
> -
>
> Key: SLING-11980
> URL: https://issues.apache.org/jira/browse/SLING-11980
> Project: Sling
>  Issue Type: Improvement
>Affects Versions: Log Tracer 1.0.6
>Reporter: Julian Reschke
>Priority: Major
> Fix For: Log Tracer 1.0.8
>
>
> Log Traces has a hard dependency on Guava 15, which makes it hard to deploy 
> in environments with different Guava versions.



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


[jira] [Updated] (SLING-11980) log tracer relies on Guava (15)

2023-07-21 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-11980:
---
Summary: log tracer relies on Guava (15)  (was: log tracer relies on Guava 
15)

> log tracer relies on Guava (15)
> ---
>
> Key: SLING-11980
> URL: https://issues.apache.org/jira/browse/SLING-11980
> Project: Sling
>  Issue Type: Improvement
>Affects Versions: Log Tracer 1.0.6
>Reporter: Julian Reschke
>Priority: Major
> Fix For: Log Tracer 1.0.8
>
>
> Log Traces has a hard dependency on Guava 15, which makes it hard to deploy 
> in environments with different Guava versions.



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


[jira] [Commented] (SLING-11980) log tracer relies on Guava 15

2023-07-21 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17745613#comment-17745613
 ] 

Julian Reschke commented on SLING-11980:


Note 


> log tracer relies on Guava 15
> -
>
> Key: SLING-11980
> URL: https://issues.apache.org/jira/browse/SLING-11980
> Project: Sling
>  Issue Type: Improvement
>Affects Versions: Log Tracer 1.0.6
>Reporter: Julian Reschke
>Priority: Major
> Fix For: Log Tracer 1.0.8
>
>
> Log Traces has a hard dependency on Guava 15, which makes it hard to deploy 
> in environments with different Guava versions.



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


[jira] [Created] (SLING-11980) log tracer relies on Guava 15

2023-07-21 Thread Julian Reschke (Jira)
Julian Reschke created SLING-11980:
--

 Summary: log tracer relies on Guava 15
 Key: SLING-11980
 URL: https://issues.apache.org/jira/browse/SLING-11980
 Project: Sling
  Issue Type: Improvement
Affects Versions: Log Tracer 1.0.6
Reporter: Julian Reschke
 Fix For: Log Tracer 1.0.8


Log Traces has a hard dependency on Guava 15, which makes it hard to deploy in 
environments with different Guava versions.



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


[jira] [Commented] (SLING-11875) make sling event reproducible

2023-06-22 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17736035#comment-17736035
 ] 

Julian Reschke commented on SLING-11875:


FWIW, I didn't get any response.

> make sling event reproducible
> -
>
> Key: SLING-11875
> URL: https://issues.apache.org/jira/browse/SLING-11875
> Project: Sling
>  Issue Type: Bug
>  Components: Event
>Affects Versions: Event 4.3.12
>Reporter: Herve Boutemy
>Priority: Major
>
> https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/apache/sling/org.apache.sling.event/README.md



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


[jira] [Updated] (SLING-11113) resource resolver: bloom filter might be out of sync on startup

2023-06-02 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-3:
---
Description: 
It appears that the bloom filter can be out of sync with the repo on startup.

Upon startup, when not present, it get's created, and updated with all vanity 
paths found in the repo. If present, it is used as is.

So for a restart of a node, there's a time window (up to save interval of 60s 
plus downtime) during which the addition of vanity paths will not be reflected 
in the bloom filter.

Now the bloom filter is only relevant if the number of vanity paths exceeds the 
maximum number, so this problem might be hard to observe.

AFAIU, the *intent* of persisting the bloom filter is to avoid the cost of 
re-filling it on startup. However, we already know that *finding* the vanity 
paths (doing the query, getting the resources and processing the properties) is 
already costly. It's dubious that avoiding the cost of updating the filter 
helps here.

Proposal: get rid of the persistence of the bloom filter altogether, reducing 
the complexity of the code significantly.

 

  was:
It appears that the bloom filter can be out of sync with the repo on startup.

Upon startup, when not present, it get's created, and updated with all vanity 
paths found in the repo. If present, it is used as is.

So for a restart of a node, there's a time window (up to save interval of 60s 
plus downtime) during which the addition of vanity paths will not be reflected 
in the bloom filter.

Now the bloom filter is only relevant if the number of vanity paths exceeds the 
maximum number, so this problem might be hard to observe.

AFAIU, the *intent* of persisting the bloom filter is to avoid the cost of 
re-filling it on startup. However, we already know that *finding* the vanity 
paths (doing the query, getting the resources and processing the properties) is 
already costly. It's dubious that avoiding the cost if updating the filter 
helps here.

Proposal: get rid of the persistence of the bloom filter altogether, reducing 
the complexity of the code significantly.

 


> resource resolver: bloom filter might be out of sync on startup
> ---
>
> Key: SLING-3
> URL: https://issues.apache.org/jira/browse/SLING-3
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.8.2
>Reporter: Julian Reschke
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Resource Resolver 1.8.4
>
> Attachments: SLING-3.diff
>
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> It appears that the bloom filter can be out of sync with the repo on startup.
> Upon startup, when not present, it get's created, and updated with all vanity 
> paths found in the repo. If present, it is used as is.
> So for a restart of a node, there's a time window (up to save interval of 60s 
> plus downtime) during which the addition of vanity paths will not be 
> reflected in the bloom filter.
> Now the bloom filter is only relevant if the number of vanity paths exceeds 
> the maximum number, so this problem might be hard to observe.
> AFAIU, the *intent* of persisting the bloom filter is to avoid the cost of 
> re-filling it on startup. However, we already know that *finding* the vanity 
> paths (doing the query, getting the resources and processing the properties) 
> is already costly. It's dubious that avoiding the cost of updating the filter 
> helps here.
> Proposal: get rid of the persistence of the bloom filter altogether, reducing 
> the complexity of the code significantly.
>  



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


[jira] [Commented] (SLING-11865) Conversion fails when initial content document does not include namespace declaration

2023-05-08 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17720578#comment-17720578
 ] 

Julian Reschke commented on SLING-11865:


Understood. But I still think it would be good to have test coverage for this 
(if not already present).

> Conversion fails when initial content document does not include namespace 
> declaration
> -
>
> Key: SLING-11865
> URL: https://issues.apache.org/jira/browse/SLING-11865
> Project: Sling
>  Issue Type: Bug
>  Components: Content-Package to Feature Model Converter
>Affects Versions: Content-Package to Feature Model Converter 1.3.2
>Reporter: Robert Munteanu
>Priority: Critical
> Fix For: Content-Package to Feature Model Converter 1.3.4
>
>
> I tried upgrading the AEM Analyser project to version 1.3.2 of the CP 
> Converter, but that detected a regression ( see 
> [https://github.com/adobe/aemanalyser-maven-plugin/pull/205] ). The failure 
> message is
> > Failed to execute goal 
> > com.adobe.aem:aemanalyser-maven-plugin:1.5.9-SNAPSHOT:project-analyse 
> > (aem-analyser) on project 
> > aemanalyser-maven-plugin-it-content-package-files-test: Content Package 
> > Converter Exception Can not convert 
> > /tmp/cp2fm-converter16836453237918368470/SLING-INF/apps/my-first-node.xml 
> > to enhanced DocView format: javax.jcr.NamespaceException: No URI for prefix 
> > 'cq' declared. -> [Help 1]
> The file, as extracted from the bundle, is
> {code:xml}
> 
> 
> 
> 
> nt:unstructured
> 
> title
> String
> My first node
> 
> 
> description
> String
> This node has been created by a sling bundle.
> 
> 
> 
> cq:EditConfig
> cq:EditConfig
> 
> description
> String
> Some dummy data from sling initial content.
> 
> 
> 
> cq:listeners
> cq:EditListenersConfig
> 
> description
> String
> Some dummy data from sling initial content.
> 
> 
> 
> 
> 
> 
> 
> graniteComponent
> granite:Component
> sling:Folder
> 
> granite:data
> nt:unstructured
> 
> description
> String
> Some dummy data from sling initial content.
> 
> 
> 
> my:subnode
> nt:unstructured
> 
> description
> String
> Some dummy data from sling initial content.
> 
> 
> 
> 
>
> 
> {code}



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


[jira] [Commented] (SLING-11865) Conversion fails when initial content document does not include namespace declaration

2023-05-08 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17720571#comment-17720571
 ] 

Julian Reschke commented on SLING-11865:


FWIW, I would *expect* Oak's DocView import to fail for that content. Maybe 
worth a test case just to be sure.

> Conversion fails when initial content document does not include namespace 
> declaration
> -
>
> Key: SLING-11865
> URL: https://issues.apache.org/jira/browse/SLING-11865
> Project: Sling
>  Issue Type: Bug
>  Components: Content-Package to Feature Model Converter
>Affects Versions: Content-Package to Feature Model Converter 1.3.2
>Reporter: Robert Munteanu
>Priority: Critical
> Fix For: Content-Package to Feature Model Converter 1.3.4
>
>
> I tried upgrading the AEM Analyser project to version 1.3.2 of the CP 
> Converter, but that detected a regression ( see 
> [https://github.com/adobe/aemanalyser-maven-plugin/pull/205] ). The failure 
> message is
> > Failed to execute goal 
> > com.adobe.aem:aemanalyser-maven-plugin:1.5.9-SNAPSHOT:project-analyse 
> > (aem-analyser) on project 
> > aemanalyser-maven-plugin-it-content-package-files-test: Content Package 
> > Converter Exception Can not convert 
> > /tmp/cp2fm-converter16836453237918368470/SLING-INF/apps/my-first-node.xml 
> > to enhanced DocView format: javax.jcr.NamespaceException: No URI for prefix 
> > 'cq' declared. -> [Help 1]
> The file, as extracted from the bundle, is
> {code:xml}
> 
> 
> 
> 
> nt:unstructured
> 
> title
> String
> My first node
> 
> 
> description
> String
> This node has been created by a sling bundle.
> 
> 
> 
> cq:EditConfig
> cq:EditConfig
> 
> description
> String
> Some dummy data from sling initial content.
> 
> 
> 
> cq:listeners
> cq:EditListenersConfig
> 
> description
> String
> Some dummy data from sling initial content.
> 
> 
> 
> 
> 
> 
> 
> graniteComponent
> granite:Component
> sling:Folder
> 
> granite:data
> nt:unstructured
> 
> description
> String
> Some dummy data from sling initial content.
> 
> 
> 
> my:subnode
> nt:unstructured
> 
> description
> String
> Some dummy data from sling initial content.
> 
> 
> 
> 
>
> 
> {code}



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


[jira] [Commented] (SLING-11861) ResourceMapper.getAllMappings returns empty mapping "" when a vanity paths is pathless url

2023-05-05 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17719715#comment-17719715
 ] 

Julian Reschke commented on SLING-11861:


Not convinced.

This is a change in behavior that could possibly cause breakage elsewhere 
(that's why we improved test coverage after all).

IMHO this needs to be fixed in the consumers of the API.

>  ResourceMapper.getAllMappings returns empty mapping "" when a vanity paths 
> is pathless url
> ---
>
> Key: SLING-11861
> URL: https://issues.apache.org/jira/browse/SLING-11861
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.10.0
>Reporter: Sagar Miglani
>Priority: Major
>
> When a resource has a path less url as vanity path (eg: 
> "http://www.example.com;) ResourceMapper.getAllMappings returns mappings 
> consisting of an empty path "".
> This "" mapping can make {{SlingAuthenticatorServiceListener}} stop listening 
> to further  authentication requirements [0]:
> {code:xml}
> Exception in thread "pool-14-thread-1" java.lang.IllegalArgumentException: 
> Configuration must not be null or empty
>   at 
> org.apache.sling.auth.core.impl.AuthenticationRequirementHolder.fromConfig(AuthenticationRequirementHolder.java:30)
>   at 
> org.apache.sling.auth.core.impl.AuthenticationRequirementsManager.addService(AuthenticationRequirementsManager.java:374)
>   at 
> org.apache.sling.auth.core.impl.AuthenticationRequirementsManager.process(AuthenticationRequirementsManager.java:300)
>   at 
> org.apache.sling.auth.core.impl.AuthenticationRequirementsManager.processQueue(AuthenticationRequirementsManager.java:281)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>   at java.base/java.lang.Thread.run(Thread.java:834)
> {code}
> Clarification required:
> - Is "" mapping/path a valid path? Should we store and return vanity path as 
> "/" in case of pathless url as vanity path?
> cc: [~cziegeler] [~rombert] [~reschke]
> [0]: 
> https://github.com/apache/sling-org-apache-sling-auth-core/blob/org.apache.sling.auth.core-1.5.0/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticatorServiceListener.java#L345-L351



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


[jira] [Created] (SLING-11835) resource resolver: should not use SNAPSHOT version of API

2023-04-19 Thread Julian Reschke (Jira)
Julian Reschke created SLING-11835:
--

 Summary: resource resolver: should not use SNAPSHOT version of API
 Key: SLING-11835
 URL: https://issues.apache.org/jira/browse/SLING-11835
 Project: Sling
  Issue Type: Task
  Components: ResourceResolver
Reporter: Julian Reschke
Assignee: Julian Reschke
 Fix For: Resource Resolver 1.10.2


Introduced during the last release 
(https://github.com/apache/sling-org-apache-sling-resourceresolver/commit/0fa68503b788bd016a9e87ab8dcf406848e0ea07)



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


[jira] [Updated] (SLING-11363) resource resolver: bloom filter incomplete when vanity path size limited

2023-03-16 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-11363:
---
Description: 
This was a problem before, but has become easier to reproduce after SLING-3:

When reading the vanity paths, processing stops after the cache is full (where 
the default is 'unlimited'). In that case, additional paths are not added to 
the bloom filter, and thus the application of the bloom filter will cause them 
never to get looked up.

  was:
This was a problem before, but has easier to reproduce after SLING-3:

When reading the vanity paths, processing stops after the cache is full (where 
the default is 'unlimited'). In that case, additional paths are not added to 
the bloom filter, and thus the application of the bloom filter will cause them 
never to get looked up.


> resource resolver: bloom filter incomplete when vanity path size limited
> 
>
> Key: SLING-11363
> URL: https://issues.apache.org/jira/browse/SLING-11363
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.8.2
>Reporter: Julian Reschke
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Resource Resolver 1.10.0
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> This was a problem before, but has become easier to reproduce after 
> SLING-3:
> When reading the vanity paths, processing stops after the cache is full 
> (where the default is 'unlimited'). In that case, additional paths are not 
> added to the bloom filter, and thus the application of the bloom filter will 
> cause them never to get looked up.



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


[jira] [Updated] (SLING-11800) resource resolver: optionally run initial alias query asynchronously

2023-03-08 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-11800:
---
Description: 
...to avoid slow startup in presence of many alias resources.

(add OSGi switch and keep the old behavior as default for now)

  was:
...to avoid slow startup in presence of many vanity path resources.

(add OSGi switch and keep the old behavior as default for now)


> resource resolver: optionally run initial alias query asynchronously
> 
>
> Key: SLING-11800
> URL: https://issues.apache.org/jira/browse/SLING-11800
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.8.6
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
>
> ...to avoid slow startup in presence of many alias resources.
> (add OSGi switch and keep the old behavior as default for now)



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


[jira] [Assigned] (SLING-11800) resource resolver: optionally run initial alias query asynchronously

2023-03-08 Thread Julian Reschke (Jira)


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

Julian Reschke reassigned SLING-11800:
--

Assignee: Julian Reschke  (was: Carsten Ziegeler)

> resource resolver: optionally run initial alias query asynchronously
> 
>
> Key: SLING-11800
> URL: https://issues.apache.org/jira/browse/SLING-11800
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.8.6
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
>
> ...to avoid slow startup in presence of many vanity path resources.
> (add OSGi switch and keep the old behavior as default for now)



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


[jira] [Updated] (SLING-11800) resource resolver: optionally run initial alias query asynchronously

2023-03-08 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-11800:
---
Fix Version/s: (was: Resource Resolver 1.9.0)

> resource resolver: optionally run initial alias query asynchronously
> 
>
> Key: SLING-11800
> URL: https://issues.apache.org/jira/browse/SLING-11800
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.8.6
>Reporter: Julian Reschke
>Assignee: Carsten Ziegeler
>Priority: Major
>
> ...to avoid slow startup in presence of many vanity path resources.
> (add OSGi switch and keep the old behavior as default for now)



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


[jira] [Created] (SLING-11800) resource resolver: optionally run initial alias query asynchronously

2023-03-08 Thread Julian Reschke (Jira)
Julian Reschke created SLING-11800:
--

 Summary: resource resolver: optionally run initial alias query 
asynchronously
 Key: SLING-11800
 URL: https://issues.apache.org/jira/browse/SLING-11800
 Project: Sling
  Issue Type: Improvement
  Components: ResourceResolver
Affects Versions: Resource Resolver 1.8.6
Reporter: Julian Reschke
Assignee: Carsten Ziegeler
 Fix For: Resource Resolver 1.9.0


...to avoid slow startup in presence of many vanity path resources.

(add OSGi switch and keep the old behavior as default for now)



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


[jira] [Assigned] (SLING-11799) use keyset pagination for sling:alias query

2023-03-08 Thread Julian Reschke (Jira)


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

Julian Reschke reassigned SLING-11799:
--

Assignee: Julian Reschke

> use keyset pagination for sling:alias query
> ---
>
> Key: SLING-11799
> URL: https://issues.apache.org/jira/browse/SLING-11799
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
>
> Similar to what was done for vanity paths (SLING-11581), we should use keyset 
> pagination for queries for sling:alias.
> This would work the same in principle, however we should keep in mind that - 
> due to the different type of data - we may have way more duplicates, so in 
> edge cases the pages might be bigger than expected. However, every size 
> reduction of "results of a single query" should help.



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


[jira] [Updated] (SLING-11799) use keyset pagination for sling:alias query

2023-03-08 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-11799:
---
Description: 
Similar to what was done for vanity paths (SLING-11581), we should use keyset 
pagination for queries for sling:alias.

This would work the same in principle, however we should keep in mind that - 
due to the different type of data - we may have way more duplicates, so in edge 
cases the pages might be bigger than expected. However, every size reduction of 
"results of a single query" should help.

> use keyset pagination for sling:alias query
> ---
>
> Key: SLING-11799
> URL: https://issues.apache.org/jira/browse/SLING-11799
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Priority: Major
>
> Similar to what was done for vanity paths (SLING-11581), we should use keyset 
> pagination for queries for sling:alias.
> This would work the same in principle, however we should keep in mind that - 
> due to the different type of data - we may have way more duplicates, so in 
> edge cases the pages might be bigger than expected. However, every size 
> reduction of "results of a single query" should help.



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


[jira] [Updated] (SLING-11799) use keyset pagination for sling:alias query

2023-03-08 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-11799:
---
Fix Version/s: (was: Resource Resolver 1.10.2)

> use keyset pagination for sling:alias query
> ---
>
> Key: SLING-11799
> URL: https://issues.apache.org/jira/browse/SLING-11799
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Priority: Major
>




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


[jira] [Created] (SLING-11799) use keyset pagination for sling:alias query

2023-03-08 Thread Julian Reschke (Jira)
Julian Reschke created SLING-11799:
--

 Summary: use keyset pagination for sling:alias query
 Key: SLING-11799
 URL: https://issues.apache.org/jira/browse/SLING-11799
 Project: Sling
  Issue Type: Bug
  Components: ResourceResolver
Reporter: Julian Reschke
 Fix For: Resource Resolver 1.10.2






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


[jira] [Resolved] (SLING-11795) resource resolver: allow env variable to set the default for resource_resolver_vanitypath_cache_in_background

2023-03-02 Thread Julian Reschke (Jira)


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

Julian Reschke resolved SLING-11795.

Resolution: Abandoned

> resource resolver: allow env variable to set the default for 
> resource_resolver_vanitypath_cache_in_background
> -
>
> Key: SLING-11795
> URL: https://issues.apache.org/jira/browse/SLING-11795
> Project: Sling
>  Issue Type: New Feature
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
>




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


[jira] [Created] (SLING-11795) resource resolver: allow env variable to set the default for resource_resolver_vanitypath_cache_in_background

2023-03-02 Thread Julian Reschke (Jira)
Julian Reschke created SLING-11795:
--

 Summary: resource resolver: allow env variable to set the default 
for resource_resolver_vanitypath_cache_in_background
 Key: SLING-11795
 URL: https://issues.apache.org/jira/browse/SLING-11795
 Project: Sling
  Issue Type: New Feature
  Components: ResourceResolver
Reporter: Julian Reschke
Assignee: Julian Reschke






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


[jira] [Commented] (SLING-11785) cpconverter: Sling-Initial-Content String values are not properly escaped in DocView XML

2023-02-24 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17693118#comment-17693118
 ] 

Julian Reschke commented on SLING-11785:


FWIW, I don't see no escaping there at all. Would need to read some more code 
to understand who's responsible for what...

> cpconverter: Sling-Initial-Content String values are not properly escaped in 
> DocView XML
> 
>
> Key: SLING-11785
> URL: https://issues.apache.org/jira/browse/SLING-11785
> Project: Sling
>  Issue Type: Bug
>  Components: Content-Package to Feature Model Converter
>Affects Versions: Content-Package to Feature Model Converter 1.3.0
>Reporter: Stefan Seifert
>Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.3.2
>
>
> it seems the cpconverter is not properly escaping string values read from 
> Sling-Initial-Content JSON files and then converting to DocView XML.
> in this sample project:
> https://github.com/stefanseifert/aem-cloud-service-deployment-issues/tree/feature/archetype-40-DRND-202-escaping
> i've introduces in [this 
> commit|https://github.com/stefanseifert/aem-cloud-service-deployment-issues/commit/866fab64b6280c213e93dbbe5c9791f1a9877f5b]
>  a JSON file in Sling-Initial-Content containing two strings with regexp 
> containing "\". those strings are transferred 1:1 to the DocView XML in the 
> content package, which is wrong. the "\" has to be escaped to be re-read 
> properly via JCR API.
> it seems the escaping rules applied by 
> {{org.apache.jackrabbit.vault.util.DocViewProperty#format}} are missing.



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


[jira] [Comment Edited] (SLING-11616) Build and test with Windows

2023-02-24 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17693081#comment-17693081
 ] 

Julian Reschke edited comment on SLING-11616 at 2/24/23 8:57 AM:
-

bq. this is obivously not a valid file name on windows

Well, the FS supports that (I can roundtrip between Cygwin and WSL just fine). 
It's just that the Windows command shell and Explorer are confused. I believe 
these should be fine.

EDIT:

so it's
{noformat}
java.nio.file.InvalidPathException: Illegal char <:> at index 4: 
/oak:index/lucene/tika/config.xml
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at java.nio.file.Paths.get(Paths.java:84)
{noformat}

So it is Java on Windows which is extra-picky, not Windows itself.

So maybe modify the test to leave out ":".


was (Author: reschke):
bq. this is obivously not a valid file name on windows

Well, the FS supports that (I can roundtrip between Cygwin and WSL just fine). 
It's just that the Windows command shell and Explorer are confused. I believe 
these should be fine.

> Build and test with Windows
> ---
>
> Key: SLING-11616
> URL: https://issues.apache.org/jira/browse/SLING-11616
> Project: Sling
>  Issue Type: Improvement
>  Components: Content-Package to Feature Model Converter
>Affects Versions: Content-Package to Feature Model Converter 1.3.0
>Reporter: Konrad Windszus
>Assignee: Stefan Seifert
>Priority: Major
>
> The ASF Jenkins should build and test on Windows as well to prevent issues 
> like SLING-11615.



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


[jira] [Commented] (SLING-11616) Build and test with Windows

2023-02-24 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17693081#comment-17693081
 ] 

Julian Reschke commented on SLING-11616:


bq. this is obivously not a valid file name on windows

Well, the FS supports that (I can roundtrip between Cygwin and WSL just fine). 
It's just that the Windows command shell and Explorer are confused. I believe 
these should be fine.

> Build and test with Windows
> ---
>
> Key: SLING-11616
> URL: https://issues.apache.org/jira/browse/SLING-11616
> Project: Sling
>  Issue Type: Improvement
>  Components: Content-Package to Feature Model Converter
>Affects Versions: Content-Package to Feature Model Converter 1.3.0
>Reporter: Konrad Windszus
>Assignee: Stefan Seifert
>Priority: Major
>
> The ASF Jenkins should build and test on Windows as well to prevent issues 
> like SLING-11615.



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


[jira] [Comment Edited] (SLING-11616) Build and test with Windows

2023-02-23 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17692874#comment-17692874
 ] 

Julian Reschke edited comment on SLING-11616 at 2/23/23 7:33 PM:
-

Let me know if I should give it a try.


was (Author: reschke):
Let me know if I should give a try.

> Build and test with Windows
> ---
>
> Key: SLING-11616
> URL: https://issues.apache.org/jira/browse/SLING-11616
> Project: Sling
>  Issue Type: Improvement
>  Components: Content-Package to Feature Model Converter
>Affects Versions: Content-Package to Feature Model Converter 1.3.0
>Reporter: Konrad Windszus
>Assignee: Stefan Seifert
>Priority: Major
>
> The ASF Jenkins should build and test on Windows as well to prevent issues 
> like SLING-11615.



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


[jira] [Commented] (SLING-11616) Build and test with Windows

2023-02-23 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17692874#comment-17692874
 ] 

Julian Reschke commented on SLING-11616:


Let me know if I should give a try.

> Build and test with Windows
> ---
>
> Key: SLING-11616
> URL: https://issues.apache.org/jira/browse/SLING-11616
> Project: Sling
>  Issue Type: Improvement
>  Components: Content-Package to Feature Model Converter
>Affects Versions: Content-Package to Feature Model Converter 1.3.0
>Reporter: Konrad Windszus
>Assignee: Stefan Seifert
>Priority: Major
>
> The ASF Jenkins should build and test on Windows as well to prevent issues 
> like SLING-11615.



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


[jira] [Resolved] (SLING-11757) resource resolver: pathless URL in vanity path causes NPE in ResourceMapperImpl.apply()

2023-02-09 Thread Julian Reschke (Jira)


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

Julian Reschke resolved SLING-11757.

Resolution: Fixed

> resource resolver: pathless URL in vanity path causes NPE in 
> ResourceMapperImpl.apply()
> ---
>
> Key: SLING-11757
> URL: https://issues.apache.org/jira/browse/SLING-11757
> Project: Sling
>  Issue Type: Sub-task
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
> Fix For: Resource Resolver 1.10.2
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> {noformat}
> java.lang.NullPointerException
> at java.lang.String.concat(String.java:2027)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:371)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:345)
> at java.util.ArrayList.replaceAll(ArrayList.java:1452)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getAllMappings(ResourceMapperImpl.java:171)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getMapping(ResourceMapperImpl.java:73)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest$ExpectedMappings.verify(ResourceMapperImplTest.java:510)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest.mapResourceWithVanityPathsURLTargetNoPath(ResourceMapperImplTest.java:402)
> {noformat}



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


[jira] [Commented] (SLING-11757) resource resolver: pathless URL in vanity path causes NPE in ResourceMapperImpl.apply()

2023-01-31 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17682586#comment-17682586
 ] 

Julian Reschke commented on SLING-11757:


Ok, thanks for the feedback.

Please review 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/94

> resource resolver: pathless URL in vanity path causes NPE in 
> ResourceMapperImpl.apply()
> ---
>
> Key: SLING-11757
> URL: https://issues.apache.org/jira/browse/SLING-11757
> Project: Sling
>  Issue Type: Sub-task
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
> Fix For: Resource Resolver 1.10.2
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> {noformat}
> java.lang.NullPointerException
> at java.lang.String.concat(String.java:2027)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:371)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:345)
> at java.util.ArrayList.replaceAll(ArrayList.java:1452)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getAllMappings(ResourceMapperImpl.java:171)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getMapping(ResourceMapperImpl.java:73)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest$ExpectedMappings.verify(ResourceMapperImplTest.java:510)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest.mapResourceWithVanityPathsURLTargetNoPath(ResourceMapperImplTest.java:402)
> {noformat}



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


[jira] [Resolved] (SLING-11342) resource resolver: use paged query for vanity paths (optionally?)

2023-01-31 Thread Julian Reschke (Jira)


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

Julian Reschke resolved SLING-11342.

Resolution: Duplicate

> resource resolver: use paged query for vanity paths (optionally?)
> -
>
> Key: SLING-11342
> URL: https://issues.apache.org/jira/browse/SLING-11342
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Priority: Major
>
> In recent Oak versions, queries will be aborted if they exceed a fixed limit 
> of hits.
> We need to do paged queries instead.



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


[jira] [Resolved] (SLING-11581) use keyset pagination for vanity path query

2023-01-31 Thread Julian Reschke (Jira)


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

Julian Reschke resolved SLING-11581.

Fix Version/s: Resource Resolver 1.10.2
   Resolution: Fixed

> use keyset pagination for vanity path query
> ---
>
> Key: SLING-11581
> URL: https://issues.apache.org/jira/browse/SLING-11581
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Priority: Major
> Fix For: Resource Resolver 1.10.2
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>




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


[jira] [Updated] (SLING-11757) resource resolver: pathless URL in vanity path causes NPE in ResourceMapperImpl.apply()

2023-01-31 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-11757:
---
Fix Version/s: Resource Resolver 1.10.2

> resource resolver: pathless URL in vanity path causes NPE in 
> ResourceMapperImpl.apply()
> ---
>
> Key: SLING-11757
> URL: https://issues.apache.org/jira/browse/SLING-11757
> Project: Sling
>  Issue Type: Sub-task
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
> Fix For: Resource Resolver 1.10.2
>
>
> {noformat}
> java.lang.NullPointerException
> at java.lang.String.concat(String.java:2027)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:371)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:345)
> at java.util.ArrayList.replaceAll(ArrayList.java:1452)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getAllMappings(ResourceMapperImpl.java:171)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getMapping(ResourceMapperImpl.java:73)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest$ExpectedMappings.verify(ResourceMapperImplTest.java:510)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest.mapResourceWithVanityPathsURLTargetNoPath(ResourceMapperImplTest.java:402)
> {noformat}



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


[jira] [Comment Edited] (SLING-11757) resource resolver: pathless URL in vanity path causes NPE in ResourceMapperImpl.apply()

2023-01-31 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17680188#comment-17680188
 ] 

Julian Reschke edited comment on SLING-11757 at 1/31/23 11:54 AM:
--

Some more thoughts:

- I'm not convinced that having a custom URI library here is a good idea - in 
particular because MapEntries uses java.net.URL for the same purpose. The 
inconsistency could couse strange bugs.
- We could "fix" URI not to return null.
- We could fix ResourceMapperImpl to handle null.
- We could also fix MapEntries to handle "scheme://x.y.z" to return "/" as 
path, but that would yield different test results
 


was (Author: reschke):
Some more thoughts:

- I'm not convinced that having a custom URI library here is a good idea - in 
particular because MapEntries uses java.net.URL for the same purpose. The 
inconsistency could couse strange bugs.
- We could "fix" URI not to return null.
- We could fix ResourceMapperImpl to handle null.
- We could alsi fix MapEntries to handle "scheme://x.y.z" to return "/" as path
 

> resource resolver: pathless URL in vanity path causes NPE in 
> ResourceMapperImpl.apply()
> ---
>
> Key: SLING-11757
> URL: https://issues.apache.org/jira/browse/SLING-11757
> Project: Sling
>  Issue Type: Sub-task
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
>
> {noformat}
> java.lang.NullPointerException
> at java.lang.String.concat(String.java:2027)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:371)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:345)
> at java.util.ArrayList.replaceAll(ArrayList.java:1452)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getAllMappings(ResourceMapperImpl.java:171)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getMapping(ResourceMapperImpl.java:73)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest$ExpectedMappings.verify(ResourceMapperImplTest.java:510)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest.mapResourceWithVanityPathsURLTargetNoPath(ResourceMapperImplTest.java:402)
> {noformat}



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


[jira] [Commented] (SLING-11757) resource resolver: pathless URL in vanity path causes NPE in ResourceMapperImpl.apply()

2023-01-31 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17682525#comment-17682525
 ] 

Julian Reschke commented on SLING-11757:


[~cziegeler], [~rombert] - I really need some feedback here.

> resource resolver: pathless URL in vanity path causes NPE in 
> ResourceMapperImpl.apply()
> ---
>
> Key: SLING-11757
> URL: https://issues.apache.org/jira/browse/SLING-11757
> Project: Sling
>  Issue Type: Sub-task
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Assignee: Julian Reschke
>Priority: Major
>
> {noformat}
> java.lang.NullPointerException
> at java.lang.String.concat(String.java:2027)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:371)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:345)
> at java.util.ArrayList.replaceAll(ArrayList.java:1452)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getAllMappings(ResourceMapperImpl.java:171)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getMapping(ResourceMapperImpl.java:73)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest$ExpectedMappings.verify(ResourceMapperImplTest.java:510)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest.mapResourceWithVanityPathsURLTargetNoPath(ResourceMapperImplTest.java:402)
> {noformat}



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


[jira] [Commented] (SLING-11757) resource resolver: pathless URL in vanity path causes NPE in ResourceMapperImpl.apply()

2023-01-24 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17680188#comment-17680188
 ] 

Julian Reschke commented on SLING-11757:


Some more thoughts:

- I'm not convinced that having a custom URI library here is a good idea - in 
particular because MapEntries uses java.net.URL for the same purpose. The 
inconsistency could couse strange bugs.
- We could "fix" URI not to return null.
- We could fix ResourceMapperImpl to handle null.
- We could alsi fix MapEntries to handle "scheme://x.y.z" to return "/" as path
 

> resource resolver: pathless URL in vanity path causes NPE in 
> ResourceMapperImpl.apply()
> ---
>
> Key: SLING-11757
> URL: https://issues.apache.org/jira/browse/SLING-11757
> Project: Sling
>  Issue Type: Sub-task
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Priority: Major
>
> {noformat}
> java.lang.NullPointerException
> at java.lang.String.concat(String.java:2027)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:371)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:345)
> at java.util.ArrayList.replaceAll(ArrayList.java:1452)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getAllMappings(ResourceMapperImpl.java:171)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getMapping(ResourceMapperImpl.java:73)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest$ExpectedMappings.verify(ResourceMapperImplTest.java:510)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest.mapResourceWithVanityPathsURLTargetNoPath(ResourceMapperImplTest.java:402)
> {noformat}



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


[jira] [Commented] (SLING-11621) Outdated JCR dependencies

2023-01-23 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17679992#comment-17679992
 ] 

Julian Reschke commented on SLING-11621:


In the above comment, you meant 1.22, not 1.42, right?

> Outdated JCR dependencies
> -
>
> Key: SLING-11621
> URL: https://issues.apache.org/jira/browse/SLING-11621
> Project: Sling
>  Issue Type: Task
>  Components: Repoinit
>Reporter: Julian Reschke
>Priority: Major
> Fix For: Repoinit JCR 1.1.44
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> https://github.com/apache/sling-org-apache-sling-jcr-repoinit/blob/9913b787574186a7a31d184480cec3862816438f/pom.xml#L39:
> {noformat}
> 2.18.2
> 1.22.1
> {noformat}
> Jackrabbit 2.18 has been EOLd quite some time ago...



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


[jira] [Commented] (SLING-11757) resource resolver: pathless URL in vanity path causes NPE in ResourceMapperImpl.apply()

2023-01-20 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17679163#comment-17679163
 ] 

Julian Reschke commented on SLING-11757:


[~rombert] - feedback appreciated...

> resource resolver: pathless URL in vanity path causes NPE in 
> ResourceMapperImpl.apply()
> ---
>
> Key: SLING-11757
> URL: https://issues.apache.org/jira/browse/SLING-11757
> Project: Sling
>  Issue Type: Sub-task
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Priority: Major
>
> {noformat}
> java.lang.NullPointerException
> at java.lang.String.concat(String.java:2027)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:371)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:345)
> at java.util.ArrayList.replaceAll(ArrayList.java:1452)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getAllMappings(ResourceMapperImpl.java:171)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getMapping(ResourceMapperImpl.java:73)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest$ExpectedMappings.verify(ResourceMapperImplTest.java:510)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest.mapResourceWithVanityPathsURLTargetNoPath(ResourceMapperImplTest.java:402)
> {noformat}



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


[jira] [Commented] (SLING-11757) resource resolver: pathless URL in vanity path causes NPE in ResourceMapperImpl.apply()

2023-01-20 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17679160#comment-17679160
 ] 

Julian Reschke commented on SLING-11757:


Turns out that the actual problem is not the empty path in itself, but that 
ResourceMapperImpl's code:

{noformat}
final URI uri = new URI(path, false);

// 1. mangle the namespaces in the path
path = mangleNamespaces(uri.getPath());
{noformat}

maps "" to null.

Fixing URI.getPath() appears to fix it:


{noformat}
diff --git 
a/src/main/java/org/apache/sling/resourceresolver/impl/helper/URI.java 
b/src/main/java/org/apache/sling/resourceresolver/impl/helper/URI.java
index 2df7eb2..554aa3a 100644
--- a/src/main/java/org/apache/sling/resourceresolver/impl/helper/URI.java
+++ b/src/main/java/org/apache/sling/resourceresolver/impl/helper/URI.java
@@ -3204,7 +3204,7 @@ public class URI implements Cloneable, Comparable, 
Serializable {
  */
 public String getPath() throws URIException {
 char[] path = getRawPath();
-return (path == null) ? null : decode(path, getProtocolCharset());
+return (path == null) ? "" : decode(path, getProtocolCharset());
 }

 /**
diff --git 
a/src/test/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImplTest.java
 
b/src/test/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImplTest.java
index e0094ca..ddfd024 100644
--- 
a/src/test/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImplTest.java
+++ 
b/src/test/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImplTest.java
@@ -392,13 +392,13 @@ public class ResourceMapperImplTest {
 /**
  * Validates that vanity paths are returned as mappings, URL shaped 
variants, empty path (see see SLING-11757)
  */
-@Test(expected = NullPointerException.class)
+@Test
 public void mapResourceWithVanityPathsURLTargetNoPath() {
 ExpectedMappings.existingResource("/vain-url-nopath")
 .singleMapping("/vain-url-nopath")
 .singleMappingWithRequest("/app/vain-url-nopath")
-.allMappings("/vain-url-nopath", "see SLING-11757")
-.allMappingsWithRequest("/app/vain-url-nopath", "see SLING-11757")
+.allMappings("/vain-url-nopath", "")
+.allMappingsWithRequest("/app/vain-url-nopath", "")
 .verify(resolver, req);
 }
{noformat}

Not sure whether the new test result is correcz, though.

> resource resolver: pathless URL in vanity path causes NPE in 
> ResourceMapperImpl.apply()
> ---
>
> Key: SLING-11757
> URL: https://issues.apache.org/jira/browse/SLING-11757
> Project: Sling
>  Issue Type: Sub-task
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Priority: Major
>
> {noformat}
> java.lang.NullPointerException
> at java.lang.String.concat(String.java:2027)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:371)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:345)
> at java.util.ArrayList.replaceAll(ArrayList.java:1452)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getAllMappings(ResourceMapperImpl.java:171)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getMapping(ResourceMapperImpl.java:73)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest$ExpectedMappings.verify(ResourceMapperImplTest.java:510)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest.mapResourceWithVanityPathsURLTargetNoPath(ResourceMapperImplTest.java:402)
> {noformat}



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


[jira] [Comment Edited] (SLING-11757) resource resolver: pathless URL in vanity path causes NPE in ResourceMapperImpl.apply()

2023-01-20 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17679160#comment-17679160
 ] 

Julian Reschke edited comment on SLING-11757 at 1/20/23 2:10 PM:
-

Turns out that the actual problem is not the empty path in itself, but that 
ResourceMapperImpl's code:

{noformat}
final URI uri = new URI(path, false);

// 1. mangle the namespaces in the path
path = mangleNamespaces(uri.getPath());
{noformat}

maps "" to null.

Fixing URI.getPath() appears to fix it:


{noformat}
diff --git 
a/src/main/java/org/apache/sling/resourceresolver/impl/helper/URI.java 
b/src/main/java/org/apache/sling/resourceresolver/impl/helper/URI.java
index 2df7eb2..554aa3a 100644
--- a/src/main/java/org/apache/sling/resourceresolver/impl/helper/URI.java
+++ b/src/main/java/org/apache/sling/resourceresolver/impl/helper/URI.java
@@ -3204,7 +3204,7 @@ public class URI implements Cloneable, Comparable, 
Serializable {
  */
 public String getPath() throws URIException {
 char[] path = getRawPath();
-return (path == null) ? null : decode(path, getProtocolCharset());
+return (path == null) ? "" : decode(path, getProtocolCharset());
 }

 /**
diff --git 
a/src/test/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImplTest.java
 
b/src/test/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImplTest.java
index e0094ca..ddfd024 100644
--- 
a/src/test/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImplTest.java
+++ 
b/src/test/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImplTest.java
@@ -392,13 +392,13 @@ public class ResourceMapperImplTest {
 /**
  * Validates that vanity paths are returned as mappings, URL shaped 
variants, empty path (see see SLING-11757)
  */
-@Test(expected = NullPointerException.class)
+@Test
 public void mapResourceWithVanityPathsURLTargetNoPath() {
 ExpectedMappings.existingResource("/vain-url-nopath")
 .singleMapping("/vain-url-nopath")
 .singleMappingWithRequest("/app/vain-url-nopath")
-.allMappings("/vain-url-nopath", "see SLING-11757")
-.allMappingsWithRequest("/app/vain-url-nopath", "see SLING-11757")
+.allMappings("/vain-url-nopath", "")
+.allMappingsWithRequest("/app/vain-url-nopath", "")
 .verify(resolver, req);
 }
{noformat}

Not sure whether the new test result is correct, though.


was (Author: reschke):
Turns out that the actual problem is not the empty path in itself, but that 
ResourceMapperImpl's code:

{noformat}
final URI uri = new URI(path, false);

// 1. mangle the namespaces in the path
path = mangleNamespaces(uri.getPath());
{noformat}

maps "" to null.

Fixing URI.getPath() appears to fix it:


{noformat}
diff --git 
a/src/main/java/org/apache/sling/resourceresolver/impl/helper/URI.java 
b/src/main/java/org/apache/sling/resourceresolver/impl/helper/URI.java
index 2df7eb2..554aa3a 100644
--- a/src/main/java/org/apache/sling/resourceresolver/impl/helper/URI.java
+++ b/src/main/java/org/apache/sling/resourceresolver/impl/helper/URI.java
@@ -3204,7 +3204,7 @@ public class URI implements Cloneable, Comparable, 
Serializable {
  */
 public String getPath() throws URIException {
 char[] path = getRawPath();
-return (path == null) ? null : decode(path, getProtocolCharset());
+return (path == null) ? "" : decode(path, getProtocolCharset());
 }

 /**
diff --git 
a/src/test/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImplTest.java
 
b/src/test/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImplTest.java
index e0094ca..ddfd024 100644
--- 
a/src/test/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImplTest.java
+++ 
b/src/test/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImplTest.java
@@ -392,13 +392,13 @@ public class ResourceMapperImplTest {
 /**
  * Validates that vanity paths are returned as mappings, URL shaped 
variants, empty path (see see SLING-11757)
  */
-@Test(expected = NullPointerException.class)
+@Test
 public void mapResourceWithVanityPathsURLTargetNoPath() {
 ExpectedMappings.existingResource("/vain-url-nopath")
 .singleMapping("/vain-url-nopath")
 .singleMappingWithRequest("/app/vain-url-nopath")
-.allMappings("/vain-url-nopath", "see SLING-11757")
-.allMappingsWithRequest("/app/vain-url-nopath", "see SLING-11757")
+.allMappings("/vain-url-nopath", "")
+.allMappingsWithRequest("/app/vain-url-nopath", "")
 .verify(resolver, req);
 }
{noformat}

Not sure whether the new test result is correcz, though.

> 

[jira] [Updated] (SLING-11756) resource resolver: rewrite getVanityPathDefinition for more clarity

2023-01-19 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-11756:
---
Summary: resource resolver: rewrite getVanityPathDefinition for more 
clarity   (was: resource resolver: rewrite getVanityPathDefinition for more 
clarify )

> resource resolver: rewrite getVanityPathDefinition for more clarity 
> 
>
> Key: SLING-11756
> URL: https://issues.apache.org/jira/browse/SLING-11756
> Project: Sling
>  Issue Type: Sub-task
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Priority: Trivial
> Fix For: Resource Resolver 1.10.2
>
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>




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


[jira] [Commented] (SLING-11755) resource resolver: add test coverage for URL patterns in vanity paths

2023-01-19 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17678599#comment-17678599
 ] 

Julian Reschke commented on SLING-11755:


Additional changes in: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/92/

> resource resolver: add test coverage for URL patterns in vanity paths
> -
>
> Key: SLING-11755
> URL: https://issues.apache.org/jira/browse/SLING-11755
> Project: Sling
>  Issue Type: Sub-task
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Priority: Minor
> Fix For: Resource Resolver 1.10.2
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>




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


[jira] [Updated] (SLING-11757) resource resolver: pathless URL in vanity path causes NPE in ResourceMapperImpl.apply()

2023-01-18 Thread Julian Reschke (Jira)


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

Julian Reschke updated SLING-11757:
---
Description: 
{noformat}
java.lang.NullPointerException
at java.lang.String.concat(String.java:2027)
at 
org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:371)
at 
org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:345)
at java.util.ArrayList.replaceAll(ArrayList.java:1452)
at 
org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getAllMappings(ResourceMapperImpl.java:171)
at 
org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getMapping(ResourceMapperImpl.java:73)
at 
org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest$ExpectedMappings.verify(ResourceMapperImplTest.java:510)
at 
org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest.mapResourceWithVanityPathsURLTargetNoPath(ResourceMapperImplTest.java:402)
{noformat}

> resource resolver: pathless URL in vanity path causes NPE in 
> ResourceMapperImpl.apply()
> ---
>
> Key: SLING-11757
> URL: https://issues.apache.org/jira/browse/SLING-11757
> Project: Sling
>  Issue Type: Sub-task
>  Components: ResourceResolver
>Reporter: Julian Reschke
>Priority: Major
>
> {noformat}
> java.lang.NullPointerException
> at java.lang.String.concat(String.java:2027)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:371)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl$ApplyContextPath.apply(ResourceMapperImpl.java:345)
> at java.util.ArrayList.replaceAll(ArrayList.java:1452)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getAllMappings(ResourceMapperImpl.java:171)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getMapping(ResourceMapperImpl.java:73)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest$ExpectedMappings.verify(ResourceMapperImplTest.java:510)
> at 
> org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImplTest.mapResourceWithVanityPathsURLTargetNoPath(ResourceMapperImplTest.java:402)
> {noformat}



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


[jira] [Created] (SLING-11757) resource resolver: pathless URL in vanity path causes NPE in ResourceMapperImpl.apply()

2023-01-18 Thread Julian Reschke (Jira)
Julian Reschke created SLING-11757:
--

 Summary: resource resolver: pathless URL in vanity path causes NPE 
in ResourceMapperImpl.apply()
 Key: SLING-11757
 URL: https://issues.apache.org/jira/browse/SLING-11757
 Project: Sling
  Issue Type: Sub-task
  Components: ResourceResolver
Reporter: Julian Reschke






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


[jira] [Created] (SLING-11756) resource resolver: rewrite getVanityPathDefinition for more clarify

2023-01-17 Thread Julian Reschke (Jira)
Julian Reschke created SLING-11756:
--

 Summary: resource resolver: rewrite getVanityPathDefinition for 
more clarify 
 Key: SLING-11756
 URL: https://issues.apache.org/jira/browse/SLING-11756
 Project: Sling
  Issue Type: Sub-task
  Components: ResourceResolver
Reporter: Julian Reschke
 Fix For: Resource Resolver 1.10.2






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


[jira] [Created] (SLING-11755) resource resolver: add test coverage for URL patterns in vanity paths

2023-01-17 Thread Julian Reschke (Jira)
Julian Reschke created SLING-11755:
--

 Summary: resource resolver: add test coverage for URL patterns in 
vanity paths
 Key: SLING-11755
 URL: https://issues.apache.org/jira/browse/SLING-11755
 Project: Sling
  Issue Type: Sub-task
  Components: ResourceResolver
Reporter: Julian Reschke






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


[jira] [Commented] (SLING-11751) sling-mock-oak: Update to Oak 1.44.0

2023-01-12 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17675887#comment-17675887
 ] 

Julian Reschke commented on SLING-11751:


Why not 1.46.0? Also, this should also update the Jackrabbit version to what is 
used in Oak.

> sling-mock-oak: Update to Oak 1.44.0
> 
>
> Key: SLING-11751
> URL: https://issues.apache.org/jira/browse/SLING-11751
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>Priority: Major
> Fix For: Testing Sling Mock Oak 3.1.6-1.44.0
>
>
> update to oak 1.44.0, some other bundles e.g. jcr resource resolver depend on 
> this version.



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


[jira] [Created] (SLING-11749) resource resolver: document URL patterns in vanity paths and add test coverage

2023-01-11 Thread Julian Reschke (Jira)
Julian Reschke created SLING-11749:
--

 Summary: resource resolver: document URL patterns in vanity paths 
and add test coverage
 Key: SLING-11749
 URL: https://issues.apache.org/jira/browse/SLING-11749
 Project: Sling
  Issue Type: Task
  Components: ResourceResolver
Reporter: Julian Reschke


MapEntries (in "private String[] getVanityPathDefinition(final String 
pVanityPath)") currently attempts to detect URL-shaped paths, and rewrite them 
to a prefix.

There are several issues here:

1. there doesn't seem to be any concrete documentation about this
2. apparently there is no test coverage - removing that code causes no test 
failures
3. it's unclear whether not replacing an empty string by "/" is intentional





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


[jira] [Commented] (SLING-11621) Outdated JCR dependencies

2023-01-11 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17672252#comment-17672252
 ] 

Julian Reschke commented on SLING-11621:


As you said, if we want to support Java 17 (to be more precise, Java 14 or 
newer), we need Oak 1.26. The change for OAK-7358 broke backwards compat, so 
it's not going to be backported to 1.22.

Why can't we use Oak 1.46?

> Outdated JCR dependencies
> -
>
> Key: SLING-11621
> URL: https://issues.apache.org/jira/browse/SLING-11621
> Project: Sling
>  Issue Type: Task
>  Components: Repoinit
>Reporter: Julian Reschke
>Priority: Major
> Fix For: Repoinit JCR 1.1.44
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> https://github.com/apache/sling-org-apache-sling-jcr-repoinit/blob/9913b787574186a7a31d184480cec3862816438f/pom.xml#L39:
> {noformat}
> 2.18.2
> 1.22.1
> {noformat}
> Jackrabbit 2.18 has been EOLd quite some time ago...



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


[jira] [Created] (SLING-11737) jcr-repoinit: SetPropertiesTest failures

2022-12-15 Thread Julian Reschke (Jira)
Julian Reschke created SLING-11737:
--

 Summary: jcr-repoinit: SetPropertiesTest failures
 Key: SLING-11737
 URL: https://issues.apache.org/jira/browse/SLING-11737
 Project: Sling
  Issue Type: Bug
  Components: Repoinit
Reporter: Julian Reschke


[ERROR] Tests run: 14, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 2.824 
s <<< FAILURE! - in org.apache.sling.jcr.repoinit.SetPropertiesTest
[ERROR] 
org.apache.sling.jcr.repoinit.SetPropertiesTest.setAutocreatedDefaultPropertiesFromPrimaryType
  Time elapsed: 0.218 s  <<< ERROR!
javax.jcr.RepositoryException: Not an absolute path: \one\two
at 
org.apache.jackrabbit.oak.jcr.session.SessionImpl.getOakPathOrThrow(SessionImpl.java:152)
at 
org.apache.jackrabbit.oak.jcr.session.SessionImpl.access$100(SessionImpl.java:82)
at 
org.apache.jackrabbit.oak.jcr.session.SessionImpl$1.performNullable(SessionImpl.java:186)
at 
org.apache.jackrabbit.oak.jcr.session.SessionImpl$1.performNullable(SessionImpl.java:182)
at 
org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performNullable(SessionDelegate.java:242)
at 
org.apache.jackrabbit.oak.jcr.session.SessionImpl.getNodeOrNull(SessionImpl.java:182)
at 
org.apache.jackrabbit.oak.jcr.session.SessionImpl.getNode(SessionImpl.java:304)


likely platform related...?



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


  1   2   3   4   >