[GitHub] [sling-org-apache-sling-models-impl] etugarev commented on a change in pull request #17: SLING-8706 - Injections for java.util.Optional<> should be automatically optional

2020-06-23 Thread GitBox


etugarev commented on a change in pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/17#discussion_r444160872



##
File path: src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
##
@@ -495,12 +480,97 @@ public RuntimeException inject(InjectableElement element, 
Object value) {
 }
 }
 
+@NotNull
+private InjectableElement getElement(InjectableElement element, Type type) 
{
+return new InjectableElement() {
+@Override
+public AnnotatedElement getAnnotatedElement() {
+return element.getAnnotatedElement();
+}
+
+@Override
+public Type getType() {
+return type;
+}
+
+@Override
+public boolean isPrimitive() {
+return element.isPrimitive();
+}
+
+@Override
+public String getName() {
+return element.getName();
+}
+
+@Override
+public String getSource() {
+return element.getSource();
+}
+
+@Override
+public String getVia() {
+return element.getVia();
+}
+
+@Override
+public Class getViaProviderType() {
+return element.getViaProviderType();
+}
+
+@Override
+public boolean hasDefaultValue() {
+return element.hasDefaultValue();
+}
+
+@Override
+public Object getDefaultValue() {
+return element.getDefaultValue() == null ? Optional.empty() : 
element.getDefaultValue();

Review comment:
   Here, unfortunately, I have to provide a value which is not null, to 
make the injection successful. Since we don't have a specific injector for 
Optional type to handle a null value, eventually a default value injector will 
be executed last and injection will fail if the value is not present (null) 





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-models-impl] sonarcloud[bot] commented on pull request #17: SLING-8706 - Injections for java.util.Optional<> should be automatically optional

2020-06-23 Thread GitBox


sonarcloud[bot] commented on pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/17#issuecomment-648444552


   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-models-impl=17=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-models-impl=17=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-models-impl=17=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-models-impl=17=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-models-impl=17=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-models-impl=17=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-models-impl=17=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-models-impl=17=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-models-impl=17=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-models-impl=17=false=CODE_SMELL)
 [2 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-models-impl=17=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-models-impl=17=new_coverage=list)
 [89.7% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-models-impl=17=new_coverage=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-models-impl=17=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-models-impl=17=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_241) 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] [Commented] (SLING-7534) Release policy - stop providing MD5 and start providing SHA-512 checksums

2020-06-23 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-7534:


Due to several issues with manually generating checksums we are blocked until 
MRESOLVER-56 is released.

> Release policy - stop providing MD5 and start providing SHA-512 checksums
> -
>
> Key: SLING-7534
> URL: https://issues.apache.org/jira/browse/SLING-7534
> Project: Sling
>  Issue Type: Task
>  Components: Tooling
>Reporter: Robert Munteanu
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Parent 40
>
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> See http://www.apache.org/dev/release-distribution#sigs-and-sums , we SHOULD 
> no longer provide MD5 checksums for new releases.



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


Slingfeature Maven Plugin JSon Version Checks fails during a Release

2020-06-23 Thread Andreas Schaefer
Hi

In the Kickstart project I use attach-featurearchive to create the Sling FAR 
file from converted Sling Feature Model files.

This fails during the release as the Preprossesor is checking the Group, 
Artifact and Version of the JSon file with the project. This is all well and 
good but during the release the prepare requires the SNAPSHOT version but that 
would then release it with the SNAPSHOT version.

Any idea on how to solve that?

- Andy

[jira] [Resolved] (SLING-9507) Add an option to Kickstart to prevent the use of the bundled Sling FM

2020-06-23 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer resolved SLING-9507.
-
Resolution: Fixed

Added a flag '-S' that will not use provided Sling Feature Archive or Model 
file. If no feature file is provided either as main feature file or as 
additional feature file then kickstart will abort.

> Add an option to Kickstart to prevent the use of the bundled Sling FM
> -
>
> Key: SLING-9507
> URL: https://issues.apache.org/jira/browse/SLING-9507
> Project: Sling
>  Issue Type: New Feature
>  Components: Feature Model
>Affects Versions: Feature Model Sling Kickstart Project 0.0.2
>Reporter: Andreas Schaefer
>Assignee: Andreas Schaefer
>Priority: Major
> Fix For: Feature Model Sling Kickstart Project 0.0.6
>
>
> To make it easier and more expressive the Kickstart should provide a flag 
> (-ns) to disregard the bundled Sling FM so that an application can be 
> launched that is not tied to Sling and w/o having to misuse the -s option.



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


[jira] [Created] (SLING-9545) Distribution Core bundle with Java 11

2020-06-23 Thread Cris Rockwell (Jira)
Cris Rockwell created SLING-9545:


 Summary: Distribution Core bundle with Java 11
 Key: SLING-9545
 URL: https://issues.apache.org/jira/browse/SLING-9545
 Project: Sling
  Issue Type: Bug
  Components: Content Distribution
Affects Versions: Content Distribution Core 0.4.2, Content Distribution 
Core 0.3.4
Reporter: Cris Rockwell


Apache Sling Distribution Core (org.apache.sling.distribution.core) bundle does 
not activate on Sling12 using Java 11

https://github.com/apache/sling-org-apache-sling-distribution-core

{{mvn clean install}} results in the error below

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-antrun-plugin:1.8:run 
(set-bundle-required-execution-environment) on project 
org.apache.sling.distribution.core: An Ant BuildException has occured: Unable 
to create javax script engine for javascript
[ERROR] around Ant part 

[jira] [Updated] (SLING-9543) Add Support for Feature Archives and Provide the ability to use a custom Kickstart

2020-06-23 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer updated SLING-9543:

Fix Version/s: (was: Feature Model Sling Kickstart Plugin 0.0.6)
   Feature Model Sling Maven Kickstart Plugin 0.0.6

> Add Support for Feature Archives and Provide the ability to use a custom 
> Kickstart
> --
>
> Key: SLING-9543
> URL: https://issues.apache.org/jira/browse/SLING-9543
> Project: Sling
>  Issue Type: Improvement
>  Components: Feature Model
>Affects Versions: Feature Model Sling Maven Kickstart Plugin 0.0.2
>Reporter: Andreas Schaefer
>Priority: Major
> Fix For: Feature Model Sling Maven Kickstart Plugin 0.0.6
>
>
> Add the support for Feature Archives (done through the Kickstart Project) and 
> the ability to use a custom Kickstart Project as a JAR file or Maven 
> Dependency



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


[jira] [Updated] (SLING-9452) Log Configuration does not work on Kickstart

2020-06-23 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer updated SLING-9452:

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

