[jira] [Commented] (SLING-9848) The ArtifactManager should handle SNAPSHOT dependencies exactly like Maven

2020-10-22 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler commented on SLING-9848:
-

Is this a problem of the ArtifactManager or ArtifactId.toMvnPath() ? 
In any case, we need to detect that the provided version is a snapshot version 
based on the format of the qualifier. It would be good if we could follow some 
official maven procedure for detecting such

> The ArtifactManager should handle SNAPSHOT dependencies exactly like Maven
> --
>
> Key: SLING-9848
> URL: https://issues.apache.org/jira/browse/SLING-9848
> Project: Sling
>  Issue Type: Improvement
>  Components: Feature Model
>Affects Versions: Feature Model 1.2.10
>Reporter: Radu Cotescu
>Priority: Major
>
> When a feature provides a SNAPSHOT dependency by using the artifact's 
> specific version generated by Nexus (e.g. 1.0.0-SNAPSHOT -> 
> 1.0.0-20201021.121222-1), then the {{ArtifactManager}} fails to correctly 
> find the dependency.
> Assuming a definition like:
> {code}
> {
>   "id":"org.myorg:mybundle:1.0.0-20201021.121222-1",
>   "start-order":"20"
> }
> {code}
> Maven would download / solve 
> {{org/myorg/mybundle/1.0.0-SNAPSHOT/mybundle-1.0.0-20201021.121222-1.jar}}, 
> whereas the {{ArtifactManager}} would try to download / solve 
> {{org/myorg/mybundle/1.0.0-20201021.121222-1/mybundle-1.0.0-20201021.121222-1.jar}}.
> IMO, when working with Maven Repositories / Artifacts, the 
> {{ArtifactManager}} should use Maven components for correctly resolving the 
> artifacts the same way Maven would.



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


[VOTE] Release of Apache Sling Kickstart Project 0.0.12

2020-10-22 Thread Andreas Schaefer
Hi,

We solved 1 issue in this release:
https://issues.apache.org/jira/projects/SLING/versions/12349293

There are still some outstanding issues:
https://issues.apache.org/jira/projects/SLING/versions/12349306

This is working release to provide the ability to set Sling Run
Modes when starting Sling with the Kickstart project. But this fix
is not limited to Run Modes as setting Run Modes is just a simple
Java property (-D) and this fix will hand over all properties to
the Feature Launcher that starts up Sling.
In addition the project was updated to the latest Sling feature models.

It also fixes the issue raised in the last (cancelled) release 0.0.10 where the 
Kickstart Maven Plugin would use its default Kickstart Project dependency of 
0.0.6 that was not released. This is fixed by using its own Kickstart JAR file 
instead of the default one.

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


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

- Andy

[CANCELLED][VOTE] Release Apache Sling Kickstart Project 0.1.0

2020-10-22 Thread Andreas Schaefer
I cancel the vote for Sling Kickstart Project 0.0.10 due to an issue with the 
build.
I will redo the release with a fix.

- Andy

> On Oct 20, 2020, at 3:29 PM, Andreas Schaefer  
> wrote:
> 
> Hi,
> 
> We solved 1 issue in this release:
> https://issues.apache.org/jira/projects/SLING/versions/12348806
> 
> There are still some outstanding issues:
> https://issues.apache.org/jira/browse/SLING/component/...
> 
> This is working release to provide the ability to set Sling Run
> Modes when starting Sling with the Kickstart project. But this fix
> is not limited to Run Modes as setting Run Modes is just a simple
> Java property (-D) and this fix will hand over all properties to
> the Feature Launcher that starts up Sling.
> In addition the project was updated to the latest Sling feature models.
> 
> Staging repository:
> https://repository.apache.org/content/repositories/orgapachesling-2360/
> 
> 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 2360 /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.
> 
> - Andy



[jira] [Updated] (SLING-9761) Properties (-D) is not supported in Kickstart Project

2020-10-22 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer updated SLING-9761:

Fix Version/s: (was: Feature Model Sling Kickstart Project 0.0.10)
   Feature Model Sling Kickstart Project 0.0.12

> Properties (-D) is not supported in Kickstart Project
> -
>
> Key: SLING-9761
> URL: https://issues.apache.org/jira/browse/SLING-9761
> Project: Sling
>  Issue Type: Bug
>  Components: Feature Model
>Affects Versions: Feature Model Sling Kickstart Project 0.0.8
>Reporter: Andreas Schaefer
>Assignee: Andreas Schaefer
>Priority: Major
> Fix For: Feature Model Sling Kickstart Project 0.0.12
>
>
> The properties provided by '-D' is not supported and for example sling run 
> modes cannot be set.
> This is a simple fix by adding them as -D property to the Feature Launcher.



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


[jira] [Updated] (SLING-9581) Reduce implementation duplication between kickstart and feature-launcher maven plugin

2020-10-22 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer updated SLING-9581:

Fix Version/s: (was: Feature Model Sling Kickstart Project 0.0.12)
   Feature Model Sling Kickstart Project 0.0.14

> Reduce implementation duplication between kickstart and feature-launcher 
> maven plugin
> -
>
> Key: SLING-9581
> URL: https://issues.apache.org/jira/browse/SLING-9581
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Robert Munteanu
>Assignee: Robert Munteanu
>Priority: Major
> Fix For: Feature Launcher Maven Plugin 0.1.2, Feature Model Sling 
> Maven Kickstart Plugin 0.0.10, Feature Model Sling Kickstart Project 0.0.14
>
>
> There is an implementation overlap between the kickstart tooling and the 
> feature-launcher maven plugin. We should remove it to ensure our tooling 
> behaves consistently.



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


Re: Release Apache Sling Kickstart Project 0.1.0

2020-10-22 Thread Andreas Schaefer
Hi Robert

I did not release Kickstart Maven Plugin because there are no changes that said 
in the last release for
0.0.8 the plugin would use the Kickstart Project 0.0.6 which was not released 
and I missed to update it.

I guess I will scrub that release and release both together to fix that issue.

- Andy

