Re: [VOTE] Release Apache Sling Servlets Resolver 2.7.8

2020-08-21 Thread Eric Norman
+1

On Fri, Aug 21, 2020 at 3:46 AM Radu Cotescu  wrote:

> Hi,
>
> We solved 1 issue in this release:
> https://issues.apache.org/jira/browse/SLING/fixforversion/12348693
>
> Staging repository:
> https://repository.apache.org/content/repositories/orgapachesling-2320/
>
> You can use this UNIX script to download the release and verify the
> signatures:
>
> https://gitbox.apache.org/repos/asf?p=sling-tooling-release.git;a=blob;f=check_staged_release.sh;hb=HEAD
>
> Usage:
> sh check_staged_release.sh 2320 /tmp/sling-staging
>
> Please vote to approve this release:
>
>   [ ] +1 Approve the release
>   [ ]  0 Don't care
>   [ ] -1 Don't release, because ...
>
> This majority vote is open for at least 72 hours.
>
> Regards,
> Radu Cotescu
>


[jira] [Commented] (SLING-9655) Caching support for the GraphQL core

2020-08-21 Thread Radu Cotescu (Jira)


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

Radu Cotescu commented on SLING-9655:
-

The {{Date}} header is automatically generated by Sling. I think we just need 
to add the {{Cache-Control}}, with the the {{max-age}} configured via the 
{{GraphQLServlet}} instance.

> Caching support for the GraphQL core
> 
>
> Key: SLING-9655
> URL: https://issues.apache.org/jira/browse/SLING-9655
> Project: Sling
>  Issue Type: Task
>  Components: GraphQL
>Affects Versions: GraphQL Core 0.0.4
>Reporter: Bertrand Delacretaz
>Assignee: Radu Cotescu
>Priority: Major
>
> We've discussed [on our dev 
> list|https://lists.apache.org/thread.html/r00652fa5bc54f96bb3ec01264905d9a1f36677a71070fa1b724570f9%40%3Cdev.sling.apache.org%3E]
>  how to provide caching support and we'd like to leverage front-end HTTP 
> caches that people usually use in front of Sling.
> What we've discussed is:
> * 1) GraphQL queries executed via POST are not cached by Sling
> * 2) Queries can be prepared in advance by POSTing the query text to
> Sling, which returns a "201 created" status with a URL that contains
> the query's digest, like cf81d4
> * 3) Clients run such prepared queries by making GET requests to URLs
> like /graphqlservlet/prepared/cf81d4.json
> * 4) The responses to such prepared queries requests contain HTTP
> Cache headers which might (maybe in later phase) be set from hints supplied 
> by data fetchers with configurable defaults.
> * 5) There's no guarantee on how long the prepared queries are stored, a
> client that gets a 404 on a prepared query request must be prepared to
> use the default POST request method or store the prepared query again



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


Re: [RT] Moving slingshot to a content package

2020-08-21 Thread Radu Cotescu
Go for it! :D

> On 21 Aug 2020, at 16:01, Robert Munteanu  wrote:
> 
> Thoughts?



Re: [VOTE] Release Apache Sling Scripting Core 2.3.2

2020-08-21 Thread Radu Cotescu
Hi Daniel,

> On 21 Aug 2020, at 15:40, Daniel Klco  wrote:
> 
> Hm, I am seeing some test failures:
> 
> https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-scripting-core/job/master/6/testReport/junit/
> https://ci-builds.apache.org/blue/organizations/jenkins/Sling%2Fmodules%2Fsling-org-apache-sling-scripting-core/detail/master/6/pipeline
> 

I haven’t had any issue locally and the standard output doesn’t tell me much. 
If you check the next build [0] (no code change) you’ll see that everything 
went fine. Building from the tag also works on on my end [1].

Regards,
Radu

[0] - 
https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-scripting-core/job/master/7/
 
[1]
 - https://gist.github.com/raducotescu/f2309e62300f3d9d99a883696df2ac3e 


[RT] Moving slingshot to a content package

2020-08-21 Thread Robert Munteanu
Hi,

I was thinking about converting the Slingshot sample [1] to a content
package build.

The advantages would be:

- we demonstrate how to use content packages with Sling
- better supported by the IDE tooling
- remove the need for code that alters the repository on startup such
as [2]
- increased validation for content package tooling as part of the
starter

The main disadvantage that I see would be a more complex repository
structure ( reactor build with bundle + content package + (probably)
apps package ).

Thoughts?

Robert