> Log Configuration does not work on Kickstart
> 
>
> Key: SLING-9452
> URL: https://issues.apache.org/jira/browse/SLING-9452
> Project: Sling
>  Issue Type: Bug
>  Components: Feature Model
>Affects Versions: Feature Model Sling Kickstart Project 0.0.2
>Reporter: Andreas Schaefer
>Assignee: Andreas Schaefer
>Priority: Major
> Fix For: Feature Model Sling Kickstart Project 0.0.6
>
>
> Setting Sling Log Settings in Kickstart does not work as the Log Manager 
> configuration is provided by the Feature Model and is not overwritten by the 
> settings.



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


[jira] [Updated] (SLING-9543) Add Support for Feature Archives and Provide the ability to use a custom Kickstart

2020-06-23 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer updated SLING-9543:

Fix Version/s: (was: Feature Model Sling Kickstart Project 0.0.6)
   Feature Model Sling Kickstart Plugin 0.0.6

> Add Support for Feature Archives and Provide the ability to use a custom 
> Kickstart
> --
>
> Key: SLING-9543
> URL: https://issues.apache.org/jira/browse/SLING-9543
> Project: Sling
>  Issue Type: Improvement
>  Components: Feature Model
>Affects Versions: Feature Model Sling Maven Kickstart Plugin 0.0.2
>Reporter: Andreas Schaefer
>Priority: Major
> Fix For: Feature Model Sling Kickstart Plugin 0.0.6
>
>
> Add the support for Feature Archives (done through the Kickstart Project) and 
> the ability to use a custom Kickstart Project as a JAR file or Maven 
> Dependency



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


[jira] [Updated] (SLING-9452) Log Configuration does not work on Kickstart

2020-06-23 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer updated SLING-9452:

Fix Version/s: Feature Model Sling Kickstart Project 0.0.6

> Log Configuration does not work on Kickstart
> 
>
> Key: SLING-9452
> URL: https://issues.apache.org/jira/browse/SLING-9452
> Project: Sling
>  Issue Type: Bug
>  Components: Feature Model
>Affects Versions: Feature Model Sling Kickstart Project 0.0.2
>Reporter: Andreas Schaefer
>Assignee: Andreas Schaefer
>Priority: Major
> Fix For: Feature Model Sling Kickstart Project 0.0.4, Feature 
> Model Sling Kickstart Project 0.0.6
>
>
> Setting Sling Log Settings in Kickstart does not work as the Log Manager 
> configuration is provided by the Feature Model and is not overwritten by the 
> settings.



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


[jira] [Updated] (SLING-9543) Add Support for Feature Archives and Provide the ability to use a custom Kickstart

2020-06-23 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer updated SLING-9543:

Fix Version/s: (was: Feature Model Sling Maven Kickstart Plugin 0.0.4)

> Add Support for Feature Archives and Provide the ability to use a custom 
> Kickstart
> --
>
> Key: SLING-9543
> URL: https://issues.apache.org/jira/browse/SLING-9543
> Project: Sling
>  Issue Type: Improvement
>  Components: Feature Model
>Affects Versions: Feature Model Sling Maven Kickstart Plugin 0.0.2
>Reporter: Andreas Schaefer
>Priority: Major
> Fix For: Feature Model Sling Kickstart Project 0.0.6
>
>
> Add the support for Feature Archives (done through the Kickstart Project) and 
> the ability to use a custom Kickstart Project as a JAR file or Maven 
> Dependency



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


[jira] [Updated] (SLING-9543) Add Support for Feature Archives and Provide the ability to use a custom Kickstart

2020-06-23 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer updated SLING-9543:

Fix Version/s: Feature Model Sling Kickstart Project 0.0.6

> Add Support for Feature Archives and Provide the ability to use a custom 
> Kickstart
> --
>
> Key: SLING-9543
> URL: https://issues.apache.org/jira/browse/SLING-9543
> Project: Sling
>  Issue Type: Improvement
>  Components: Feature Model
>Affects Versions: Feature Model Sling Maven Kickstart Plugin 0.0.2
>Reporter: Andreas Schaefer
>Priority: Major
> Fix For: Feature Model Sling Kickstart Project 0.0.6, Feature 
> Model Sling Maven Kickstart Plugin 0.0.4
>
>
> Add the support for Feature Archives (done through the Kickstart Project) and 
> the ability to use a custom Kickstart Project as a JAR file or Maven 
> Dependency



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


[jira] [Updated] (SLING-9543) Add Support for Feature Archives and Provide the ability to use a custom Kickstart

2020-06-23 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer updated SLING-9543:

Fix Version/s: Feature Model Sling Kickstart Project 0.0.6

> Add Support for Feature Archives and Provide the ability to use a custom 
> Kickstart
> --
>
> Key: SLING-9543
> URL: https://issues.apache.org/jira/browse/SLING-9543
> Project: Sling
>  Issue Type: Improvement
>  Components: Feature Model
>Affects Versions: Feature Model Sling Maven Kickstart Plugin 0.0.2
>Reporter: Andreas Schaefer
>Priority: Major
> Fix For: Feature Model Sling Kickstart Project 0.0.6, Feature 
> Model Sling Maven Kickstart Plugin 0.0.4
>
>
> Add the support for Feature Archives (done through the Kickstart Project) and 
> the ability to use a custom Kickstart Project as a JAR file or Maven 
> Dependency



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


[jira] [Updated] (SLING-9543) Add Support for Feature Archives and Provide the ability to use a custom Kickstart

2020-06-23 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer updated SLING-9543:

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

> Add Support for Feature Archives and Provide the ability to use a custom 
> Kickstart
> --
>
> Key: SLING-9543
> URL: https://issues.apache.org/jira/browse/SLING-9543
> Project: Sling
>  Issue Type: Improvement
>  Components: Feature Model
>Affects Versions: Feature Model Sling Maven Kickstart Plugin 0.0.2
>Reporter: Andreas Schaefer
>Priority: Major
> Fix For: Feature Model Sling Maven Kickstart Plugin 0.0.4
>
>
> Add the support for Feature Archives (done through the Kickstart Project) and 
> the ability to use a custom Kickstart Project as a JAR file or Maven 
> Dependency



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


Re: [VOTE][CANCELLED] Release Apache Sling Kickstart and Kickstart Maven Plugin version 0.0.4

2020-06-23 Thread Andreas Schaefer
Due to the issue with the big FAR file I do cancel this release, find a 
solution and then retry the vote on a later date.

Regarding the big FAR file in the repository:

Do you want me to remove that file from the git repository with ‘git 
filter-branch’? I used that in the past and it works but I am not sure if it 
works with GitHub or if I am allowed to do it in the Apache repo.

Cheers - Andy