> On Oct 21, 2020, at 11:47 PM, Robert Munteanu  wrote:
> 
> Hi Andy,
> 
> On Tue, 2020-10-20 at 15:29 -0700, Andreas Schaefer wrote:
>> Staging repository:
>> 
>> https://repository.apache.org/content/repositories/orgapachesling-2360/
> 
> The source files from that repository do not build for me, and the same
> happens on Jenkins [1]:
> 
> 
> [ERROR] Failed to execute goal org.apache.sling:sling-kickstart-maven-
> plugin:0.0.8:start (start-container-before-IT) on project
> org.apache.sling.kickstart: Unable to get artifact for Dependency
> {groupId=org.apache.sling, artifactId=org.apache.sling.kickstart,
> version=0.0.6, type=jar}: Could not find artifact
> org.apache.sling:org.apache.sling.kickstart:jar:0.0.6 in central (
> https://repo.maven.apache.org/maven2)
> 
> Do they build for you?
> 
> Thanks,
> Robert
> 
> [1]: 
> https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-kickstart/job/master/27/console
> 



Re: [Discuss] - JCR ContentLoader Skip Runmode

2020-10-22 Thread Daniel Klco
Robert,

I agree it could be misconfigured, however the intent is to only configure
it when needed and for the code to work the same as the current
functionality if not configured.

The challenge I see with requiring the implementer to support separating
their content into two bundles is that it pushes the complexity of the
internal functionality of the repository onto the implementing team rather
than handling it inside the application. We know that /apps and /libs
shouldn't be written to at runtime, so why require the user to consider
this? Especially when the side-effect is that the entire bundle content
fails to install.

I'm very much willing to look into other options, but I'm not a huge fan of
having users refactor their codebase to support internal implementation
details, especially when it's only required for certain setups.

On Thu, Oct 22, 2020 at 10:12 AM Robert Munteanu  wrote:

> On Wed, 2020-10-21 at 08:25 -0400, Daniel Klco wrote:
> > Seeding Setting:
> >  - Includes Path: [ "^/apps/.*", "^/libs/.*", "^/oak:index/.*" ]
> >
> > Runtime Setting:
> >  - Includes Path: [ "^/.*" ]
> >  - Excludes Path: [ "^/apps/.*", "^/libs/.*", "^/oak:index/.*" ]
> >
> > The Bundle Content Loader would then filter out the path roots based
> > on the
> > include / exclude rules. I would only expect this to happen at the
> > path
> > root, not for the individual nodes being loaded. The configuration
> > would
> > not be required and in that case the Bundle Content Loader would load
> > all
> > content.
>
> I think this will work. I am wondering though whether we are not
> opening the door for surprising behaviours and misconfigurations. I
> think the only scenario where this is useful is:
>
> - bundle A is used in a composite node store setup
> - bundle A contains resources that belong to both the default mounnt
> and the non-default one ( /libs, /apps )
> - bundle A installs content using the content loader
>
> I think that a better solution would be to avoid this problem
> altogether by separating 'code' bundles from 'content' bundles, and
> only installing the 'code' bundle when seeding.
>
> Thanks,
> Robert
>
>


[jira] [Commented] (SLING-9800) Extract a service to be able to execute GraphQL queries directly

2020-10-22 Thread Radu Cotescu (Jira)


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

Radu Cotescu commented on SLING-9800:
-

[~andysch], do you have any updates here? A new test case would help with 
validating your use-case. 

> Extract a service to be able to execute GraphQL queries directly
> 
>
> Key: SLING-9800
> URL: https://issues.apache.org/jira/browse/SLING-9800
> Project: Sling
>  Issue Type: Improvement
>  Components: GraphQL
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: GraphQL Core 0.0.8
>
>
> In the current implementation of the GraphQL Core bundle queries can only be 
> executed via a GraphQL Servlet that needs to be configured or via server-side 
> scripts. It would be good if the queries could also be executed directly, 
> without the need for a request.



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


[jira] [Resolved] (SLING-9829) data-sly-element should correctly handle void elements

2020-10-22 Thread Radu Cotescu (Jira)


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

Radu Cotescu resolved SLING-9829.
-
Resolution: Fixed

Fixed in [commit 
66119ad|https://github.com/apache/sling-org-apache-sling-scripting-sightly-compiler/commit/66119ad],
 tested with [commit 
6123d94|https://github.com/apache/sling-org-apache-sling-scripting-sightly-testing-content/commit/6123d94]
 and [commit 
b67bb1b|https://github.com/apache/sling-org-apache-sling-scripting-sightly-testing/commit/b67bb1b].

> data-sly-element should correctly handle void elements
> --
>
> Key: SLING-9829
> URL: https://issues.apache.org/jira/browse/SLING-9829
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Sightly Engine 1.0.0, Scripting HTL Compiler 
> 1.0.0, Scripting HTL Compiler 1.1.0-1.4.0, Scripting HTL Compiler 1.2.0-1.4.0
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting HTL Compiler 1.2.12-1.4.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The current implementation of {{data-sly-element}} doesn't correctly handle 
> void elements which will replace the original element on which the block 
> element was placed:
> When {{$\{item.element.name}}} evaluates to {{link}} or {{meta}}, the element 
> will have a closing tag in the following example, although both {{link}} and 
> {{meta}} are void elements:
> {code:html}
> 
> {code}



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


[GitHub] [sling-org-apache-sling-scripting-sightly-compiler] raducotescu merged pull request #7: SLING-9829 - data-sly-element should correctly handle void elements

2020-10-22 Thread GitBox


raducotescu merged pull request #7:
URL: 
https://github.com/apache/sling-org-apache-sling-scripting-sightly-compiler/pull/7


   



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-9852) Move all content for HTL tests into the /content folder

2020-10-22 Thread Radu Cotescu (Jira)


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

Radu Cotescu resolved SLING-9852.
-
Resolution: Fixed

Fixed in [commit 
0b4287e|https://github.com/apache/sling-org-apache-sling-scripting-sightly-testing-content/commit/0b4287e]
 and [commit 
ebcf19a|https://github.com/apache/sling-org-apache-sling-scripting-sightly-testing/commit/ebcf19a].

> Move all content for HTL tests into the /content folder
> ---
>
> Key: SLING-9852
> URL: https://issues.apache.org/jira/browse/SLING-9852
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting HTL Testing 1.0.28-1.4.0, Scripting HTL 
> Testing Content 1.0.26-1.4.0
>
>
> All testing content for the HTL IT should be moved to {{/content}}, so that 
> all requests are made using the {{anonymous}} user. This should help 
> discovering regressions where the request's resource resolver is used for 
> dependency resolution (not the case right now).



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


[jira] [Created] (SLING-9852) Move all content for HTL tests into the /content folder

2020-10-22 Thread Radu Cotescu (Jira)
Radu Cotescu created SLING-9852:
---

 Summary: Move all content for HTL tests into the /content folder
 Key: SLING-9852
 URL: https://issues.apache.org/jira/browse/SLING-9852
 Project: Sling
  Issue Type: Improvement
  Components: Scripting
Reporter: Radu Cotescu
Assignee: Radu Cotescu
 Fix For: Scripting HTL Testing 1.0.28-1.4.0, Scripting HTL Testing 
Content 1.0.26-1.4.0


All testing content for the HTL IT should be moved to {{/content}}, so that all 
requests are made using the {{anonymous}} user. This should help discovering 
regressions where the request's resource resolver is used for dependency 
resolution (not the case right now).



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


[jira] [Commented] (SLING-9850) Clarify null return values for ResourceResolver.map(...)

2020-10-22 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-9850:


[~rombert] Since you worked on ResourceMapperImpl in the past WDYT?

> Clarify null return values for ResourceResolver.map(...)
> 
>
> Key: SLING-9850
> URL: https://issues.apache.org/jira/browse/SLING-9850
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Affects Versions: API 2.23.0
>Reporter: Konrad Windszus
>Priority: Major
>
> Currently the two signatures of {{map}} differ by their null return 
> annotation:
> - 
> https://github.com/apache/sling-org-apache-sling-api/blob/3e9cf187eff999235ee161e0543f1d8a68c4285c/src/main/java/org/apache/sling/api/resource/ResourceResolver.java#L294
>  (must not return null)
> and
> - 
> https://github.com/apache/sling-org-apache-sling-api/blob/3e9cf187eff999235ee161e0543f1d8a68c4285c/src/main/java/org/apache/sling/api/resource/ResourceResolver.java#L332
>  (may return null)
> The implementation of both may return null though in fact, IIU
> https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/657055bcb31059dc7b71cde55941fb2050cbaddb/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java#L40,
>  
> https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/657055bcb31059dc7b71cde55941fb2050cbaddb/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java#L420
>  and 
> https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/657055bcb31059dc7b71cde55941fb2050cbaddb/src/main/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImpl.java#L75
>  correctly.
> The javadoc for both methods should be clarified with regards to when to 
> expect a null value and most probably the null annotations need to be fixed 
> as well. 



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


[jira] [Commented] (SLING-9851) Duplicate null annotations exposed in Javadoc

2020-10-22 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-9851:


Although nasty, this may actually be desired behaviour: 
https://github.com/JetBrains/java-annotations/issues/35

> Duplicate null annotations exposed in Javadoc
> -
>
> Key: SLING-9851
> URL: https://issues.apache.org/jira/browse/SLING-9851
> Project: Sling
>  Issue Type: Bug
>  Components: General
>Reporter: Konrad Windszus
>Priority: Major
>
> The javadoc of Sling 11 exposes duplicate null annotations for both return 
> values and method arguments, e.g. in 
> https://sling.apache.org/apidocs/sling11/org/apache/sling/api/resource/ResourceResolver.html#map-javax.servlet.http.HttpServletRequest-java.lang.String-.
> Since Sling 10 does not expose such behaviour 
> (https://sling.apache.org/apidocs/sling10/org/apache/sling/api/resource/ResourceResolver.html#map-javax.servlet.http.HttpServletRequest-java.lang.String-)
>  I think this is related to the switch to Jetbrains annotations in 
> https://issues.apache.org/jira/browse/SLING-7798.



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


[jira] [Created] (SLING-9851) Duplicate null annotations exposed in Javadoc

2020-10-22 Thread Konrad Windszus (Jira)
Konrad Windszus created SLING-9851:
--

 Summary: Duplicate null annotations exposed in Javadoc
 Key: SLING-9851
 URL: https://issues.apache.org/jira/browse/SLING-9851
 Project: Sling
  Issue Type: Bug
  Components: General
Reporter: Konrad Windszus


The javadoc of Sling 11 exposes duplicate null annotations for both return 
values and method arguments, e.g. in 
https://sling.apache.org/apidocs/sling11/org/apache/sling/api/resource/ResourceResolver.html#map-javax.servlet.http.HttpServletRequest-java.lang.String-.

Since Sling 10 does not expose such behaviour 
(https://sling.apache.org/apidocs/sling10/org/apache/sling/api/resource/ResourceResolver.html#map-javax.servlet.http.HttpServletRequest-java.lang.String-)
 I think this is related to the switch to Jetbrains annotations in 
https://issues.apache.org/jira/browse/SLING-7798.



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


[jira] [Created] (SLING-9850) Clarify null return values for ResourceResolver.map(...)

2020-10-22 Thread Konrad Windszus (Jira)
Konrad Windszus created SLING-9850:
--

 Summary: Clarify null return values for ResourceResolver.map(...)
 Key: SLING-9850
 URL: https://issues.apache.org/jira/browse/SLING-9850
 Project: Sling
  Issue Type: Improvement
  Components: API
Affects Versions: API 2.23.0
Reporter: Konrad Windszus


Currently the two signatures of {{map}} differ by their null return annotation:


- 
https://github.com/apache/sling-org-apache-sling-api/blob/3e9cf187eff999235ee161e0543f1d8a68c4285c/src/main/java/org/apache/sling/api/resource/ResourceResolver.java#L294
 (must not return null)
and
- 
https://github.com/apache/sling-org-apache-sling-api/blob/3e9cf187eff999235ee161e0543f1d8a68c4285c/src/main/java/org/apache/sling/api/resource/ResourceResolver.java#L332
 (may return null)

The implementation of both may return null though in fact, IIU
https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/657055bcb31059dc7b71cde55941fb2050cbaddb/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java#L40,
 
https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/657055bcb31059dc7b71cde55941fb2050cbaddb/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java#L420
 and 
https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/657055bcb31059dc7b71cde55941fb2050cbaddb/src/main/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImpl.java#L75
 correctly.


The javadoc for both methods should be clarified with regards to when to expect 
a null value and most probably the null annotations need to be fixed as well. 



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


[GitHub] [sling-org-apache-sling-graphql-core] jasghar commented on pull request #12: SLING-9847 Fixed code to let GraphQL query execution errors pass on to result

2020-10-22 Thread GitBox


jasghar commented on pull request #12:
URL: 
https://github.com/apache/sling-org-apache-sling-graphql-core/pull/12#issuecomment-714556106


   Thank you @bdelacretaz! 



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-9829) data-sly-element should correctly handle void elements

2020-10-22 Thread Paul Bjorkstrand (Jira)


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

Paul Bjorkstrand commented on SLING-9829:
-

Thanks for the explanation. Even if it were just the element name, that would 
be helpful. I understand that it would be nontrivial, but it would probably be 
useful to add in some kind of logging facility in the future. I added 
SLING-9849 to request that feature.

 

Thanks again, [~radu].

> data-sly-element should correctly handle void elements
> --
>
> Key: SLING-9829
> URL: https://issues.apache.org/jira/browse/SLING-9829
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Sightly Engine 1.0.0, Scripting HTL Compiler 
> 1.0.0, Scripting HTL Compiler 1.1.0-1.4.0, Scripting HTL Compiler 1.2.0-1.4.0
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting HTL Compiler 1.2.12-1.4.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> The current implementation of {{data-sly-element}} doesn't correctly handle 
> void elements which will replace the original element on which the block 
> element was placed:
> When {{$\{item.element.name}}} evaluates to {{link}} or {{meta}}, the element 
> will have a closing tag in the following example, although both {{link}} and 
> {{meta}} are void elements:
> {code:html}
> 
> {code}



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


[jira] [Created] (SLING-9849) Add logging functionality to the compiler and runtime to support better error notification for the developer

2020-10-22 Thread Paul Bjorkstrand (Jira)
Paul Bjorkstrand created SLING-9849:
---

 Summary: Add logging functionality to the compiler and runtime to 
support better error notification for the developer
 Key: SLING-9849
 URL: https://issues.apache.org/jira/browse/SLING-9849
 Project: Sling
  Issue Type: Wish
  Components: Scripting
Reporter: Paul Bjorkstrand


As a developer, it would be helpful to have more detailed logging in compiled 
HTL scripts to assist with troubleshooting issues in the HTL script logic.

SLING-9829 exposed the fact that there is no runtime support for logging errors 
or warnings with any degree of specificity.

To implement this would likely require (at minimum), changes to the HTL 
compiler and HTL runtime.



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


[jira] [Updated] (SLING-9847) GraphQL query error responses do not conform to GraphQL specification

2020-10-22 Thread Bertrand Delacretaz (Jira)


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

Bertrand Delacretaz updated SLING-9847:
---
Fix Version/s: GraphQL Core 0.0.8

> GraphQL query error responses do not conform to GraphQL specification
> -
>
> Key: SLING-9847
> URL: https://issues.apache.org/jira/browse/SLING-9847
> Project: Sling
>  Issue Type: Bug
>  Components: GraphQL
>Affects Versions: GraphQL Core 0.0.6
>Reporter: Jabran Asghar
>Priority: Major
> Fix For: GraphQL Core 0.0.8
>
>
> *Problem:*
>  Currently, the {{DefaultQueryExecutor.execute}} method does not let GraphQL 
> query execution errors pass on to {{result}}. After executing GraphQL query, 
> any errors are accumulated as strings and wrapped into an exception [0]. This 
> causes errors to be omitted from GraphQL response, as the result is never 
> returned [1].
> As a consequence, The GraphQL client receives a cryptic error response, which 
> is
>  - not conformed to GraphQL specs
>  - not useful, as it does not give a hint what actually went wrong
> *Proposed solution:* 
>  An exception in such a case should not be thrown, rather errors should be 
> returned as part of the GraphQL result, conforming to GraphQL specs [2].
> *Example:*
> {code:java}
> Query
> {
>   articles {
> items {
>   _path
>   author_DOES_NOT_EXIST
> }
>   }
> }
> {code}
> (Note: author_DOES_NOT_EXIST field name is intentionally wrong.)
> *Current response:*
> {code:java}
> {
>   "message": "Failed to execute 'text' on 'Response': body stream already 
> read",
>   "stack": "TypeError: Failed to execute 'text' on 'Response': body stream 
> already read\nat https:///graphiql.html:64:29"
> }
> {code}
>  
> *Expected response:*
> {code:java}
> {
>   "errors": [
> {
>   "message": "Validation error of type FieldUndefined: Field 
> 'author_DOES_NOT_EXIST' in type 'ArticleModel' is undefined @ 
> 'articles/items/author_DOES_NOT_EXIST'",
>   "locations": [
> {
>   "line": 5,
>   "column": 7
> }
>   ],
>   "extensions": {
> "classification": "ValidationError"
>   }
> }
>   ]
> }
> {code}
> Which is more meaningful, and conformed to GraphQL errors scpecification [2].
> [0] 
> [https://github.com/apache/sling-org-apache-sling-graphql-core/blob/90f579888ed3450a625e7bdf9b7d599f14b6/src/main/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutor.java#L148]
> [1] 
> [https://github.com/apache/sling-org-apache-sling-graphql-core/blob/90f579888ed3450a625e7bdf9b7d599f14b6/src/main/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutor.java#L152]
> [2] [http://spec.graphql.org/June2018/#sec-Errors]



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


[jira] [Resolved] (SLING-9847) GraphQL query error responses do not conform to GraphQL specification

2020-10-22 Thread Bertrand Delacretaz (Jira)


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

Bertrand Delacretaz resolved SLING-9847.

  Assignee: Bertrand Delacretaz
Resolution: Fixed

Thank you for this contribution, makes sense, I have merged your PR.

> GraphQL query error responses do not conform to GraphQL specification
> -
>
> Key: SLING-9847
> URL: https://issues.apache.org/jira/browse/SLING-9847
> Project: Sling
>  Issue Type: Bug
>  Components: GraphQL
>Affects Versions: GraphQL Core 0.0.6
>Reporter: Jabran Asghar
>Assignee: Bertrand Delacretaz
>Priority: Major
> Fix For: GraphQL Core 0.0.8
>
>
> *Problem:*
>  Currently, the {{DefaultQueryExecutor.execute}} method does not let GraphQL 
> query execution errors pass on to {{result}}. After executing GraphQL query, 
> any errors are accumulated as strings and wrapped into an exception [0]. This 
> causes errors to be omitted from GraphQL response, as the result is never 
> returned [1].
> As a consequence, The GraphQL client receives a cryptic error response, which 
> is
>  - not conformed to GraphQL specs
>  - not useful, as it does not give a hint what actually went wrong
> *Proposed solution:* 
>  An exception in such a case should not be thrown, rather errors should be 
> returned as part of the GraphQL result, conforming to GraphQL specs [2].
> *Example:*
> {code:java}
> Query
> {
>   articles {
> items {
>   _path
>   author_DOES_NOT_EXIST
> }
>   }
> }
> {code}
> (Note: author_DOES_NOT_EXIST field name is intentionally wrong.)
> *Current response:*
> {code:java}
> {
>   "message": "Failed to execute 'text' on 'Response': body stream already 
> read",
>   "stack": "TypeError: Failed to execute 'text' on 'Response': body stream 
> already read\nat https:///graphiql.html:64:29"
> }
> {code}
>  
> *Expected response:*
> {code:java}
> {
>   "errors": [
> {
>   "message": "Validation error of type FieldUndefined: Field 
> 'author_DOES_NOT_EXIST' in type 'ArticleModel' is undefined @ 
> 'articles/items/author_DOES_NOT_EXIST'",
>   "locations": [
> {
>   "line": 5,
>   "column": 7
> }
>   ],
>   "extensions": {
> "classification": "ValidationError"
>   }
> }
>   ]
> }
> {code}
> Which is more meaningful, and conformed to GraphQL errors scpecification [2].
> [0] 
> [https://github.com/apache/sling-org-apache-sling-graphql-core/blob/90f579888ed3450a625e7bdf9b7d599f14b6/src/main/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutor.java#L148]
> [1] 
> [https://github.com/apache/sling-org-apache-sling-graphql-core/blob/90f579888ed3450a625e7bdf9b7d599f14b6/src/main/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutor.java#L152]
> [2] [http://spec.graphql.org/June2018/#sec-Errors]



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


[GitHub] [sling-org-apache-sling-graphql-core] bdelacretaz commented on pull request #12: SLING-9847 Fixed code to let GraphQL query execution errors pass on to result

2020-10-22 Thread GitBox


bdelacretaz commented on pull request #12:
URL: 
https://github.com/apache/sling-org-apache-sling-graphql-core/pull/12#issuecomment-714550919


   Thank you for this contribution, makes sense, merged!



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-graphql-core] bdelacretaz merged pull request #12: SLING-9847 Fixed code to let GraphQL query execution errors pass on to result

2020-10-22 Thread GitBox


bdelacretaz merged pull request #12:
URL: https://github.com/apache/sling-org-apache-sling-graphql-core/pull/12


   



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-graphql-core] sonarcloud[bot] commented on pull request #12: SLING-9847 Fixed code to let GraphQL query execution errors pass on to result

2020-10-22 Thread GitBox


sonarcloud[bot] commented on pull request #12:
URL: 
https://github.com/apache/sling-org-apache-sling-graphql-core/pull/12#issuecomment-714550613


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=VULNERABILITY)
 [1 
Vulnerability](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=S
 ECURITY_HOTSPOT) [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&metric=new_coverage&view=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&metric=new_coverage&view=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&metric=new_duplicated_lines_density&view=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&metric=new_duplicated_lines_density&view=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-graphql-core] sonarcloud[bot] removed a comment on pull request #12: SLING-9847 Fixed code to let GraphQL query execution errors pass on to result

2020-10-22 Thread GitBox


sonarcloud[bot] removed a comment on pull request #12:
URL: 
https://github.com/apache/sling-org-apache-sling-graphql-core/pull/12#issuecomment-714504612


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=VULNERABILITY)
 [1 
Vulnerability](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=S
 ECURITY_HOTSPOT) [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=CODE_SMELL)
 [2 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&metric=new_coverage&view=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&metric=new_coverage&view=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&metric=new_duplicated_lines_density&view=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&metric=new_duplicated_lines_density&view=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




Re: [Discuss] - JCR ContentLoader Skip Runmode

2020-10-22 Thread Robert Munteanu
On Wed, 2020-10-21 at 08:25 -0400, Daniel Klco wrote:
> Seeding Setting:
>  - Includes Path: [ "^/apps/.*", "^/libs/.*", "^/oak:index/.*" ]
> 
> Runtime Setting:
>  - Includes Path: [ "^/.*" ]
>  - Excludes Path: [ "^/apps/.*", "^/libs/.*", "^/oak:index/.*" ]
> 
> The Bundle Content Loader would then filter out the path roots based
> on the
> include / exclude rules. I would only expect this to happen at the
> path
> root, not for the individual nodes being loaded. The configuration
> would
> not be required and in that case the Bundle Content Loader would load
> all
> content.

I think this will work. I am wondering though whether we are not
opening the door for surprising behaviours and misconfigurations. I
think the only scenario where this is useful is:

- bundle A is used in a composite node store setup
- bundle A contains resources that belong to both the default mounnt
and the non-default one ( /libs, /apps )
- bundle A installs content using the content loader

I think that a better solution would be to avoid this problem
altogether by separating 'code' bundles from 'content' bundles, and
only installing the 'code' bundle when seeding.

Thanks,
Robert



[jira] [Created] (SLING-9848) The ArtifactManager should handle SNAPSHOT dependencies exactly like Maven

2020-10-22 Thread Radu Cotescu (Jira)
Radu Cotescu created SLING-9848:
---

 Summary: The ArtifactManager should handle SNAPSHOT dependencies 
exactly like Maven
 Key: SLING-9848
 URL: https://issues.apache.org/jira/browse/SLING-9848
 Project: Sling
  Issue Type: Improvement
  Components: Feature Model
Affects Versions: Feature Model 1.2.10
Reporter: Radu Cotescu


When a feature provides a SNAPSHOT dependency by using the artifact's specific 
version generated by Nexus (e.g. 1.0.0-SNAPSHOT -> 1.0.0-20201021.121222-1), 
then the {{ArtifactManager}} fails to correctly find the dependency.

Assuming a definition like:
{code}
{
  "id":"org.myorg:mybundle:1.0.0-20201021.121222-1",
  "start-order":"20"
}
{code}

Maven would download / solve 
{{org/myorg/mybundle/1.0.0-SNAPSHOT/mybundle-1.0.0-20201021.121222-1.jar}}, 
whereas the {{ArtifactManager}} would try to download / solve 
{{org/myorg/mybundle/1.0.0-20201021.121222-1/mybundle-1.0.0-20201021.121222-1.jar}}.

IMO, when working with Maven Repositories / Artifacts, the {{ArtifactManager}} 
should use Maven components for correctly resolving the artifacts the same way 
Maven would.



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


[GitHub] [sling-org-apache-sling-graphql-core] jasghar commented on pull request #12: SLING-9847 Fixed code to let GraphQL query execution errors pass on to result

2020-10-22 Thread GitBox


jasghar commented on pull request #12:
URL: 
https://github.com/apache/sling-org-apache-sling-graphql-core/pull/12#issuecomment-714508797


   Checking SonarCloud failed checks.



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-graphql-core] sonarcloud[bot] commented on pull request #12: SLING-9847 Fixed code to let GraphQL query execution errors pass on to result

2020-10-22 Thread GitBox


sonarcloud[bot] commented on pull request #12:
URL: 
https://github.com/apache/sling-org-apache-sling-graphql-core/pull/12#issuecomment-714504612


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=VULNERABILITY)
 [1 
Vulnerability](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=S
 ECURITY_HOTSPOT) [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=CODE_SMELL)
 [2 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&resolved=false&types=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&metric=new_coverage&view=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&metric=new_coverage&view=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&metric=new_duplicated_lines_density&view=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core&pullRequest=12&metric=new_duplicated_lines_density&view=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] [Updated] (SLING-9847) GraphQL query error responses do not conform to GraphQL specification

2020-10-22 Thread Jabran Asghar (Jira)


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

Jabran Asghar updated SLING-9847:
-
Summary: GraphQL query error responses do not conform to GraphQL 
specification  (was: GraphQL query errror responses do not conform to GraphQL 
specification)

> GraphQL query error responses do not conform to GraphQL specification
> -
>
> Key: SLING-9847
> URL: https://issues.apache.org/jira/browse/SLING-9847
> Project: Sling
>  Issue Type: Bug
>  Components: GraphQL
>Affects Versions: GraphQL Core 0.0.6
>Reporter: Jabran Asghar
>Priority: Major
>
> *Problem:*
>  Currently, the {{DefaultQueryExecutor.execute}} method does not let GraphQL 
> query execution errors pass on to {{result}}. After executing GraphQL query, 
> any errors are accumulated as strings and wrapped into an exception [0]. This 
> causes errors to be omitted from GraphQL response, as the result is never 
> returned [1].
> As a consequence, The GraphQL client receives a cryptic error response, which 
> is
>  - not conformed to GraphQL specs
>  - not useful, as it does not give a hint what actually went wrong
> *Proposed solution:* 
>  An exception in such a case should not be thrown, rather errors should be 
> returned as part of the GraphQL result, conforming to GraphQL specs [2].
> *Example:*
> {code:java}
> Query
> {
>   articles {
> items {
>   _path
>   author_DOES_NOT_EXIST
> }
>   }
> }
> {code}
> (Note: author_DOES_NOT_EXIST field name is intentionally wrong.)
> *Current response:*
> {code:java}
> {
>   "message": "Failed to execute 'text' on 'Response': body stream already 
> read",
>   "stack": "TypeError: Failed to execute 'text' on 'Response': body stream 
> already read\nat https:///graphiql.html:64:29"
> }
> {code}
>  
> *Expected response:*
> {code:java}
> {
>   "errors": [
> {
>   "message": "Validation error of type FieldUndefined: Field 
> 'author_DOES_NOT_EXIST' in type 'ArticleModel' is undefined @ 
> 'articles/items/author_DOES_NOT_EXIST'",
>   "locations": [
> {
>   "line": 5,
>   "column": 7
> }
>   ],
>   "extensions": {
> "classification": "ValidationError"
>   }
> }
>   ]
> }
> {code}
> Which is more meaningful, and conformed to GraphQL errors scpecification [2].
> [0] 
> [https://github.com/apache/sling-org-apache-sling-graphql-core/blob/90f579888ed3450a625e7bdf9b7d599f14b6/src/main/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutor.java#L148]
> [1] 
> [https://github.com/apache/sling-org-apache-sling-graphql-core/blob/90f579888ed3450a625e7bdf9b7d599f14b6/src/main/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutor.java#L152]
> [2] [http://spec.graphql.org/June2018/#sec-Errors]



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


[jira] [Commented] (SLING-9847) GraphQL query error responses do not conform to GraphQL specification

2020-10-22 Thread Jabran Asghar (Jira)


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

Jabran Asghar commented on SLING-9847:
--

PR for the propose-fix: 
https://github.com/apache/sling-org-apache-sling-graphql-core/pull/12

> GraphQL query error responses do not conform to GraphQL specification
> -
>
> Key: SLING-9847
> URL: https://issues.apache.org/jira/browse/SLING-9847
> Project: Sling
>  Issue Type: Bug
>  Components: GraphQL
>Affects Versions: GraphQL Core 0.0.6
>Reporter: Jabran Asghar
>Priority: Major
>
> *Problem:*
>  Currently, the {{DefaultQueryExecutor.execute}} method does not let GraphQL 
> query execution errors pass on to {{result}}. After executing GraphQL query, 
> any errors are accumulated as strings and wrapped into an exception [0]. This 
> causes errors to be omitted from GraphQL response, as the result is never 
> returned [1].
> As a consequence, The GraphQL client receives a cryptic error response, which 
> is
>  - not conformed to GraphQL specs
>  - not useful, as it does not give a hint what actually went wrong
> *Proposed solution:* 
>  An exception in such a case should not be thrown, rather errors should be 
> returned as part of the GraphQL result, conforming to GraphQL specs [2].
> *Example:*
> {code:java}
> Query
> {
>   articles {
> items {
>   _path
>   author_DOES_NOT_EXIST
> }
>   }
> }
> {code}
> (Note: author_DOES_NOT_EXIST field name is intentionally wrong.)
> *Current response:*
> {code:java}
> {
>   "message": "Failed to execute 'text' on 'Response': body stream already 
> read",
>   "stack": "TypeError: Failed to execute 'text' on 'Response': body stream 
> already read\nat https:///graphiql.html:64:29"
> }
> {code}
>  
> *Expected response:*
> {code:java}
> {
>   "errors": [
> {
>   "message": "Validation error of type FieldUndefined: Field 
> 'author_DOES_NOT_EXIST' in type 'ArticleModel' is undefined @ 
> 'articles/items/author_DOES_NOT_EXIST'",
>   "locations": [
> {
>   "line": 5,
>   "column": 7
> }
>   ],
>   "extensions": {
> "classification": "ValidationError"
>   }
> }
>   ]
> }
> {code}
> Which is more meaningful, and conformed to GraphQL errors scpecification [2].
> [0] 
> [https://github.com/apache/sling-org-apache-sling-graphql-core/blob/90f579888ed3450a625e7bdf9b7d599f14b6/src/main/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutor.java#L148]
> [1] 
> [https://github.com/apache/sling-org-apache-sling-graphql-core/blob/90f579888ed3450a625e7bdf9b7d599f14b6/src/main/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutor.java#L152]
> [2] [http://spec.graphql.org/June2018/#sec-Errors]



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


[GitHub] [sling-org-apache-sling-graphql-core] jasghar opened a new pull request #12: SLING-9847 Fixed code to let GraphQL query execution errors pass on to result

2020-10-22 Thread GitBox


jasghar opened a new pull request #12:
URL: https://github.com/apache/sling-org-apache-sling-graphql-core/pull/12


   Problem description and the proposed solution is here: 
https://issues.apache.org/jira/browse/SLING-9847
   Fixing it as following:
   - Do not through exception, when execution of a GraphQL query returns 
"errors" in its response, rather only log it.
   - Added a unit test  to verify inclusion of `errors` object in JSON.



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-9847) GraphQL query errror responses do not conform to GraphQL specification

2020-10-22 Thread Jabran Asghar (Jira)


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

Jabran Asghar commented on SLING-9847:
--

I am preparing a PR for a proposed-fix.

> GraphQL query errror responses do not conform to GraphQL specification
> --
>
> Key: SLING-9847
> URL: https://issues.apache.org/jira/browse/SLING-9847
> Project: Sling
>  Issue Type: Bug
>  Components: GraphQL
>Affects Versions: GraphQL Core 0.0.6
>Reporter: Jabran Asghar
>Priority: Major
>
> *Problem:*
>  Currently, the {{DefaultQueryExecutor.execute}} method does not let GraphQL 
> query execution errors pass on to {{result}}. After executing GraphQL query, 
> any errors are accumulated as strings and wrapped into an exception [0]. This 
> causes errors to be omitted from GraphQL response, as the result is never 
> returned [1].
> As a consequence, The GraphQL client receives a cryptic error response, which 
> is
>  - not conformed to GraphQL specs
>  - not useful, as it does not give a hint what actually went wrong
> *Proposed solution:* 
>  An exception in such a case should not be thrown, rather errors should be 
> returned as part of the GraphQL result, conforming to GraphQL specs [2].
> *Example:*
> {code:java}
> Query
> {
>   articles {
> items {
>   _path
>   author_DOES_NOT_EXIST
> }
>   }
> }
> {code}
> (Note: author_DOES_NOT_EXIST field name is intentionally wrong.)
> *Current response:*
> {code:java}
> {
>   "message": "Failed to execute 'text' on 'Response': body stream already 
> read",
>   "stack": "TypeError: Failed to execute 'text' on 'Response': body stream 
> already read\nat https:///graphiql.html:64:29"
> }
> {code}
>  
> *Expected response:*
> {code:java}
> {
>   "errors": [
> {
>   "message": "Validation error of type FieldUndefined: Field 
> 'author_DOES_NOT_EXIST' in type 'ArticleModel' is undefined @ 
> 'articles/items/author_DOES_NOT_EXIST'",
>   "locations": [
> {
>   "line": 5,
>   "column": 7
> }
>   ],
>   "extensions": {
> "classification": "ValidationError"
>   }
> }
>   ]
> }
> {code}
> Which is more meaningful, and conformed to GraphQL errors scpecification [2].
> [0] 
> [https://github.com/apache/sling-org-apache-sling-graphql-core/blob/90f579888ed3450a625e7bdf9b7d599f14b6/src/main/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutor.java#L148]
> [1] 
> [https://github.com/apache/sling-org-apache-sling-graphql-core/blob/90f579888ed3450a625e7bdf9b7d599f14b6/src/main/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutor.java#L152]
> [2] [http://spec.graphql.org/June2018/#sec-Errors]



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


[jira] [Created] (SLING-9847) GraphQL query errror responses do not conform to GraphQL specification

2020-10-22 Thread Jabran Asghar (Jira)
Jabran Asghar created SLING-9847:


 Summary: GraphQL query errror responses do not conform to GraphQL 
specification
 Key: SLING-9847
 URL: https://issues.apache.org/jira/browse/SLING-9847
 Project: Sling
  Issue Type: Bug
  Components: GraphQL
Affects Versions: GraphQL Core 0.0.6
Reporter: Jabran Asghar


*Problem:*
 Currently, the {{DefaultQueryExecutor.execute}} method does not let GraphQL 
query execution errors pass on to {{result}}. After executing GraphQL query, 
any errors are accumulated as strings and wrapped into an exception [0]. This 
causes errors to be omitted from GraphQL response, as the result is never 
returned [1].

As a consequence, The GraphQL client receives a cryptic error response, which is
 - not conformed to GraphQL specs
 - not useful, as it does not give a hint what actually went wrong

*Proposed solution:* 
 An exception in such a case should not be thrown, rather errors should be 
returned as part of the GraphQL result, conforming to GraphQL specs [2].

*Example:*
{code:java}
Query
{
  articles {
items {
  _path
  author_DOES_NOT_EXIST
}
  }
}
{code}
(Note: author_DOES_NOT_EXIST field name is intentionally wrong.)

*Current response:*
{code:java}
{
  "message": "Failed to execute 'text' on 'Response': body stream already read",
  "stack": "TypeError: Failed to execute 'text' on 'Response': body stream 
already read\nat https:///graphiql.html:64:29"
}
{code}
 

*Expected response:*
{code:java}
{
  "errors": [
{
  "message": "Validation error of type FieldUndefined: Field 
'author_DOES_NOT_EXIST' in type 'ArticleModel' is undefined @ 
'articles/items/author_DOES_NOT_EXIST'",
  "locations": [
{
  "line": 5,
  "column": 7
}
  ],
  "extensions": {
"classification": "ValidationError"
  }
}
  ]
}
{code}
Which is more meaningful, and conformed to GraphQL errors scpecification [2].

[0] 
[https://github.com/apache/sling-org-apache-sling-graphql-core/blob/90f579888ed3450a625e7bdf9b7d599f14b6/src/main/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutor.java#L148]

[1] 
[https://github.com/apache/sling-org-apache-sling-graphql-core/blob/90f579888ed3450a625e7bdf9b7d599f14b6/src/main/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutor.java#L152]

[2] [http://spec.graphql.org/June2018/#sec-Errors]



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


Re: [VOTE] Release Apache Sling Kickstart Project 0.1.0

2020-10-22 Thread Daniel Klco
-1

The build problem is indicating that the previous version of Kickstart is
referenced here:

[ERROR] Failed to execute goal
org.apache.sling:sling-kickstart-maven-plugin:0.0.8:start
(start-container-before-IT) on project org.apache.sling.kickstart:
Unable to get artifact for Dependency {groupId=org.apache.sling,
artifactId=org.apache.sling.kickstart, version=0.0.6, type=jar}: Could
not find artifact
org.apache.sling:org.apache.sling.kickstart:jar:0.0.6 in central
(https://repo.maven.apache.org/maven2)[ERROR] [ERROR] Try downloading
the file manually from the project website.[ERROR] [ERROR] Then,
install it using the command: [ERROR] mvn install:install-file
-DgroupId=org.apache.sling -DartifactId=org.apache.sling.kickstart
-Dversion=0.0.6 -Dpackaging=jar -Dfile=/path/to/file



It looks like this is done with the default kickstart in the StartMojo:
https://github.com/apache/sling-kickstart-maven-plugin/blob/0e5fb35343ab25fa16caf4dea1b5b696314392fa/src/main/java/org/apache/sling/maven/kickstart/run/StartMojo.java#L69

This to me feels like an anti-pattern as this version a) shouldn't be in
code b) should be synced to a valid/latest release

On Thu, Oct 22, 2020 at 2:48 AM Robert Munteanu  wrote:

> Also adding VOTE tag.
>
> On Thu, 2020-10-22 at 08:47 +0200, Robert Munteanu wrote:
> > Hi Andy,
> >
> > On Tue, 2020-10-20 at 15:29 -0700, Andreas Schaefer wrote:
> > > Staging repository:
> > >
> > >
> https://repository.apache.org/content/repositories/orgapachesling-2360/
> >
> > The source files from that repository do not build for me, and the
> > same
> > happens on Jenkins [1]:
> >
> >
> > [ERROR] Failed to execute goal org.apache.sling:sling-kickstart-
> > maven-
> > plugin:0.0.8:start (start-container-before-IT) on project
> > org.apache.sling.kickstart: Unable to get artifact for Dependency
> > {groupId=org.apache.sling, artifactId=org.apache.sling.kickstart,
> > version=0.0.6, type=jar}: Could not find artifact
> > org.apache.sling:org.apache.sling.kickstart:jar:0.0.6 in central (
> > https://repo.maven.apache.org/maven2)
> >
> > Do they build for you?
> >
> > Thanks,
> > Robert
> >
> > [1]:
> >
> https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-kickstart/job/master/27/console
> >
>
>


Re: [VOTE] Release Apache Sling JCR Oak Server 1.2.10

2020-10-22 Thread Daniel Klco
+1

On Thu, Oct 22, 2020 at 3:37 AM Carsten Ziegeler 
wrote:

> +1
>
> Carsten
>
> Am 21.10.2020 um 19:36 schrieb Eric Norman:
> > Hi,
> >
> > We solved 3 issues in this release:
> > https://issues.apache.org/jira/browse/SLING/fixforversion/12348809
> >
> > Staging repository:
> > https://repository.apache.org/content/repositories/orgapachesling-2361/
> >
> > 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 2361 /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.
> >
>
> --
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziege...@apache.org
>


[jira] [Commented] (SLING-9846) Onboard Commons Content Processing to SonarCloud

2020-10-22 Thread Oliver Lietz (Jira)


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

Oliver Lietz commented on SLING-9846:
-

[~bellingard], Please onboard 
{{sling-org-apache-sling-commons-content-processing}} to SonarCloud.

> Onboard Commons Content Processing to SonarCloud
> 
>
> Key: SLING-9846
> URL: https://issues.apache.org/jira/browse/SLING-9846
> Project: Sling
>  Issue Type: Task
>  Components: Commons
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
> Fix For: Commons Content Processing 1.0.0
>
>
> {{sling-org-apache-sling-commons-content-processing}}



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


[jira] [Commented] (SLING-9845) Onboard Commons Content Analyzing to SonarCloud

2020-10-22 Thread Oliver Lietz (Jira)


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

Oliver Lietz commented on SLING-9845:
-

[~bellingard], Please onboard 
{{sling-org-apache-sling-commons-content-analyzing}} to SonarCloud.

> Onboard Commons Content Analyzing to SonarCloud
> ---
>
> Key: SLING-9845
> URL: https://issues.apache.org/jira/browse/SLING-9845
> Project: Sling
>  Issue Type: Task
>  Components: Commons
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
> Fix For: Commons Content Analyzing 1.0.0
>
>
> {{sling-org-apache-sling-commons-content-analyzing}}



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


[jira] [Created] (SLING-9845) Onboard Commons Content Analyzing to SonarCloud

2020-10-22 Thread Oliver Lietz (Jira)
Oliver Lietz created SLING-9845:
---

 Summary: Onboard Commons Content Analyzing to SonarCloud
 Key: SLING-9845
 URL: https://issues.apache.org/jira/browse/SLING-9845
 Project: Sling
  Issue Type: Task
  Components: Commons
Reporter: Oliver Lietz
Assignee: Oliver Lietz
 Fix For: Commons Content Analyzing 1.0.0


{{sling-org-apache-sling-commons-content-analyzing}}



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


[jira] [Created] (SLING-9846) Onboard Commons Content Processing to SonarCloud

2020-10-22 Thread Oliver Lietz (Jira)
Oliver Lietz created SLING-9846:
---

 Summary: Onboard Commons Content Processing to SonarCloud
 Key: SLING-9846
 URL: https://issues.apache.org/jira/browse/SLING-9846
 Project: Sling
  Issue Type: Task
  Components: Commons
Reporter: Oliver Lietz
Assignee: Oliver Lietz
 Fix For: Commons Content Processing 1.0.0


{{sling-org-apache-sling-commons-content-processing}}



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


Re: [VOTE] Release Apache Sling Models Implementation 1.4.16

2020-10-22 Thread Karl Pauls
+1

regards,

Karl

On Thursday, October 22, 2020, Robert Munteanu  wrote:

> On Tue, 2020-10-20 at 15:45 +, Radu Cotescu wrote:
> > Please vote to approve this release:
>
> +1
> Robert
>


-- 
Karl Pauls
karlpa...@gmail.com


Re: [VOTE] Release Apache Sling JCR Oak Server 1.2.10

2020-10-22 Thread Carsten Ziegeler

+1

Carsten

Am 21.10.2020 um 19:36 schrieb Eric Norman:

Hi,

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

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

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



--
--
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org