[1]: https://github.com/apache/sling-samples/tree/master/slingshot
[2]: 
https://github.com/apache/sling-samples/blob/47388d327fd19b629448192a9692dd3ac01ddab5/slingshot/src/main/java/org/apache/sling/sample/slingshot/impl/SetupService.java



Re: [VOTE] Release Apache Sling Servlets Resolver 2.7.8

2020-08-21 Thread Daniel Klco
+1

On Fri, Aug 21, 2020 at 8:21 AM Robert Munteanu  wrote:

> On Fri, 2020-08-21 at 10:45 +, Radu Cotescu wrote:
> > Please vote to approve this release:
>
> +1
> Robert
>


Re: [VOTE] Release Apache Sling Scripting Core 2.3.2

2020-08-21 Thread Daniel Klco
Hm, I am seeing some test failures:

https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-scripting-core/job/master/6/testReport/junit/
https://ci-builds.apache.org/blue/organizations/jenkins/Sling%2Fmodules%2Fsling-org-apache-sling-scripting-core/detail/master/6/pipeline

On Fri, Aug 21, 2020 at 8:12 AM Robert Munteanu  wrote:

> On Fri, 2020-08-21 at 10:44 +, Radu Cotescu wrote:
> > Please vote to approve this release:
>
> +1
> Robert
>


Re: [VOTE] Release Apache Sling Scripting HTL Testing Content 1.0.20-1.4.0, Apache Sling Scripting HTL JS Use Provider 1.2.6, Apache Sling Scripting HTL Engine 1.4.2-1.4.0, Apache Sling Scripting HTL

2020-08-21 Thread Andrei Dulvac
+1

- Andrei

On Fri, 21 Aug 2020 at 14:22, Robert Munteanu  wrote:

> On Fri, 2020-08-21 at 11:17 +, Radu Cotescu wrote:
>
> > sh check_staged_release.sh 2321 /tmp/sling-staging
>
>
>
> +1
>
> Robert
>
>


[jira] [Commented] (SLING-9622) Avoid registration of auth requirements for aliases and vanity paths

2020-08-21 Thread Angela Schreiber (Jira)


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

Angela Schreiber commented on SLING-9622:
-

[~rombert], from my distant pov, i start to get the impression that we keep 
working around a pretty fundamental issue within the resource resolution namely 
{{ResourceResolver.resolve}} being (potentially) expensive because of a variety 
of mapping features (alias, vanity-path and the etc-mapping entries). as far as 
i understand so far these mapping features seem to overlap in their 
functionality. 
as a first workaround, we started registering alias-paths and vanity-paths as 
authentication requirements and realized that this doesn't work for nested 
vanity paths. for those nested vanity-paths we considered adding a 
vanity-path-resolve short-cut and found out that this might not be sufficient 
because of the etc-mapping entries. so, another workaround might be needed 
and all the workarounds could be avoided if resource-resolution wouldn't be a 
performance concern. i do understand and share the concerns because of the 
impact and risk associated, but it might be worth keeping in mind before we 
start writing a lot of code that further increases complexity and due to the 
'inconsistency' (some mapped paths are registered as auth-req but others are 
not) might be prone to subtle bugs impacting authentication in sling.



> Avoid registration of auth requirements for aliases and vanity paths
> 
>
> Key: SLING-9622
> URL: https://issues.apache.org/jira/browse/SLING-9622
> Project: Sling
>  Issue Type: Improvement
>  Components: Authentication
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Auth Core 1.5.0
>
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Right now when auth requirements are registered, they need to be registered 
> for the resource path, as well as all vanity paths and potentially all 
> combinations of aliases for that path. First of all, this creates potentially 
> a lot of auth requirements for a single path, but as well requires that the 
> registrar of the auth requirement to be aware of vanity paths and aliases and 
> do the right thing and update the auth requirements whenever there are 
> changes.
> We should avoid these additional registrations and processing.
> The SlingAuthenticator is currently checking the request path against the 
> auth requirements. We could change this with checking the resolved path. So 
> the authenticator could use a service user resolver and resolve the path and 
> then check the auth requirements.
> This avoids all the extra work for the registrar of the auth requirements, 
> but comes with the additional cost of a resolve call per request



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


Re: [VOTE] Release Apache Sling Scripting HTL Testing Content 1.0.20-1.4.0, Apache Sling Scripting HTL JS Use Provider 1.2.6, Apache Sling Scripting HTL Engine 1.4.2-1.4.0, Apache Sling Scripting HTL