> On Jun 22, 2020, at 2:24 PM, Andreas Schaefer  
> wrote:
> 
> Hi,
> 
> For most part this is a release to catch up with the changes / improvements 
> of the Feature Model as a whole like support for Feature Archives and 
> upgrading to newer releases.
> 
> NOTE: due to the dependencies of Kickstart Project to the Kickstart Maven 
> Plugin and vice versa there could be some failures in the Jackson tests.
> 
> We solved 2 issues in this release:
> https://issues.apache.org/jira/projects/SLING/versions/12348280
> https://issues.apache.org/jira/projects/SLING/versions/12348424
> 
> There are still some outstanding issues:
> https://issues.apache.org/jira/projects/SLING/versions/12348423
> 
> This was moved to the next release as this was not that important as the user
> can use '-s' flag to accomplish the same thing.
> 
> Staging repository:
> https://repository.apache.org/content/repositories/orgapachesling-2288
> 
> 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 2288 /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.
> 
> Cheers - Andy Schaefer



[GitHub] [sling-whiteboard] cmrockwell commented on pull request #60: Saml2 auth handler/upgrade sling12 open samlv4 java11

2020-06-23 Thread GitBox


cmrockwell commented on pull request #60:
URL: https://github.com/apache/sling-whiteboard/pull/60#issuecomment-648260475


   Running `mvn clean verify` at the parent works for me...
   
   [INFO] 

   [INFO] Reactor Summary:
   [INFO]
   [INFO] Apache Sling - Maven Central Source Reporter 0.0.1-SNAPSHOT SUCCESS [ 
12.467 s]
   [INFO] Sling Model Persistor 1.0-SNAPSHOT . SUCCESS [  3.799 
s]
   [INFO] Apache Sling Starter Content System Information 1.0-SNAPSHOT SUCCESS 
[  0.942 s]
   [INFO] Apache Sling Commons Prometheus Metrics Exporter 1.0-SNAPSHOT SUCCESS 
[  0.820 s]
   [INFO] SAML2 Service Provider 0.2.0-SNAPSHOT .. SUCCESS [  7.003 
s]
   [INFO] Apache Sling Whiteboard (Builder) 1  SUCCESS [  0.827 
s]
   [INFO] 

   [INFO] BUILD SUCCESS
   [INFO] 

   [INFO] Total time: 27.377 s
   [INFO] Finished at: 2020-06-23T12:03:40-04:00
   [INFO] 

   ➜  sling-whiteboard 
git:(saml2-auth-handler/Upgrade-Sling12-OpenSAMLV4-Java11)



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-9531) Add operation which indicates that a more specific servlet is needed

2020-06-23 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-9531:


This ticket is not about changing the default but just about adding a new 
operation. Obviously you can only trigger that operation if you have an 
according request parameter from the client (e.g. in a hidden HTML form field).

> Add operation which indicates that a more specific servlet is needed
> 
>
> Key: SLING-9531
> URL: https://issues.apache.org/jira/browse/SLING-9531
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Affects Versions: Servlets Post 2.3.36
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Servlets POST 2.3.38
>
>
> Very often POST servlets rely on OSGi DS which is dynamic. If for whatever 
> reason the specialized servlet component is not running, Sling falls back to 
> the Default POST Servlet. That is very often not intended. To prevent the 
> Default POST Servlet from doing any repository modification operations a new 
> operation should be added which leads to a 500 error and the status message, 
> that a more specific servlet is necessary.
> Compare with the discussion from 
> https://lists.apache.org/thread.html/r00d54024759efe1f0456008e21a994f5bafe512bf65ff9bc1c767999%40%3Cdev.sling.apache.org%3E
> Currently there is only the very generic NOP operation which does not hint at 
> the fact that a necessary servlet is not deployed.



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


[jira] [Commented] (SLING-9531) Add operation which indicates that a more specific servlet is needed

2020-06-23 Thread Bertrand Delacretaz (Jira)


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

Bertrand Delacretaz commented on SLING-9531:


I was wondering how you're going to change the default POST servlet's default 
operation, which is currently the {{ModifyOperation}}, to your new POST 
operation.

I don't think we can change that while remaining backwards compatible.

Re-reading the sling dev list discussion linked above, do I understand 
correctly that clients will need to specify the name of this new operation with 
the {{:operation}} parameter for this feature to work?

If that's correct that works for me, just checking my understanding, and I 
suggest naming that new operation {{nofallback}} or {{nodefault}}.

> Add operation which indicates that a more specific servlet is needed
> 
>
> Key: SLING-9531
> URL: https://issues.apache.org/jira/browse/SLING-9531
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Affects Versions: Servlets Post 2.3.36
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Servlets POST 2.3.38
>
>
> Very often POST servlets rely on OSGi DS which is dynamic. If for whatever 
> reason the specialized servlet component is not running, Sling falls back to 
> the Default POST Servlet. That is very often not intended. To prevent the 
> Default POST Servlet from doing any repository modification operations a new 
> operation should be added which leads to a 500 error and the status message, 
> that a more specific servlet is necessary.
> Compare with the discussion from 
> https://lists.apache.org/thread.html/r00d54024759efe1f0456008e21a994f5bafe512bf65ff9bc1c767999%40%3Cdev.sling.apache.org%3E
> Currently there is only the very generic NOP operation which does not hint at 
> the fact that a necessary servlet is not deployed.



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


[jira] [Updated] (SLING-9531) Add operation which indicates that a more specific servlet is needed

2020-06-23 Thread Konrad Windszus (Jira)


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

Konrad Windszus updated SLING-9531:
---
Description: 
Very often POST servlets rely on OSGi DS which is dynamic. If for whatever 
reason the specialized servlet component is not running, Sling falls back to 
the Default POST Servlet. That is very often not intended. To prevent the 
Default POST Servlet from doing any repository modification operations a new 
operation should be added which leads to a 500 error and the status message, 
that a more specific servlet is necessary.

Compare with the discussion from 
https://lists.apache.org/thread.html/r00d54024759efe1f0456008e21a994f5bafe512bf65ff9bc1c767999%40%3Cdev.sling.apache.org%3E

Currently there is only the very generic NOP operation which does not hint at 
the fact that a necessary servlet is not deployed.

  was:
Very often POST servlets rely on OSGi DS which is dynamic. If for whatever 
reason the specialized servlet component is not running, Sling falls back to 
the Default POST Servlet. That is very often not intended. To prevent the 
Default POST Servlet from doing any repository modification operations a new 
operation should be added which leads to a 500 error and the status message, 
that a more specific servlet is necessary.

Compare with the discussion from 
https://lists.apache.org/thread.html/r00d54024759efe1f0456008e21a994f5bafe512bf65ff9bc1c767999%40%3Cdev.sling.apache.org%3E


