Re: [VOTE] Release Apache Sling GraphQL Core 0.0.14

2022-08-30 Thread Radu Cotescu
+1

> On 30 Aug 2022, at 18:24, Radu Cotescu  wrote:
> 
> Please vote to approve this release:
> 
>  [ ] +1 Approve the release
>  [ ]  0 Don't care
>  [ ] -1 Don't release, because ...



[VOTE] Release Apache Sling GraphQL Core 0.0.14

2022-08-30 Thread Radu Cotescu
Hi,

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

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

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 2672 /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-11458) Regress - "Writer has already been closed" exception in GraphQLServlet

2022-08-30 Thread Radu Cotescu (Jira)


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

Radu Cotescu updated SLING-11458:
-
Fix Version/s: (was: GraphQL Core 0.0.6)

> Regress - "Writer has already been closed" exception in GraphQLServlet
> --
>
> Key: SLING-11458
> URL: https://issues.apache.org/jira/browse/SLING-11458
> Project: Sling
>  Issue Type: Bug
>  Components: GraphQL
>Affects Versions: GraphQL Core 0.0.4
>Reporter: Evgeny Tugarev
>Assignee: Andreas Schaefer
>Priority: Major
>
> The GraphQLServlet shouldn't call {{response.getWriter().flush()}} as the 
> {{JsonWriter}} used by the {{JsonSerializer}} implements {{Closeable}} and as 
> such [closes the 
> Writer|https://github.com/jdereg/json-io/blob/cf849f15460decf10a8a320390de11965bb5996b/src/main/java/com/cedarsoftware/util/io/JsonWriter.java#L2413].
> This causes a "Writer has already been closed" Exception when {{flush()}} is 
> called.
> This was fixed in commit d27f4bb7 but then this commit: 11c7e389 did undo the 
> fix as now the JsonWriter is closed when existing the try-catch block.
> I will undo it and prevent the premature closure as this is causing issues 
> like when the call to this servlet is made through a dispatcher.



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


[jira] [Commented] (SLING-11458) Regress - "Writer has already been closed" exception in GraphQLServlet

2022-08-30 Thread Radu Cotescu (Jira)


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

Radu Cotescu commented on SLING-11458:
--

As mentioned in the PR, this should be fixed in the Sling Engine - 
https://github.com/apache/sling-org-apache-sling-graphql-core/pull/29#issuecomment-1193972633.

> Regress - "Writer has already been closed" exception in GraphQLServlet
> --
>
> Key: SLING-11458
> URL: https://issues.apache.org/jira/browse/SLING-11458
> Project: Sling
>  Issue Type: Bug
>  Components: GraphQL
>Affects Versions: GraphQL Core 0.0.4
>Reporter: Evgeny Tugarev
>Assignee: Andreas Schaefer
>Priority: Major
> Fix For: GraphQL Core 0.0.6
>
>
> The GraphQLServlet shouldn't call {{response.getWriter().flush()}} as the 
> {{JsonWriter}} used by the {{JsonSerializer}} implements {{Closeable}} and as 
> such [closes the 
> Writer|https://github.com/jdereg/json-io/blob/cf849f15460decf10a8a320390de11965bb5996b/src/main/java/com/cedarsoftware/util/io/JsonWriter.java#L2413].
> This causes a "Writer has already been closed" Exception when {{flush()}} is 
> called.
> This was fixed in commit d27f4bb7 but then this commit: 11c7e389 did undo the 
> fix as now the JsonWriter is closed when existing the try-catch block.
> I will undo it and prevent the premature closure as this is causing issues 
> like when the call to this servlet is made through a dispatcher.



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


[jira] [Updated] (SLING-10901) Allow terminating a GraphQL query after a configured timeout

2022-08-30 Thread Radu Cotescu (Jira)


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

Radu Cotescu updated SLING-10901:
-
Fix Version/s: GraphQL Core 0.0.16
   (was: GraphQL Core 0.0.14)

> Allow terminating a GraphQL query after a configured timeout
> 
>
> Key: SLING-10901
> URL: https://issues.apache.org/jira/browse/SLING-10901
> Project: Sling
>  Issue Type: Improvement
>  Components: GraphQL
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: GraphQL Core 0.0.16
>
>
> Since expensive GraphQL queries could lead to a DoS attack, it would be worth 
> allowing a system administrator to configure the maximum execution time of a 
> query. When a long running query is interrupted, the returned error should be 
> transparent for the GraphQL engine, so that the client knows exactly why the 
> query failed.



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


[jira] [Updated] (SLING-10900) Update graphl-java to version 17

2022-08-30 Thread Radu Cotescu (Jira)


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

Radu Cotescu updated SLING-10900:
-
Fix Version/s: GraphQL Core 0.0.16
   (was: GraphQL Core 0.0.14)

> Update graphl-java to version 17
> 
>
> Key: SLING-10900
> URL: https://issues.apache.org/jira/browse/SLING-10900
> Project: Sling
>  Issue Type: Improvement
>  Components: GraphQL
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: GraphQL Core 0.0.16
>
>
> {{graphql-java}} 17 brings a set of performance improvements [0] which could 
> benefit the GraphQL Core bundle:
> * [2067|https://github.com/graphql-java/graphql-java/pull/2067] Support for 
> Streams and Iterators
> * Dramatic performance improvements in GraphQLSchema building
> * Dramatic performance improvements in DataFetchingFieldSelectionSet
> * Dramatic performance improvements in large query validation
> [0] - https://github.com/graphql-java/graphql-java/releases/tag/v17.0



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


[jira] [Resolved] (SLING-11563) Update to Apache Sling Bundle Parent 49

2022-08-30 Thread Radu Cotescu (Jira)


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

Radu Cotescu resolved SLING-11563.
--
Resolution: Fixed

Updated in 
https://github.com/apache/sling-org-apache-sling-graphql-core/commit/50078be2802caf69c4901cd00b71505fa07ed7f3.

> Update to Apache Sling Bundle Parent 49
> ---
>
> Key: SLING-11563
> URL: https://issues.apache.org/jira/browse/SLING-11563
> Project: Sling
>  Issue Type: Improvement
>  Components: GraphQL
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: GraphQL Core 0.0.14
>
>
> Update to the latest bundle parent pom available to avoid costlier migrations 
> in the future.



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


[jira] [Created] (SLING-11563) Update to Apache Sling Bundle Parent 49

2022-08-30 Thread Radu Cotescu (Jira)
Radu Cotescu created SLING-11563:


 Summary: Update to Apache Sling Bundle Parent 49
 Key: SLING-11563
 URL: https://issues.apache.org/jira/browse/SLING-11563
 Project: Sling
  Issue Type: Improvement
  Components: GraphQL
Reporter: Radu Cotescu
Assignee: Radu Cotescu
 Fix For: GraphQL Core 0.0.14


Update to the latest bundle parent pom available to avoid costlier migrations 
in the future.



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


[jira] [Resolved] (SLING-11429) OSGi configs on same resource type cause IAE

2022-08-30 Thread Radu Cotescu (Jira)


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

Radu Cotescu resolved SLING-11429.
--
Resolution: Fixed

Fixed in 
https://github.com/apache/sling-org-apache-sling-graphql-core/commit/5a69ef1bbd9e0e64ef5da9c268f36fa2a3a0e4f7.

> OSGi configs on same resource type cause IAE
> 
>
> Key: SLING-11429
> URL: https://issues.apache.org/jira/browse/SLING-11429
> Project: Sling
>  Issue Type: Improvement
>  Components: GraphQL
>Affects Versions: GraphQL Core 0.0.12
>Reporter: Stefan Grimm
>Assignee: Radu Cotescu
>Priority: Minor
> Fix For: GraphQL Core 0.0.14
>
>
> Currently, if we have more than one OSGi configuration for {{GraphQLServlet}} 
> registered on the same resource type, the {{activate}} method throws an 
> {{InvalidArgumentException}}.
> Stacktrace is:
> {noformat}
> org.apache.sling.graphql.core.servlet.GraphQLServlet bundle 
> org.apache.sling.graphql.core:0.0.12 
> (528)[org.apache.sling.graphql.core.servlet.GraphQLServlet(3271)] : The 
> activate method has thrown an exception (java.lang.IllegalArgumentException: 
> A metric named 
> org.apache.sling.graphql.core.servlet.GraphQLServlet.rt:graphql/sites/components/endpoint.m:GET_POST.e:json.cache_hit_rate
>  already exists)
> java.lang.IllegalArgumentException: A metric named 
> org.apache.sling.graphql.core.servlet.GraphQLServlet.rt:graphql/sites/components/endpoint.m:GET_POST.e:json.cache_hit_rate
>  already exists
>   at com.codahale.metrics.MetricRegistry.register(MetricRegistry.java:91)
>   at 
> org.apache.sling.graphql.core.servlet.GraphQLServlet.activate(GraphQLServlet.java:199)
> {noformat}
> Probably some additional data should be used on top of the resource type to 
> create the name for the metric(s). If that's not possible, it would at least 
> be great to handle this more gracefully (log a proper error message instead 
> of throwing an {{IllegalArgumentException}}.



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


[GitHub] [sling-org-apache-sling-graphql-core] raducotescu merged pull request #32: SLING-11429 - OSGi configs on same resource type cause IAE

2022-08-30 Thread GitBox


raducotescu merged PR #32:
URL: https://github.com/apache/sling-org-apache-sling-graphql-core/pull/32


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

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



[GitHub] [sling-org-apache-sling-graphql-core] sonarcloud[bot] commented on pull request #32: SLING-11429 - OSGi configs on same resource type cause IAE

2022-08-30 Thread GitBox


sonarcloud[bot] commented on PR #32:
URL: 
https://github.com/apache/sling-org-apache-sling-graphql-core/pull/32#issuecomment-1231757095

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-graphql-core=32)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=32=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=32=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=32=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=32=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=32=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=32=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-graphql-core=32=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-graphql-core=32=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-graphql-core=32=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=32=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=32=false=CODE_SMELL)
 [1 Code 
Smell](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=32=false=CODE_SMELL)
   
   
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png
 
'100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core=32=new_coverage=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core=32=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core=32=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core=32=new_duplicated_lines_density=list)
   
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

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



[GitHub] [sling-org-apache-sling-graphql-core] dependabot[bot] commented on pull request #30: Bump commons-io from 2.4 to 2.7

2022-08-30 Thread GitBox


dependabot[bot] commented on PR #30:
URL: 
https://github.com/apache/sling-org-apache-sling-graphql-core/pull/30#issuecomment-1231753315

   OK, I won't notify you about commons-io:commons-io again, unless you re-open 
this PR or update it yourself. 


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

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



[GitHub] [sling-org-apache-sling-graphql-core] raducotescu commented on pull request #30: Bump commons-io from 2.4 to 2.7

2022-08-30 Thread GitBox


raducotescu commented on PR #30:
URL: 
https://github.com/apache/sling-org-apache-sling-graphql-core/pull/30#issuecomment-1231753252

   @dependabot ignore this dependency


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

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



[GitHub] [sling-org-apache-sling-graphql-core] dependabot[bot] closed pull request #30: Bump commons-io from 2.4 to 2.7

2022-08-30 Thread GitBox


dependabot[bot] closed pull request #30: Bump commons-io from 2.4 to 2.7
URL: https://github.com/apache/sling-org-apache-sling-graphql-core/pull/30


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

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



[GitHub] [sling-org-apache-sling-graphql-core] raducotescu opened a new pull request, #32: SLING-11429 - OSGi configs on same resource type cause IAE

2022-08-30 Thread GitBox


raducotescu opened a new pull request, #32:
URL: https://github.com/apache/sling-org-apache-sling-graphql-core/pull/32

   * use the GraphQLServlet service.pid in order to have unique instances for 
all the required metrics


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

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



[jira] [Commented] (SLING-11538) Add display context for JSON string

2022-08-30 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-11538:
-

The use case is inline JSON in HTML. Writing that in Java methods is for sure 
possible but breaks the model/view separation from my PoV. The JSON can be 
generated far easier in HTL if just that missing context is added.
I am gonna improve the test case to show a more realistic scenario where the 
same getter method is used in both regular HTML and in inline JSON values.

> Add display context for JSON string
> ---
>
> Key: SLING-11538
> URL: https://issues.apache.org/jira/browse/SLING-11538
> Project: Sling
>  Issue Type: Improvement
>  Components: HTL
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Scripting HTL Engine 1.4.22-1.4.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> It would be useful to add an output context to HTL to be used inside JSON. As 
> JSON is very complex, the most essential one which currently cannot be 
> achieved with any other existing contexts is escaping for a JSON String value 
> (compare with https://github.com/adobe/htl-spec/issues/5).
> I propose to introduce a new context {{jsonString}} next to {{scriptString}} 
> in 
> https://github.com/apache/sling-org-apache-sling-scripting-sightly/blob/192d953514e6e579428cda157a7e83fc2a05cc01/src/main/java/org/apache/sling/scripting/sightly/impl/engine/extension/XSSRuntimeExtension.java#L93.
> As it is not part of the official HTL spec at 
> https://github.com/adobe/htl-spec/blob/master/SPECIFICATION.md#121-display-context
>  it needs to be listed as Sling-specific addition in 
> https://sling.apache.org/documentation/bundles/scripting/scripting-htl.html#extensions-of-the-htl-specification.



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


[GitHub] [sling-org-apache-sling-resourceresolver] sonarcloud[bot] commented on pull request #81: SLING-11541: vanity path query: attempt to query sorted by first vanity path, check results

2022-08-30 Thread GitBox


sonarcloud[bot] commented on PR #81:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/81#issuecomment-1231605180

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-resourceresolver=81)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=81=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=81=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=81=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=81=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=81=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=81=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-resourceresolver=81=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-resourceresolver=81=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-resourceresolver=81=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=81=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=81=false=CODE_SMELL)
 [5 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver=81=false=CODE_SMELL)
   
   
[![82.5%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png
 
'82.5%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver=81=new_coverage=list)
 [82.5% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver=81=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver=81=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver=81=new_duplicated_lines_density=list)
   
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

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



[Jenkins] Sling » Modules » sling-org-apache-sling-starter » master #409 is BROKEN

2022-08-30 Thread Apache Jenkins Server
] Downloaded from central: 
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.0.2/httpclient-4.0.2.jar
 (293 kB at 654 kB/s)
[INFO] Downloading from central: 
https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-decoration-model/1.6/doxia-decoration-model-1.6.jar
[INFO] Downloaded from central: 
https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.3/commons-codec-1.3.jar
 (47 kB at 104 kB/s)
[INFO] Downloading from central: 
https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-sink-api/1.6/doxia-sink-api-1.6.jar
[INFO] Downloaded from central: 
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
 (61 kB at 131 kB/s)
[INFO] Downloading from central: 
https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-site-renderer/1.6/doxia-site-renderer-1.6.jar
[INFO] Downloaded from central: 
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar
 (173 kB at 356 kB/s)
[INFO] Downloading from central: 
https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-module-xhtml/1.6/doxia-module-xhtml-1.6.jar
[INFO] Downloaded from central: 
https://repo.maven.apache.org/maven2/xmlunit/xmlunit/1.5/xmlunit-1.5.jar (98 kB 
at 184 kB/s)
[INFO] Downloading from central: 
https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-module-fml/1.6/doxia-module-fml-1.6.jar
[INFO] Downloaded from central: 
https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-sink-api/1.6/doxia-sink-api-1.6.jar
 (11 kB at 19 kB/s)
[INFO] Downloading from central: 
https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
[INFO] Downloaded from central: 
https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-decoration-model/1.6/doxia-decoration-model-1.6.jar
 (57 kB at 93 kB/s)
[INFO] Downloading from central: 
https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-velocity/1.1.7/plexus-velocity-1.1.7.jar
[INFO] Downloaded from central: 
https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-module-xhtml/1.6/doxia-module-xhtml-1.6.jar
 (16 kB at 25 kB/s)
[INFO] Downloading from central: 
https://repo.maven.apache.org/maven2/org/apache/velocity/velocity/1.5/velocity-1.5.jar
[INFO] Downloaded from central: 
https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-site-renderer/1.6/doxia-site-renderer-1.6.jar
 (56 kB at 86 kB/s)
[INFO] Downloading from central: 
https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.21/plexus-utils-3.0.21.jar
[INFO] Downloaded from central: 
https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-module-fml/1.6/doxia-module-fml-1.6.jar
 (38 kB at 55 kB/s)
[INFO] Downloaded from central: 
https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
 (11 kB at 14 kB/s)
[INFO] Downloaded from central: 
https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-velocity/1.1.7/plexus-velocity-1.1.7.jar
 (7.7 kB at 10 kB/s)
[INFO] Downloaded from central: 
https://repo.maven.apache.org/maven2/org/apache/velocity/velocity/1.5/velocity-1.5.jar
 (392 kB at 484 kB/s)
[INFO] Downloaded from central: 
https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.21/plexus-utils-3.0.21.jar
 (245 kB at 246 kB/s)
[INFO] Enabled default license matchers.
[INFO] Will parse SCM ignores for exclusions...
[INFO] Parsing exclusions from 
/home/jenkins/workspace/_org-apache-sling-starter_master/jdk_11_latest/.gitignore
[INFO] Finished adding exclusions from SCM ignore files.
[INFO] 79 implicit excludes (use -debug for more details).
[INFO] 15 explicit excludes (use -debug for more details).
[INFO] 21 resources included (use -debug for more details)
[INFO] Rat check: Summary over all files. Unapproved: 0, unknown: 0, generated: 
0, approved: 20 licenses.
[INFO] 
[INFO] --- docker-maven-plugin:0.39.0:stop (stop-mongo) @ 
org.apache.sling.starter ---
[INFO] DOCKER> [apache/sling:snapshot]: Stop and removed container 0748597219bf 
after 0 ms
[INFO] DOCKER> [mongo:4.4.6] "mongo": Stop and removed container c22378609bdb 
after 0 ms
[INFO] 
[INFO] --- maven-failsafe-plugin:3.0.0-M5:verify (default) @ 
org.apache.sling.starter ---
[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time:  12:15 min
[INFO] Finished at: 2022-08-30T11:30:28Z
[INFO] 
[INFO] [jenkins-event-spy] Generated 
/home/jenkins/workspace/_org-apache-sling-starter_master/jdk_11_latest@tmp/withMaven25f5040c/maven-spy-20220830-111812-84818200308881507096904.log
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-failsafe-plugin:3.0.0-M5:verify (default) on 
project org.apache.sling.starter

Re: Alias deleted when Sibling child2 of Resource child1 has alias 'child1'

2022-08-30 Thread Sagar Miglani
Hi all,

Any suggestion on this?

On 22-Aug-2022, at 2:11 PM, Sagar Miglani 
mailto:sagarmigl...@live.com>> wrote:

Hi all,

I want some suggestion on the following behaviour of resource resolver:


  1.  When I create two resources, let's say 'child1' and 'child2' under path 
'/content/demo/'
  2.  And add sling:alias=["child1"] property on resource 'child2'
  3.  Now, if I delete resource 'child1', then the in-memory alias of resource 
'child2' gets deleted as well
  4.  'child2' will not be accesible with alias 'child1'

I believe that the above behaviour is incorrect, on deleting the resource 
'child1' alias of 'child2' should not be removed from in-memory alias cache and 
'child2' should be accessible using alias ‘child1’.

Is this a expected behaviour? Or Should we avoid such kind of conflicting alias 
configuration? I did not find any such suggestion in documentation [0]. Am I 
missing something?

Could anyone please provide any suggestion with the above behaviour? Any help 
would be much appreciated.


Thanks,
Sagar

PS: I have also attached a test case patch to reproduce the above behaviour.




[jira] [Resolved] (SLING-11248) Post empty body should fail gracefully

2022-08-30 Thread Radu Cotescu (Jira)


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

Radu Cotescu resolved SLING-11248.
--
Resolution: Fixed

> Post empty body should fail gracefully
> --
>
> Key: SLING-11248
> URL: https://issues.apache.org/jira/browse/SLING-11248
> Project: Sling
>  Issue Type: Bug
>  Components: GraphQL
>Affects Versions: GraphQL Core 0.0.12
>Reporter: Thierry Ygé
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: GraphQL Core 0.0.14
>
>
> We observed following stacktrace, while this is apparently produced by some 
> bot YandexBot, it seems that if an empty body is sent, it fails with 500, 
> while it should gracefully fail with 400 instead.
> {noformat}
> 02.04.2022 15:43:06.848 *ERROR* [77.88.5.82 [1648914186845] POST 
> /content/some_endpoint.json HTTP/1.1] 
> org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught 
> Throwable
> at 
> org.apache.sling.graphql.core.servlet.QueryParser.fromRequest(QueryParser.java:85)
>  [org.apache.sling.graphql.core:0.0.12]
> at 
> org.apache.sling.graphql.core.servlet.GraphQLServlet.execute(GraphQLServlet.java:304)
>  [org.apache.sling.graphql.core:0.0.12]
> at 
> org.apache.sling.graphql.core.servlet.GraphQLServlet.doPost(GraphQLServlet.java:273)
>  [org.apache.sling.graphql.core:0.0.12]
> {noformat}



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


[jira] [Commented] (SLING-11538) Add display context for JSON string

2022-08-30 Thread Radu Cotescu (Jira)


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

Radu Cotescu commented on SLING-11538:
--

[~kwin], what's the use case? The [test you 
added|https://github.com/apache/sling-org-apache-sling-scripting-sightly-testing-content/pull/7/files#diff-05f462b0429b9368cac540b6f079b6e8fb3e3f85b828a8be2e95dde9b8cc8e2c]
 doesn't help me understand it. Why can't you output JSON using a specialised 
JSON library?

> Add display context for JSON string
> ---
>
> Key: SLING-11538
> URL: https://issues.apache.org/jira/browse/SLING-11538
> Project: Sling
>  Issue Type: Improvement
>  Components: HTL
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Scripting HTL Engine 1.4.22-1.4.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> It would be useful to add an output context to HTL to be used inside JSON. As 
> JSON is very complex, the most essential one which currently cannot be 
> achieved with any other existing contexts is escaping for a JSON String value 
> (compare with https://github.com/adobe/htl-spec/issues/5).
> I propose to introduce a new context {{jsonString}} next to {{scriptString}} 
> in 
> https://github.com/apache/sling-org-apache-sling-scripting-sightly/blob/192d953514e6e579428cda157a7e83fc2a05cc01/src/main/java/org/apache/sling/scripting/sightly/impl/engine/extension/XSSRuntimeExtension.java#L93.
> As it is not part of the official HTL spec at 
> https://github.com/adobe/htl-spec/blob/master/SPECIFICATION.md#121-display-context
>  it needs to be listed as Sling-specific addition in 
> https://sling.apache.org/documentation/bundles/scripting/scripting-htl.html#extensions-of-the-htl-specification.



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


[jira] [Assigned] (SLING-11562) Update parent bundle (49) to sling-resource-filter

2022-08-30 Thread Ashok Pelluru (Jira)


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

Ashok Pelluru reassigned SLING-11562:
-

Assignee: Ashok Pelluru

> Update parent bundle (49) to sling-resource-filter
> --
>
> Key: SLING-11562
> URL: https://issues.apache.org/jira/browse/SLING-11562
> Project: Sling
>  Issue Type: Task
>Reporter: Ashok Pelluru
>Assignee: Ashok Pelluru
>Priority: Major
>




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


[jira] [Created] (SLING-11562) Update parent bundle (49) to sling-resource-filter

2022-08-30 Thread Ashok Pelluru (Jira)
Ashok Pelluru created SLING-11562:
-

 Summary: Update parent bundle (49) to sling-resource-filter
 Key: SLING-11562
 URL: https://issues.apache.org/jira/browse/SLING-11562
 Project: Sling
  Issue Type: Task
Reporter: Ashok Pelluru






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