2020-08-21 Thread Robert Munteanu
On Fri, 2020-08-21 at 11:17 +, Radu Cotescu wrote:
> sh check_staged_release.sh 2321 /tmp/sling-staging

+1
Robert


signature.asc
Description: This is a digitally signed message part


Re: [VOTE] Release Apache Sling Servlets Resolver 2.7.8

2020-08-21 Thread Robert Munteanu
On Fri, 2020-08-21 at 10:45 +, Radu Cotescu wrote:
> Please vote to approve this release:

+1
Robert


signature.asc
Description: This is a digitally signed message part


Re: [VOTE] Release Apache Sling Scripting Core 2.3.2

2020-08-21 Thread Robert Munteanu
On Fri, 2020-08-21 at 10:44 +, Radu Cotescu wrote:
> Please vote to approve this release:

+1
Robert


signature.asc
Description: This is a digitally signed message part


[jira] [Updated] (SLING-9040) High resource consumption when activating/deactivating ResourceProviders

2020-08-21 Thread Robert Munteanu (Jira)


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

Robert Munteanu updated SLING-9040:
---
Fix Version/s: (was: Resource Resolver 1.6.18)

> High resource consumption when activating/deactivating ResourceProviders
> 
>
> Key: SLING-9040
> URL: https://issues.apache.org/jira/browse/SLING-9040
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Dirk Rudolph
>Priority: Blocker
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> With SLING-8946 the updating of all ResourceProviders when their exclude path 
> set changes was introduced to prevent non-deterministic behaviour of resource 
> observation. 
> This change though caused calling {{updateProviderContext()}} and 
> {{ResourceProviderHandler#update()}} on every registered 
> {{ResourceProviderHandler}} when a new ResourceProvider was 
> activated/deactivated no matter if the paths actually intersect. 
> This is quite resource consuming (processing time and memory) and should be 
> reduced to update only those handlers that actually intersect with the 
> handler added/removed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (SLING-9040) High resource consumption when activating/deactivating ResourceProviders

2020-08-21 Thread Robert Munteanu (Jira)


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

Robert Munteanu resolved SLING-9040.

Resolution: Duplicate

I'm resolving this as a duplicate of SLING-8946, since the fixes for that issue 
should be done without affecting performance.

> High resource consumption when activating/deactivating ResourceProviders
> 
>
> Key: SLING-9040
> URL: https://issues.apache.org/jira/browse/SLING-9040
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Dirk Rudolph
>Priority: Blocker
> Fix For: Resource Resolver 1.6.18
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> With SLING-8946 the updating of all ResourceProviders when their exclude path 
> set changes was introduced to prevent non-deterministic behaviour of resource 
> observation. 
> This change though caused calling {{updateProviderContext()}} and 
> {{ResourceProviderHandler#update()}} on every registered 
> {{ResourceProviderHandler}} when a new ResourceProvider was 
> activated/deactivated no matter if the paths actually intersect. 
> This is quite resource consuming (processing time and memory) and should be 
> reduced to update only those handlers that actually intersect with the 
> handler added/removed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (SLING-9676) Improve Javadoc for MapEntriesHandler

2020-08-21 Thread Robert Munteanu (Jira)


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

Robert Munteanu resolved SLING-9676.

Resolution: Fixed

> Improve Javadoc for MapEntriesHandler
> -
>
> Key: SLING-9676
> URL: https://issues.apache.org/jira/browse/SLING-9676
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
>Reporter: Angela Schreiber
>Assignee: Robert Munteanu
>Priority: Minor
> Fix For: Resource Resolver 1.6.18
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> in the light of SLING-9622 i was looking into the {{MapEntriesHandler}} 
> interface and would have found helpful if there would be JavaDoc associated 
> with {{getAliasMap}} and {{getMapMaps}} methods.
> Also the javadoc with {{getResolveMaps}} and {{getResolveMapsIterator}} could 
> be improved by describing in more detail the nature of the return value (and 
> not just where it's being used in case of {{getResolveMaps}}).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (SLING-8946) Non-deterministic shadowing of resource observation

2020-08-21 Thread Robert Munteanu (Jira)


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

Robert Munteanu reassigned SLING-8946:
--

Assignee: (was: Robert Munteanu)

> Non-deterministic shadowing of resource observation
> ---
>
> Key: SLING-8946
> URL: https://issues.apache.org/jira/browse/SLING-8946
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.5.34
>Reporter: Dirk Rudolph
>Priority: Critical
> Fix For: Resource Resolver 1.6.18
>
> Attachments: PerformanceScript.sh
>
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> The BasicObservationReporter implements shadowing of events being propagated 
> per ResourceProvider instance [1]. Assuming we do have 2 ResourceProviders 
> registered, where the one shadows the other like this:
>  - RP A registered on /
>  - RP B registered on /path
> then currently the excludes given to the BasicObservationReporter are 
> different depending on either RP A or RP B gets registered first:
>  - RP A before RP B => excludes are empty
>  - RP B before RP A => excludes contain /path
> This is because only the newly registered RP gets its ProviderContext updated 
> [2]
> Same applies if RP B is registered before RP A and gets unregistered. In that 
> case the ObservationReporter of RP A stays untouched.
> [1] 
> [https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/master/src/main/java/org/apache/sling/resourceresolver/impl/observation/BasicObservationReporter.java#L102]
>  [2] 
> [https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/master/src/main/java/org/apache/sling/resourceresolver/impl/providers/ResourceProviderTracker.java#L358]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [sling-org-apache-sling-resourceresolver] rombert merged pull request #20: SLING-9676 - Improve Javadoc for MapEntriesHandler

2020-08-21 Thread GitBox


rombert merged pull request #20:
URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/20


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Commented] (SLING-9680) Sling Mocks: Add easy way to inject SlingBindings into MockSlingHttpServletRequest

2020-08-21 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-9680:


I see that my {{MockSlingHttpServletRequest}} has {{MockSlingBindings}} 
injected in the right request attribute, however I don't see any 
{{BindingsValuesProvider}} being considered. How can I easily add those values 
as well to the request attribute when I want to test my Sling Model which is 
leveraging the {{org.apache.sling.models.impl.injectors.BindingsInjector}}?

> Sling Mocks: Add easy way to inject SlingBindings into 
> MockSlingHttpServletRequest
> --
>
> Key: SLING-9680
> URL: https://issues.apache.org/jira/browse/SLING-9680
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing Sling Mock 2.5.0
>Reporter: Konrad Windszus
>Priority: Major
>
> As SlingBindings are often crucial when dealing with Sling Models there 
> should be an easy way to set them for a mocked request 
> (https://sling.apache.org/documentation/development/sling-mock.html#slinghttpservletrequest)
> A dedicated method which automatically fills the SlingBindings with the 
> mandatory stuff and another one to add additional bindings would be very 
> helpful.
> Also injecting values from all registered {{BindingsValuesProvider}} with a 
> specific context would be useful.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[VOTE] Release Apache Sling Scripting HTL Testing Content 1.0.20-1.4.0, Apache Sling Scripting HTL JS Use Provider 1.2.6, Apache Sling Scripting HTL Engine 1.4.2-1.4.0, Apache Sling Scripting HTL Test

2020-08-21 Thread Radu Cotescu
Hi,

We solved 5 issues in these releases:
https://issues.apache.org/jira/browse/SLING/fixforversion/12348702
https://issues.apache.org/jira/browse/SLING/fixforversion/12348656
https://issues.apache.org/jira/browse/SLING/fixforversion/12348701
https://issues.apache.org/jira/browse/SLING/fixforversion/12347151

Staging repository:
https://repository.apache.org/content/repositories/orgapachesling-2321/

You can use this UNIX script to download the release and verify the signatures:
https://gitbox.apache.org/repos/asf?p=sling-tooling-release.git;a=blob;f=check_staged_release.sh;hb=HEAD

Usage:
sh check_staged_release.sh 2321 /tmp/sling-staging

Please vote to approve this release:

  [ ] +1 Approve the release
  [ ]  0 Don't care
  [ ] -1 Don't release, because ...

This majority vote is open for at least 72 hours.

Regards,
Radu Cotescu


[jira] [Updated] (SLING-9671) Allow non-bundled inheriting resource types to override Use-API templates

2020-08-21 Thread Radu Cotescu (Jira)


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

Radu Cotescu updated SLING-9671:

Fix Version/s: Scripting HTL Testing Content 1.0.20-1.4.0

> Allow non-bundled inheriting resource types to override Use-API templates
> -
>
> Key: SLING-9671
> URL: https://issues.apache.org/jira/browse/SLING-9671
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting HTL Engine 1.4.0-1.4.0
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting HTL Testing 1.0.22-1.4.0, Scripting HTL Engine 
> 1.4.2-1.4.0, Scripting HTL Testing Content 1.0.20-1.4.0
>
>
> SLING-9328 added support for loading templates via the 
> {{org.apache.sling.servlets.resolver.bundle.tracker.BundledRenderUnit}} API. 
> However, when working with a bundled HTL script (precompiled or not), only 
> template libraries available via the bundled script's 
> {{org.apache.sling.servlets.resolver.bundle.tracker.TypeProvider}} hierarchy 
> are considered, not allowing scripts from the resource tree to override the 
> behaviour.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9671) Allow non-bundled inheriting resource types to override Use-API templates

2020-08-21 Thread Radu Cotescu (Jira)


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

Radu Cotescu updated SLING-9671:

Fix Version/s: Scripting HTL Testing 1.0.22-1.4.0

> Allow non-bundled inheriting resource types to override Use-API templates
> -
>
> Key: SLING-9671
> URL: https://issues.apache.org/jira/browse/SLING-9671
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting HTL Engine 1.4.0-1.4.0
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting HTL Testing 1.0.22-1.4.0, Scripting HTL Engine 
> 1.4.2-1.4.0
>
>
> SLING-9328 added support for loading templates via the 
> {{org.apache.sling.servlets.resolver.bundle.tracker.BundledRenderUnit}} API. 
> However, when working with a bundled HTL script (precompiled or not), only 
> template libraries available via the bundled script's 
> {{org.apache.sling.servlets.resolver.bundle.tracker.TypeProvider}} hierarchy 
> are considered, not allowing scripts from the resource tree to override the 
> behaviour.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9657) Same-name JS Use dependencies are not always correctly resolved

2020-08-21 Thread Radu Cotescu (Jira)


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

Radu Cotescu updated SLING-9657:

Fix Version/s: Scripting HTL Testing 1.0.22-1.4.0
   Scripting HTL Testing Content 1.0.20-1.4.0

> Same-name JS Use dependencies are not always correctly resolved
> ---
>
> Key: SLING-9657
> URL: https://issues.apache.org/jira/browse/SLING-9657
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting HTL JS Use Provider 1.2.4
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting HTL Testing 1.0.22-1.4.0, Scripting HTL JS Use 
> Provider 1.2.6, Scripting HTL Testing Content 1.0.20-1.4.0
>
>
> When solving JS dependencies using the resource-type hierarchy, the 
> resolution is not always correct.
> Example content structure:
> {noformat}
> /apps/page/
> page.html
> head.js
> /apps/project/page
> [sling:resourceSuperType=page]
> page.html
> partials/
> head.html
> head.js
> {noformat}
> Example calling model:
> {{/apps/project/page/page.html}}
> {code:html}
> 
> {code}
> {{/apps/project/page/partials/head.html}}
> {code:html}
> 
> {code}
> With the above setup, the {{head.js}} script being select is the one from 
> {{/apps/page/head.js}}, instead of the file inside {{partials}}. While this 
> takes the resource type hierarchy into consideration, the correct caller is 
> {{partials/head.html}}, hence why the resolution should happen "locally".



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Closed] (SLING-9588) The FSClassLoaderProvider activate/deactivate is racing to unregister the MBean

2020-08-21 Thread Karl Pauls (Jira)


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

Karl Pauls closed SLING-9588.
-

> The FSClassLoaderProvider activate/deactivate is racing to unregister the 
> MBean
> ---
>
> Key: SLING-9588
> URL: https://issues.apache.org/jira/browse/SLING-9588
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: File System ClassLoader 1.0.12
>Reporter: Karl Pauls
>Assignee: Karl Pauls
>Priority: Major
> Fix For: File System ClassLoader 1.0.14
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> It looks like the activate/deactivate method of the FSClassLoaderProvider is 
> racing to unregister the mbean service reference. That is problematic as if 
> it is unregistered twice, it will throw an exception - potentially killing 
> the activate.
> Not sure what the right thing todo is here - but it seems very strange that 
> the service ref would be static and clearly, there is a check-then-act cases 
> in the below:
> https://github.com/apache/sling-org-apache-sling-commons-fsclassloader/blob/97d73c116d296b290e4484ca842bbbf185a8d36e/src/main/java/org/apache/sling/commons/fsclassloader/impl/FSClassLoaderProvider.java#L142
> https://github.com/apache/sling-org-apache-sling-commons-fsclassloader/blob/97d73c116d296b290e4484ca842bbbf185a8d36e/src/main/java/org/apache/sling/commons/fsclassloader/impl/FSClassLoaderProvider.java#L169
> [~cziegeler], any ideas why the code would be like it is right now?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


Re: [RESULT][VOTE] Release Apache Sling Commons FSClassLoader 1.0.14

2020-08-21 Thread Karl Pauls
I guess I forgot to call this vote. Sorry about that.

Here is my +1 and with that:

The vote has passed with the following result :

* +1 votes from Carsten Ziegeler, David Bosschaert, Daniel Klco, Georg
Henzler, and Karl Pauls

* No other votes

The vote is successful. I will copy this release to the Sling dist
directory and promote the artifacts to the central Maven repository.


[jira] [Updated] (SLING-9671) Allow non-bundled inheriting resource types to override Use-API templates

2020-08-21 Thread Radu Cotescu (Jira)


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

Radu Cotescu updated SLING-9671:

Fix Version/s: Scripting HTL Engine 1.4.2-1.4.0

> Allow non-bundled inheriting resource types to override Use-API templates
> -
>
> Key: SLING-9671
> URL: https://issues.apache.org/jira/browse/SLING-9671
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting HTL Engine 1.4.0-1.4.0
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting HTL Engine 1.4.2-1.4.0
>
>
> SLING-9328 added support for loading templates via the 
> {{org.apache.sling.servlets.resolver.bundle.tracker.BundledRenderUnit}} API. 
> However, when working with a bundled HTL script (precompiled or not), only 
> template libraries available via the bundled script's 
> {{org.apache.sling.servlets.resolver.bundle.tracker.TypeProvider}} hierarchy 
> are considered, not allowing scripts from the resource tree to override the 
> behaviour.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9680) Sling Mocks: Add easy way to inject SlingBindings into MockSlingHttpServletRequest

2020-08-21 Thread Stefan Seifert (Jira)


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

Stefan Seifert commented on SLING-9680:
---

this should already work - related tickets are SLING-6410, SLING-7867, 
SLING-9021.
aem mocks make advanced use of this to inject cq-specific additional bindings.

there is no convenience method for setting own bindings (also all the usual 
stuff should already be present). afaik it should work to register your own 
BindingsValuesProvider

> Sling Mocks: Add easy way to inject SlingBindings into 
> MockSlingHttpServletRequest
> --
>
> Key: SLING-9680
> URL: https://issues.apache.org/jira/browse/SLING-9680
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing Sling Mock 2.5.0
>Reporter: Konrad Windszus
>Priority: Major
>
> As SlingBindings are often crucial when dealing with Sling Models there 
> should be an easy way to set them for a mocked request 
> (https://sling.apache.org/documentation/development/sling-mock.html#slinghttpservletrequest)
> A dedicated method which automatically fills the SlingBindings with the 
> mandatory stuff and another one to add additional bindings would be very 
> helpful.
> Also injecting values from all registered {{BindingsValuesProvider}} with a 
> specific context would be useful.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[VOTE] Release Apache Sling Servlets Resolver 2.7.8

2020-08-21 Thread Radu Cotescu
Hi,

We solved 1 issue in this release:
https://issues.apache.org/jira/browse/SLING/fixforversion/12348693

Staging repository:
https://repository.apache.org/content/repositories/orgapachesling-2320/

You can use this UNIX script to download the release and verify the signatures:
https://gitbox.apache.org/repos/asf?p=sling-tooling-release.git;a=blob;f=check_staged_release.sh;hb=HEAD

Usage:
sh check_staged_release.sh 2320 /tmp/sling-staging

Please vote to approve this release:

  [ ] +1 Approve the release
  [ ]  0 Don't care
  [ ] -1 Don't release, because ...

This majority vote is open for at least 72 hours.

Regards,
Radu Cotescu


[VOTE] Release Apache Sling Scripting Core 2.3.2

2020-08-21 Thread Radu Cotescu
Hi,

We solved 2 issues in this release:
https://issues.apache.org/jira/browse/SLING/fixforversion/12348699

Staging repository:
https://repository.apache.org/content/repositories/orgapachesling-2319/

You can use this UNIX script to download the release and verify the signatures:
https://gitbox.apache.org/repos/asf?p=sling-tooling-release.git;a=blob;f=check_staged_release.sh;hb=HEAD

Usage:
sh check_staged_release.sh 2319 /tmp/sling-staging

Please vote to approve this release:

  [ ] +1 Approve the release
  [ ]  0 Don't care
  [ ] -1 Don't release, because ...

This majority vote is open for at least 72 hours.

Regards,
Radu Cotescu


[jira] [Updated] (SLING-9680) Sling Mocks: Add easy way to inject SlingBindings into MockSlingHttpServletRequest

2020-08-21 Thread Konrad Windszus (Jira)


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

Konrad Windszus updated SLING-9680:
---
Summary: Sling Mocks: Add easy way to inject SlingBindings into 
MockSlingHttpServletRequest  (was: Sling Mocks: Add easy way to inject 
SlingBindings)

> Sling Mocks: Add easy way to inject SlingBindings into 
> MockSlingHttpServletRequest
> --
>
> Key: SLING-9680
> URL: https://issues.apache.org/jira/browse/SLING-9680
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing Sling Mock 2.5.0
>Reporter: Konrad Windszus
>Priority: Major
>
> As SlingBindings are often crucial when dealing with Sling Models there 
> should be an easy way to set them for a mocked request 
> (https://sling.apache.org/documentation/development/sling-mock.html#slinghttpservletrequest)
> A dedicated method which automatically fills the SlingBindings with the 
> mandatory stuff and another one to add additional bindings would be very 
> helpful.
> Also injecting values from all registered {{BindingsValuesProvider}} with a 
> specific context would be useful.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (SLING-9680) Sling Mocks: Add easy way to inject SlingBindings

2020-08-21 Thread Konrad Windszus (Jira)
Konrad Windszus created SLING-9680:
--

 Summary: Sling Mocks: Add easy way to inject SlingBindings
 Key: SLING-9680
 URL: https://issues.apache.org/jira/browse/SLING-9680
 Project: Sling
  Issue Type: Improvement
  Components: Testing
Affects Versions: Testing Sling Mock 2.5.0
Reporter: Konrad Windszus


As SlingBindings are often crucial when dealing with Sling Models there should 
be an easy way to set them for a mocked request 
(https://sling.apache.org/documentation/development/sling-mock.html#slinghttpservletrequest)

A dedicated method which automatically fills the SlingBindings with the 
mandatory stuff and another one to add additional bindings would be very 
helpful.
Also injecting values from all registered {{BindingsValuesProvider}} with a 
specific context would be useful.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [sling-org-apache-sling-resourceresolver] sonarcloud[bot] removed a comment on pull request #20: SLING-9676 - Improve Javadoc for MapEntriesHandler

2020-08-21 Thread GitBox


sonarcloud[bot] removed a comment on pull request #20:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/20#issuecomment-677978233


   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20
 lved=false=SECURITY_HOTSPOT) [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver=20=coverage=list)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver=20=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver=20=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_252) you 
have used to run this analysis is deprecated and we will stop accepting it from 
October 2020. Please update to at least Java 11.
   Read more [here](https://sonarcloud.io/documentation/upcoming/)
   
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [sling-org-apache-sling-resourceresolver] sonarcloud[bot] commented on pull request #20: SLING-9676 - Improve Javadoc for MapEntriesHandler

2020-08-21 Thread GitBox


sonarcloud[bot] commented on pull request #20:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/20#issuecomment-678179598


   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20
 lved=false=SECURITY_HOTSPOT) [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=CODE_SMELL)
 [1 Code 
Smell](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=20=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver=20=coverage=list)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver=20=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver=20=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_252) you 
have used to run this analysis is deprecated and we will stop accepting it from 
October 2020. Please update to at least Java 11.
   Read more [here](https://sonarcloud.io/documentation/upcoming/)
   
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Resolved] (SLING-9679) Add the executable name in the servlet properties for the BundledScriptServlet

2020-08-21 Thread Radu Cotescu (Jira)


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

Radu Cotescu resolved SLING-9679.
-
Resolution: Fixed

Fixed in [commit 
3aed856|https://github.com/apache/sling-org-apache-sling-servlets-resolver/commit/3aed856].

> Add the executable name in the servlet properties for the BundledScriptServlet
> --
>
> Key: SLING-9679
> URL: https://issues.apache.org/jira/browse/SLING-9679
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Affects Versions: Servlets Resolver 2.7.0
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Servlets Resolver 2.7.8
>
>
> The 
> {{org.apache.sling.servlets.resolver.bundle.tracker.internal.BundledScriptServlet}}
>  should be registered in a way that allows the {{RequestProgressTracker}} to 
> show the script / resource type for which the servlet was registered.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9679) Add the executable name in the servlet properties for the BundledScriptServlet

2020-08-21 Thread Radu Cotescu (Jira)


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

Radu Cotescu updated SLING-9679:

Fix Version/s: (was: Servlets Resolver 2.7.6)
   Servlets Resolver 2.7.8

> Add the executable name in the servlet properties for the BundledScriptServlet
> --
>
> Key: SLING-9679
> URL: https://issues.apache.org/jira/browse/SLING-9679
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Affects Versions: Servlets Resolver 2.7.0
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Servlets Resolver 2.7.8
>
>
> The 
> {{org.apache.sling.servlets.resolver.bundle.tracker.internal.BundledScriptServlet}}
>  should be registered in a way that allows the {{RequestProgressTracker}} to 
> show the script / resource type for which the servlet was registered.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (SLING-9679) Add the executable name in the servlet properties for the BundledScriptServlet

2020-08-21 Thread Radu Cotescu (Jira)
Radu Cotescu created SLING-9679:
---

 Summary: Add the executable name in the servlet properties for the 
BundledScriptServlet
 Key: SLING-9679
 URL: https://issues.apache.org/jira/browse/SLING-9679
 Project: Sling
  Issue Type: Improvement
  Components: Servlets
Affects Versions: Servlets Resolver 2.7.0
Reporter: Radu Cotescu
Assignee: Radu Cotescu
 Fix For: Servlets Resolver 2.7.6


The 
{{org.apache.sling.servlets.resolver.bundle.tracker.internal.BundledScriptServlet}}
 should be registered in a way that allows the {{RequestProgressTracker}} to 
show the script / resource type for which the servlet was registered.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (SLING-9678) XssFilter should not depend on MetricsService

2020-08-21 Thread Konrad Windszus (Jira)
Konrad Windszus created SLING-9678:
--

 Summary: XssFilter should not depend on MetricsService
 Key: SLING-9678
 URL: https://issues.apache.org/jira/browse/SLING-9678
 Project: Sling
  Issue Type: Improvement
  Components: XSS Protection API
Affects Versions: XSS Protection API 2.2.6
Reporter: Konrad Windszus


Although metrics are nice to have, it shouldn't be required to have Sling 
Metrics installed to be able to use Sling XSS. Therefore the reference in 
https://github.com/apache/sling-org-apache-sling-xss/blob/d12a3eb325a75e6892f3aea16dbde9400808e26d/src/main/java/org/apache/sling/xss/impl/XSSFilterImpl.java#L178
 should be made optional (but greedy). Same for the package imports.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [sling-org-apache-sling-resourceresolver] rombert commented on a change in pull request #20: SLING-9676 - Improve Javadoc for MapEntriesHandler

2020-08-21 Thread GitBox


rombert commented on a change in pull request #20:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/20#discussion_r474505370



##
File path: 
src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntry.java
##
@@ -268,7 +267,12 @@ public MapEntry(String url, final int status, final 
boolean trailingSlash,
 this.order = order;
 }
 
-// Returns the replacement or null if the value does not match
+/**
+ * Replaces the specified value according to the rules of this entry
+ * 
+ * @param value the value to replace
+ * @return a replaced value of null if the value does not 
match
+ */
 public String[] replace(final String value) {

Review comment:
   I've added the nullability annotations, it makes sense. I think adding 
them to just one method helps in the sense that missing annotations don't 
trigger any incorrect assumptions.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [sling-org-apache-sling-resourceresolver] anchela commented on a change in pull request #20: SLING-9676 - Improve Javadoc for MapEntriesHandler

2020-08-21 Thread GitBox


anchela commented on a change in pull request #20:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/20#discussion_r474431964



##
File path: 
src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntry.java
##
@@ -268,7 +267,12 @@ public MapEntry(String url, final int status, final 
boolean trailingSlash,
 this.order = order;
 }
 
-// Returns the replacement or null if the value does not match
+/**
+ * Replaces the specified value according to the rules of this entry
+ * 
+ * @param value the value to replace
+ * @return a replaced value of null if the value does not 
match
+ */
 public String[] replace(final String value) {

Review comment:
   while adding nullability annotations is not in the scope of the original 
jira ticket, i am very glad to see you added them for the MapEntriesHandler. 
imo they also help improve readability of the code (apart from automatic 
nullability violations being spotted and helping to prevent errors)
   
   so, maybe adding '@Nullable' for the return value and '@NotNull' with the 
value param would be a good thing but as i said: i was mainly asking for 
javadoc and this would to just an added benefit. but if it leaves the MapEntry 
class in a odd state because the annotations are only added in some places, 
feel free to just ignore this comment.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org