> Add operation which indicates that a more specific servlet is needed
> 
>
> Key: SLING-9531
> URL: https://issues.apache.org/jira/browse/SLING-9531
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Affects Versions: Servlets Post 2.3.36
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Servlets POST 2.3.38
>
>
> Very often POST servlets rely on OSGi DS which is dynamic. If for whatever 
> reason the specialized servlet component is not running, Sling falls back to 
> the Default POST Servlet. That is very often not intended. To prevent the 
> Default POST Servlet from doing any repository modification operations a new 
> operation should be added which leads to a 500 error and the status message, 
> that a more specific servlet is necessary.
> Compare with the discussion from 
> https://lists.apache.org/thread.html/r00d54024759efe1f0456008e21a994f5bafe512bf65ff9bc1c767999%40%3Cdev.sling.apache.org%3E
> Currently there is only the very generic NOP operation which does not hint at 
> the fact that a necessary servlet is not deployed.



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


[Jenkins] Sling » sling-org-apache-sling-launchpad-testing » master #868 is FIXED

2020-06-23 Thread Apache Jenkins Server
Please see 
https://builds.apache.org/job/Sling/job/sling-org-apache-sling-launchpad-testing/job/master/868/
 for details.

No further emails will be sent until the status of the build is changed.

[GitHub] [sling-whiteboard] rombert commented on pull request #60: Saml2 auth handler/upgrade sling12 open samlv4 java11

2020-06-23 Thread GitBox


rombert commented on pull request #60:
URL: https://github.com/apache/sling-whiteboard/pull/60#issuecomment-648144839


   We could try switching the whole build to JDK 11. The thing is we only have 
one project, and that's the whiteboard rector. Can you try running `mvn clean 
verify` in the root of the Sling Whiteboard as see if all projects build?



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-whiteboard] cmrockwell commented on pull request #60: Saml2 auth handler/upgrade sling12 open samlv4 java11

2020-06-23 Thread GitBox


cmrockwell commented on pull request #60:
URL: https://github.com/apache/sling-whiteboard/pull/60#issuecomment-648135388


   How important is continued use of Java 8 for this bundle? 
   Maybe there could be a CI pipeline for Java 11?
   
   
https://builds.apache.org/blue/organizations/jenkins/Sling%2Fsling-whiteboard/detail/PR-60/2/pipeline
   
   



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-models-impl] etugarev commented on a change in pull request #17: SLING-8706 - Injections for java.util.Optional<> should be automatically optional

2020-06-23 Thread GitBox


etugarev commented on a change in pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/17#discussion_r444165885



##
File path: src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
##
@@ -495,12 +480,97 @@ public RuntimeException inject(InjectableElement element, 
Object value) {
 }
 }
 
+@NotNull
+private InjectableElement getElement(InjectableElement element, Type type) 
{

Review comment:
   Moved implementation to a named class `OptionalTypedInjectableElement`





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-models-impl] etugarev commented on a change in pull request #17: SLING-8706 - Injections for java.util.Optional<> should be automatically optional

2020-06-23 Thread GitBox


etugarev commented on a change in pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/17#discussion_r444163991



##
File path: src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
##
@@ -495,12 +480,97 @@ public RuntimeException inject(InjectableElement element, 
Object value) {
 }
 }
 
+@NotNull
+private InjectableElement getElement(InjectableElement element, Type type) 
{
+return new InjectableElement() {
+@Override
+public AnnotatedElement getAnnotatedElement() {
+return element.getAnnotatedElement();
+}
+
+@Override
+public Type getType() {
+return type;
+}
+
+@Override
+public boolean isPrimitive() {
+return element.isPrimitive();
+}
+
+@Override
+public String getName() {
+return element.getName();
+}
+
+@Override
+public String getSource() {
+return element.getSource();
+}
+
+@Override
+public String getVia() {
+return element.getVia();
+}
+
+@Override
+public Class getViaProviderType() {
+return element.getViaProviderType();
+}
+
+@Override
+public boolean hasDefaultValue() {
+return element.hasDefaultValue();
+}
+
+@Override
+public Object getDefaultValue() {
+return element.getDefaultValue() == null ? Optional.empty() : 
element.getDefaultValue();
+}
+
+@Override
+public boolean isOptional(InjectAnnotationProcessor 
annotationProcessor) {
+return true;
+}
+};
+}
+
 private
 @Nullable
 RuntimeException injectElement(final InjectableElement element, final 
Object adaptable,
final @NotNull DisposalCallbackRegistry 
registry, final InjectCallback callback,
final @NotNull Map 
preparedValues,
final @Nullable BundleContext modelContext) 
{
+if (element instanceof InjectableField) {
+Type genericType = ((InjectableField) 
element).getFieldGenericType();
+
+if (genericType instanceof ParameterizedType) {
+ParameterizedType pType = (ParameterizedType) genericType;
+
+if (pType.getRawType().equals(Optional.class)) {
+InjectableElement el = getElement(element, 
pType.getActualTypeArguments()[0]);
+
+return injectElementInternal(el, adaptable, registry, new 
InjectCallback() {
+@Override
+public RuntimeException inject(InjectableElement 
element1, Object value) {
+return callback.inject(element, 
value.equals(Optional.empty())
+? value
+: Optional.of(value));

Review comment:
   Having `Optional.ofNullable(value)` would be more elegant, however, will 
not help as the injection will fail already before this point, so this logic is 
actually to handle the null value properly, please see my comment below.





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-models-impl] etugarev commented on a change in pull request #17: SLING-8706 - Injections for java.util.Optional<> should be automatically optional

2020-06-23 Thread GitBox


etugarev commented on a change in pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/17#discussion_r444163991



##
File path: src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
##
@@ -495,12 +480,97 @@ public RuntimeException inject(InjectableElement element, 
Object value) {
 }
 }
 
+@NotNull
+private InjectableElement getElement(InjectableElement element, Type type) 
{
+return new InjectableElement() {
+@Override
+public AnnotatedElement getAnnotatedElement() {
+return element.getAnnotatedElement();
+}
+
+@Override
+public Type getType() {
+return type;
+}
+
+@Override
+public boolean isPrimitive() {
+return element.isPrimitive();
+}
+
+@Override
+public String getName() {
+return element.getName();
+}
+
+@Override
+public String getSource() {
+return element.getSource();
+}
+
+@Override
+public String getVia() {
+return element.getVia();
+}
+
+@Override
+public Class getViaProviderType() {
+return element.getViaProviderType();
+}
+
+@Override
+public boolean hasDefaultValue() {
+return element.hasDefaultValue();
+}
+
+@Override
+public Object getDefaultValue() {
+return element.getDefaultValue() == null ? Optional.empty() : 
element.getDefaultValue();
+}
+
+@Override
+public boolean isOptional(InjectAnnotationProcessor 
annotationProcessor) {
+return true;
+}
+};
+}
+
 private
 @Nullable
 RuntimeException injectElement(final InjectableElement element, final 
Object adaptable,
final @NotNull DisposalCallbackRegistry 
registry, final InjectCallback callback,
final @NotNull Map 
preparedValues,
final @Nullable BundleContext modelContext) 
{
+if (element instanceof InjectableField) {
+Type genericType = ((InjectableField) 
element).getFieldGenericType();
+
+if (genericType instanceof ParameterizedType) {
+ParameterizedType pType = (ParameterizedType) genericType;
+
+if (pType.getRawType().equals(Optional.class)) {
+InjectableElement el = getElement(element, 
pType.getActualTypeArguments()[0]);
+
+return injectElementInternal(el, adaptable, registry, new 
InjectCallback() {
+@Override
+public RuntimeException inject(InjectableElement 
element1, Object value) {
+return callback.inject(element, 
value.equals(Optional.empty())
+? value
+: Optional.of(value));

Review comment:
   Having `Optional.ofNullable(value)` would be more elegant, however, but 
will not help as the injection will fail already before this point if `value == 
null`, so this logic actually to handle the null value properly, please see my 
comment below.





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-models-impl] etugarev commented on a change in pull request #17: SLING-8706 - Injections for java.util.Optional<> should be automatically optional

2020-06-23 Thread GitBox


etugarev commented on a change in pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/17#discussion_r444160872



##
File path: src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
##
@@ -495,12 +480,97 @@ public RuntimeException inject(InjectableElement element, 
Object value) {
 }
 }
 
+@NotNull
+private InjectableElement getElement(InjectableElement element, Type type) 
{
+return new InjectableElement() {
+@Override
+public AnnotatedElement getAnnotatedElement() {
+return element.getAnnotatedElement();
+}
+
+@Override
+public Type getType() {
+return type;
+}
+
+@Override
+public boolean isPrimitive() {
+return element.isPrimitive();
+}
+
+@Override
+public String getName() {
+return element.getName();
+}
+
+@Override
+public String getSource() {
+return element.getSource();
+}
+
+@Override
+public String getVia() {
+return element.getVia();
+}
+
+@Override
+public Class getViaProviderType() {
+return element.getViaProviderType();
+}
+
+@Override
+public boolean hasDefaultValue() {
+return element.hasDefaultValue();
+}
+
+@Override
+public Object getDefaultValue() {
+return element.getDefaultValue() == null ? Optional.empty() : 
element.getDefaultValue();

Review comment:
   Here, unfortunately, I have to provide a value which is not null, to 
make the injection successful as we don't have a specific injector for Optional 
type, so a default value injector will be executed last and will fail if the 
value is not present (null) 





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-models-impl] etugarev commented on a change in pull request #17: SLING-8706 - Injections for java.util.Optional<> should be automatically optional

2020-06-23 Thread GitBox


etugarev commented on a change in pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/17#discussion_r444160872



##
File path: src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
##
@@ -495,12 +480,97 @@ public RuntimeException inject(InjectableElement element, 
Object value) {
 }
 }
 
+@NotNull
+private InjectableElement getElement(InjectableElement element, Type type) 
{
+return new InjectableElement() {
+@Override
+public AnnotatedElement getAnnotatedElement() {
+return element.getAnnotatedElement();
+}
+
+@Override
+public Type getType() {
+return type;
+}
+
+@Override
+public boolean isPrimitive() {
+return element.isPrimitive();
+}
+
+@Override
+public String getName() {
+return element.getName();
+}
+
+@Override
+public String getSource() {
+return element.getSource();
+}
+
+@Override
+public String getVia() {
+return element.getVia();
+}
+
+@Override
+public Class getViaProviderType() {
+return element.getViaProviderType();
+}
+
+@Override
+public boolean hasDefaultValue() {
+return element.hasDefaultValue();
+}
+
+@Override
+public Object getDefaultValue() {
+return element.getDefaultValue() == null ? Optional.empty() : 
element.getDefaultValue();

Review comment:
   Here, unfortunately, I have to provide a value which is not null, to 
make the injection successful as we don't have a specific injector for Optional 
type and a default value injection will be executed last and and will fail if 
the value is not present (null)





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-models-impl] etugarev commented on a change in pull request #17: SLING-8706 - Injections for java.util.Optional<> should be automatically optional

2020-06-23 Thread GitBox


etugarev commented on a change in pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/17#discussion_r444156820



##
File path: src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
##
@@ -495,12 +480,97 @@ public RuntimeException inject(InjectableElement element, 
Object value) {
 }
 }
 
+@NotNull
+private InjectableElement getElement(InjectableElement element, Type type) 
{
+return new InjectableElement() {
+@Override
+public AnnotatedElement getAnnotatedElement() {
+return element.getAnnotatedElement();
+}
+
+@Override
+public Type getType() {
+return type;
+}
+
+@Override
+public boolean isPrimitive() {
+return element.isPrimitive();
+}
+
+@Override
+public String getName() {
+return element.getName();
+}
+
+@Override
+public String getSource() {
+return element.getSource();
+}
+
+@Override
+public String getVia() {
+return element.getVia();
+}
+
+@Override
+public Class getViaProviderType() {
+return element.getViaProviderType();
+}
+
+@Override
+public boolean hasDefaultValue() {
+return element.hasDefaultValue();
+}
+
+@Override
+public Object getDefaultValue() {
+return element.getDefaultValue() == null ? Optional.empty() : 
element.getDefaultValue();
+}
+
+@Override
+public boolean isOptional(InjectAnnotationProcessor 
annotationProcessor) {
+return true;
+}
+};
+}
+
 private
 @Nullable
 RuntimeException injectElement(final InjectableElement element, final 
Object adaptable,
final @NotNull DisposalCallbackRegistry 
registry, final InjectCallback callback,
final @NotNull Map 
preparedValues,
final @Nullable BundleContext modelContext) 
{
+if (element instanceof InjectableField) {
+Type genericType = ((InjectableField) 
element).getFieldGenericType();
+
+if (genericType instanceof ParameterizedType) {
+ParameterizedType pType = (ParameterizedType) genericType;
+
+if (pType.getRawType().equals(Optional.class)) {
+InjectableElement el = getElement(element, 
pType.getActualTypeArguments()[0]);
+
+return injectElementInternal(el, adaptable, registry, new 
InjectCallback() {
+@Override
+public RuntimeException inject(InjectableElement 
element1, Object value) {
+return callback.inject(element, 
value.equals(Optional.empty())
+? value
+: Optional.of(value));

Review comment:
   Moved implementation to `OptionalWrappingCallback` private class.





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: [VOTE] Release Apache Sling Kickstart and Kickstart Maven Plugin version 0.0.4

2020-06-23 Thread Bertrand Delacretaz
On Tue, Jun 23, 2020 at 10:53 AM Robert Munteanu  wrote:
> ...I asked earlier about checking in the FAR file to the git repository
...
> Could this binary file be pulled in at runtime instead? ...

I think org.apache.sling.kickstart-0.0.4-source-release.zip cannot be
considered a "source release" as it contains a large aggregate of jar
files, so I'm -1 on this release.

I haven't followed previous discussions but there must be a better way
of distributing that org.apache.sling.kickstart.far

Compared to what we're doing for other things, I think that file
should be built from a pom that's in one of out Git repos and
distributed via Maven Central as an attached artifact, using [1] or
something similar. Creating a specific Git repository for that is fine
if that's convenient.

-Bertrand

[1] https://www.mojohaus.org/build-helper-maven-plugin/attach-artifact-mojo.html


Re: [VOTE] Release Apache Sling Kickstart and Kickstart Maven Plugin version 0.0.4

2020-06-23 Thread Robert Munteanu
Hi Andy and thanks for stepping up with a new release.

I asked earlier about checking in the FAR file to the git repository. I
guess it was missed due to the non-descript subject line, sorry about
that

  
https://lists.apache.org/thread.html/r253ae564eadb877fce0af52b6f5f7a04b0b527dbd7bb82c4324b9c8e%40%3Cdev.sling.apache.org%3E

As a general note, I think we should be wary of checking in binaries to
git. With a 80 MB binary file cloning is slower, and that affects
developers, CI servers, and potentially others. Moreover, with the
nature of Git, these blobs will stay in the repository forever, and
refreshing the FAR file 10 times will yield a 800MB payload, which is
really large.

Also, the release artifacts contain it as well, including the source
release, which IMO does not make that much sense, and it's putting
pressure on our mirrors.

  
https://repository.apache.org/content/repositories/orgapachesling-2288/org/apache/sling/org.apache.sling.kickstart/0.0.4/

I am not sure ATM if it is actually a problem in a legal sense to
include a jar file in a source release. However, I think it is not
fully in the spirit of a source release.

Could this binary file be pulled in at runtime instead?

Thanks,
Robert

On Mon, 2020-06-22 at 14:24 -0700, Andreas Schaefer wrote:
> Hi,
> 
> For most part this is a release to catch up with the changes /
> improvements of the Feature Model as a whole like support for Feature
> Archives and upgrading to newer releases.
> 
> NOTE: due to the dependencies of Kickstart Project to the Kickstart
> Maven Plugin and vice versa there could be some failures in the
> Jackson tests.
> 
> We solved 2 issues in this release:
> https://issues.apache.org/jira/projects/SLING/versions/12348280
> https://issues.apache.org/jira/projects/SLING/versions/12348424
> 
> There are still some outstanding issues:
> https://issues.apache.org/jira/projects/SLING/versions/12348423
> 
> This was moved to the next release as this was not that important as
> the user
> can use '-s' flag to accomplish the same thing.
> 
> Staging repository:
> https://repository.apache.org/content/repositories/orgapachesling-2288
> 
> 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 2288 /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.
> 
> Cheers - Andy Schaefer



[jira] [Commented] (SLING-7772) add other scripting options for pipe expressions

2020-06-23 Thread Bertrand Delacretaz (Jira)


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

Bertrand Delacretaz commented on SLING-7772:


I don't know how the script engine is currently selected but it might make 
sense to use extensions or mime-types to indicate which language you are using, 
and let the standard Sling script engine selection work as usual.

I know little about how Sling Pipes work, but maybe using a prefix such as

{code}
${js:2 + 2}
{code}

or

{code}
${groovy:2 + 2}
{code}

to indicate which language the expression is in would be practical, without 
having to code anything special for Sling Pipes: just ask the Sling scripting 
core to executing a "js" or a "groovy" script. Or use "pjs" if you need to 
select a specific "js" engine for Sling Pipes.

Note that, if needed, implementing a minimal scripting engine is fairly easy, 
see for example 
https://github.com/apache/sling-samples/tree/master/org.apache.sling.graphql.samples.website/src/main/java/org/apache/sling/scripting/handlebars
 

> add other scripting options for pipe expressions
> 
>
> Key: SLING-7772
> URL: https://issues.apache.org/jira/browse/SLING-7772
> Project: Sling
>  Issue Type: Improvement
>  Components: Extensions, pipes
>Affects Versions: Pipes 2.0.2
>Reporter: Nicolas Peltier
>Priority: Major
>
> nashorn is being deprecated (http://openjdk.java.net/jeps/335). There might 
> be another option soon, that will be another dependency.
> Thinking about it, we should provide an option for script in pipe expression 
> (which should be fairly easy to do). And may be thinking of changing the 
> default script engine not to be JS anymore but something that does not need 
> dependency installed, popular and performant



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


[jira] [Closed] (SLING-9385) Add properties for multi tenant usage

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9385.
-

> Add properties for multi tenant usage
> -
>
> Key: SLING-9385
> URL: https://issues.apache.org/jira/browse/SLING-9385
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Messages 0.1.2
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Messages 0.1.8
>
>




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


[jira] [Closed] (SLING-9474) Bad partition when using an empty package topic

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9474.
-

> Bad partition when using an empty package topic
> ---
>
> Key: SLING-9474
> URL: https://issues.apache.org/jira/browse/SLING-9474
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.16
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.16
>
>
> Since SLING-9460, the PubQueueCacheService tail poller fails to establish on 
> empty topics. It prevents agent from activating properly.



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


[jira] [Closed] (SLING-9495) Distributed Event is sending package type as distribution type

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9495.
-

> Distributed Event is sending package type as distribution type
> --
>
> Key: SLING-9495
> URL: https://issues.apache.org/jira/browse/SLING-9495
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.10
>Reporter: Dirk Rudolph
>Assignee: Dirk Rudolph
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.16
>
>
> When using journal based content distribution the distributed event contains 
> the package type instead of the distribution request type as distribution 
> type.
> See the following series of events on the DistributionPublisher (author)
> |distribution.type|ADD|
> |distribution.component.kind|agent|
> |event.topics|*org/apache/sling/distribution/agent/package/created*|
> |distribution.package.id|dstrpck-159806534-03e0b77c-62fb-4781-8ec0-462a8a2e7e40|
> |distribution.paths|/content/wknd/ch/de|
> |distribution.component.name|journal|
> |distribution.type|ADD|
> |distribution.component.kind|agent|
> |event.topics|*org/apache/sling/distribution/agent/package/queued*|
> |distribution.package.id|dstrpck-159806534-03e0b77c-62fb-4781-8ec0-462a8a2e7e40
> |distribution.paths|/content/wknd/ch/de|
> |distribution.component.name|journal|
> |distribution.type|{color:red}default{color}|
> |distribution.component.kind|agent|
> |event.topics|*org/apache/sling/distribution/agent/package/distributed*|
> |distribution.package.id|dstrpck-159806534-03e0b77c-62fb-4781-8ec0-462a8a2e7e40|
> |distribution.paths|/content/wknd/ch/de|
> |distribution.component.name|journal|



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


[jira] [Closed] (SLING-9465) DiscoveryService is activated on all services

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9465.
-

> DiscoveryService is activated on all services
> -
>
> Key: SLING-9465
> URL: https://issues.apache.org/jira/browse/SLING-9465
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.16
>
>
> The DiscoveryService service is only required on services running the 
> DistributionPublisher agents. The DiscoveryServices consumes resources 
> (connections, data volume) which should be avoided.



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


[jira] [Closed] (SLING-9467) PackageCleanupTask is enabled on all services

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9467.
-

> PackageCleanupTask is enabled on all services
> -
>
> Key: SLING-9467
> URL: https://issues.apache.org/jira/browse/SLING-9467
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.16
>
>
> The PackageCleanupTask service is required to be executed only on services 
> running DistributionPublisher  agents (typically on author). As of now, the 
> tasks can run on publish services which consume resources (connections, 
> bandwidth, generate traffic) for nothing. 



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


[jira] [Closed] (SLING-9460) Avoid seeding messages in PubQueueCache

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9460.
-

> Avoid seeding messages in PubQueueCache
> ---
>
> Key: SLING-9460
> URL: https://issues.apache.org/jira/browse/SLING-9460
> Project: Sling
>  Issue Type: Improvement
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.10
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.16
>
>
> We seed the cache to make sure we have a known minimal offset. So when a 
> request for an older package comes in we can create an additional consumer 
> that can then stop when it reaches the minimal offset.
> Instead of seeding we could wait until we receive the first discovery 
> message. Then we can start from this offset. 



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


[jira] [Closed] (SLING-9377) RangePoller might accumulate too much memory if subscriber is lagging

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9377.
-

> RangePoller might accumulate too much memory if subscriber is lagging
> -
>
> Key: SLING-9377
> URL: https://issues.apache.org/jira/browse/SLING-9377
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.10
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.16
>
>
> Author starts at the current offset of the journal.
> If a subscriber reports an offset that is behind a lot then author will use a 
> RangePoller to fetch the not yet loaded messages and put them into the cache.
> The RangePoller does not filter the messages for the subscribed agents and 
> also does not filter out pings. This way the cache might grow a lot bigger 
> than it should be.



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


[jira] [Closed] (SLING-9464) PubQueueCache is enabled on all services

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9464.
-

> PubQueueCache is enabled on all services
> 
>
> Key: SLING-9464
> URL: https://issues.apache.org/jira/browse/SLING-9464
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.16
>
>
> The PubQueueCache service is required only on services running 
> DistributionPublisher  agents (typically on author). As of now, the service 
> can be enabled on publish services which consume resources (connections, 
> bandwidth, generate traffic) for nothing. 



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


[jira] [Closed] (SLING-9481) Avoid seeding messages in PackageRepo

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9481.
-

> Avoid seeding messages in PackageRepo
> -
>
> Key: SLING-9481
> URL: https://issues.apache.org/jira/browse/SLING-9481
> Project: Sling
>  Issue Type: Improvement
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.10
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.16
>
>
> Currently we us seeding messages to determine the oldest and newest offset on 
> the journal. This is then used to cleanup the larger packages that are stored 
> in the repo.
> To avoid those seeding messages we should rely on a much simpler algorithm.
> We only store very few packages in the repository. So there is no need to 
> clean them quickly. We only must make sure we clean packages up after they 
> are not anymore present in the journal. As retention time is maximum 7 days. 
> We can assume that 30 days is a safe time after which we can delete packages.
> So the idea is to run a cleanup in certain intervals and cleanup all packages 
> that are older than 30 days.



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


[jira] [Closed] (SLING-9404) Static analysis fixes

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9404.
-

> Static analysis fixes
> -
>
> Key: SLING-9404
> URL: https://issues.apache.org/jira/browse/SLING-9404
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.16
>
>




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


[jira] [Closed] (SLING-9340) Don’t use Thread.interrupt()

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9340.
-

> Don’t use Thread.interrupt()
> 
>
> Key: SLING-9340
> URL: https://issues.apache.org/jira/browse/SLING-9340
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.0
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.16
>
>
> Interrupt don't play well with Oak and can trigger stopping the repository, 
> see OAK-2609. The Oak team documents to not use interrupt in 
> https://jackrabbit.apache.org/oak/docs/dos_and_donts.html
> Distribution journal code leverages interrupt at multiple places. This issue 
> is about avoiding interruption in favour of running flags.



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


[jira] [Closed] (SLING-9401) Make subscribeIdle check configurable

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9401.
-

> Make subscribeIdle check configurable
> -
>
> Key: SLING-9401
> URL: https://issues.apache.org/jira/browse/SLING-9401
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.10
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.16
>
>
> Not every instance of distribution subscriber should have a readiness check. 
> So we should have a configuration for it.



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


[jira] [Closed] (SLING-9353) Failure to install replication package not accounted for in metrics

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9353.
-

> Failure to install replication package not accounted for in metrics
> ---
>
> Key: SLING-9353
> URL: https://issues.apache.org/jira/browse/SLING-9353
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.8
>Reporter: Alexei Krainiouk
>Assignee: Timothee Maret
>Priority: Blocker
> Fix For: Content Distribution Journal Core 0.1.16
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> The problem is that all exception thrown by installPackage are caught in
>  
> [ContentPackageExtractor.handle(...)|https://github.com/apache/sling-org-apache-sling-distribution-journal]
>  method and turned into DistributionException.
> However the [code responsible for 
> reporting|https://github.com/apache/sling-org-apache-sling-distribution-journal]
>  replication failures is not set to catch DistributionException
> The fix is submitted in this pull request: 
> https://github.com/apache/sling-org-apache-sling-distribution-journal/pull/27



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


[jira] [Closed] (SLING-9396) TopologyView changed fill up the logs

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9396.
-

> TopologyView changed fill up the logs
> -
>
> Key: SLING-9396
> URL: https://issues.apache.org/jira/browse/SLING-9396
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.6
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.16
>
>
> Since SLING-8620, the a log entry like the following is logged for every 
> processed package. The logs are filled with those statements for deployments 
> using content distribution heavily.
> {code}
> {"file_path":"/var/log/aem/error.log","orig_time":"24.04.2020 
> 15:59:37.096","level":"INFO","msg":"[sling-default-4-Registered Service.6633] 
> org.apache.sling.distribution.journal.impl.publisher.DiscoveryService 
> TopologyView changed from 
> {\"states\":[{\"timestamp\":1587743965568,\"offset\":156580158,\"retries\":0,\"maxRetries\":-1,\"editable\":true,\"pubAgentName\":\"publish\",\"subAgentId\":\"cfd9ab72-34dc-400d-89e1-50bf890cde77-publishSubscriber\"},
>  
> {\"timestamp\":1587743966976,\"offset\":156580158,\"retries\":0,\"maxRetries\":-1,\"editable\":false,\"pubAgentName\":\"publish\",\"subAgentId\":\"7aa769b3-b822-489e-a436-1c6b9aca3c15-publishSubscriber\"}]}
>  to 
> {\"states\":[{\"timestamp\":1587743975568,\"offset\":156580160,\"retries\":0,\"maxRetries\":-1,\"editable\":true,\"pubAgentName\":\"publish\",\"subAgentId\":\"cfd9ab72-34dc-400d-89e1-50bf890cde77-publishSubscriber\"},
>  
> {\"timestamp\":1587743976977,\"offset\":156580160,\"retries\":0,\"maxRetries\":-1,\"editable\":false,\"pubAgentName\":\"publish\",\"subAgentId\":\"7aa769b3-b822-489e-a436-1c6b9aca3c15-publishSubscriber\"}]}","pod_name":"skyline-p95-aem-author-58555ff5f9-4fqd4","pod_uid":"cecfc7de-ca4d-49e4-9477-2a1e23153613","namespace":"ns-team-authorpersistence","aem_tenant":"ns-team-authorpersistence","aem_program_id":"0","aem_tier":"author","aem_envType":"dev","aem_envName":"dev42","aem_envId":"0","aem_service":"skyline-p95","aem_base_version":"6.5"}
> {code}



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


[jira] [Closed] (SLING-9010) itests fail because maven central now only accepts https

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9010.
-

> itests fail because maven central now only accepts https
> 
>
> Key: SLING-9010
> URL: https://issues.apache.org/jira/browse/SLING-9010
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal ITs 0.1.0
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal ITs 0.1.2
>
>
> I saw build failures in:
> [https://builds.apache.org/job/Sling/job/sling-org-apache-sling-distribution-journal-it/job/master/259/console]
>  
> It seems the problem is related to the change of maven central offering https 
> now exclusively.
>  
> For normal maven builds this works as recent maven versions also use https. 
> Unfortunately it seems pax exam still (aether) still
> uses http, so it fails.
>  
>  I was able to work around this by 
> setting:repository("[https://repo1.maven.org/maven2];).id("central")in the 
> pax exam configuration.
> Unfortunately I think I hit a pax exam error. In sling TestSupport we already 
> define such a repository for apache snapshots. Now when adding another one 
> pax exam fails with some error stating that the repo url would begin with "+" 
> which is invalid.
> I worked around that by redefining the base configuration without adding the 
> apache snapshot repo.



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


[jira] [Closed] (SLING-9402) subscriberIdle check should not got from GREEN to RED even if journal is unavailable

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9402.
-

> subscriberIdle check should not got from GREEN to RED even if journal is 
> unavailable
> 
>
> Key: SLING-9402
> URL: https://issues.apache.org/jira/browse/SLING-9402
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.10
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.16
>
>
> The JournalAvailableChecker causes a DistributionSubscriber to go down if the 
> journal is not available and come up again if it becomes available again.
> This also resets the state of the SubscriberIdle check. To avoid this we 
> should have a central store per process that holds the idle states.
>  



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


[jira] [Closed] (SLING-9476) Journal IT tests fail due to wrong assumptions

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9476.
-

> Journal IT tests fail due to wrong assumptions
> --
>
> Key: SLING-9476
> URL: https://issues.apache.org/jira/browse/SLING-9476
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>Priority: Major
> Fix For: Content Distribution Journal ITs 0.1.2
>
>
> Since the change SLING-9460, some IT test fail
> https://builds.apache.org/job/Sling/job/sling-org-apache-sling-distribution-journal-it/
> AuthorDistributeTest.testDistribute



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


[jira] [Closed] (SLING-9482) Seed the cache from offset persisted in the source repository

2020-06-23 Thread Jira


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

Timothée Maret closed SLING-9482.
-

> Seed the cache from offset persisted in the source repository
> -
>
> Key: SLING-9482
> URL: https://issues.apache.org/jira/browse/SLING-9482
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.16
>
>
> The approach taken in SLING-9460 to avoid sending seeding messages does not 
> address some scenarios like publishing content without subscriber agents. 
> Without subscriber agents.
> To be sure we always have a recent seed available, we should persist seed 
> offsets in the source repository (typ. author) and seed caches from it. We do 
> have the local store class that allows to easily write the offsets in the 
> repository. To not stress the repository too much, we should batch those 
> writes (e.g. 1 offset update every 10 package processed). To support a 
> cluster, the writes must be initiated only from the cluster leader instance.  



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


[jira] [Resolved] (SLING-9544) Update to latest feature model implementation

2020-06-23 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler resolved SLING-9544.
-
Resolution: Fixed

Updated to latest versions in 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/commit/24ea6faf24da577b088a9453091374a8579697e5

> Update to latest feature model implementation
> -
>
> Key: SLING-9544
> URL: https://issues.apache.org/jira/browse/SLING-9544
> Project: Sling
>  Issue Type: New Feature
>  Components: Content-Package to Feature Model Converter
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.0.10
>
>
> The converter needs to be updated to use the latest feature model (and json 
> handling)



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


[jira] [Created] (SLING-9544) Update to latest feature model implementation

2020-06-23 Thread Carsten Ziegeler (Jira)
Carsten Ziegeler created SLING-9544:
---

 Summary: Update to latest feature model implementation
 Key: SLING-9544
 URL: https://issues.apache.org/jira/browse/SLING-9544
 Project: Sling
  Issue Type: New Feature
  Components: Content-Package to Feature Model Converter
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
 Fix For: Content-Package to Feature Model Converter 1.0.10


The converter needs to be updated to use the latest feature model (and json 
handling)



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


[RESULT] [VOTE] Release Apache Sling Content Distribution Journal Messages 0.1.8, Content Distribution Journal Core 0.1.16 and Content Distribution Journal ITs 0.1.2

2020-06-23 Thread Timothee Maret
Hi,

The vote has passed with the following result :

+1 (binding): Robert Munteanu, Carsten Ziegeler, Daniel Klco
+1 (non binding): Christian Schneider

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