Re: [PR] SLING-12359 - Extend records support [sling-org-apache-sling-models-impl]

2024-06-24 Thread via GitHub


sonarcloud[bot] commented on PR #51:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/51#issuecomment-218103

   ## [![Quality Gate 
Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png
 'Quality Gate 
Passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-models-impl=51)
 **Quality Gate passed**  
   Issues  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0 New 
issues](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-models-impl=51=false=true)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png
 '') [0 Accepted 
issues](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-models-impl=51=WONTFIX)
   
   Measures  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-models-impl=51=false=true)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [83.3% Coverage on New 
Code](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-models-impl=51=new_coverage=list)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0.0% Duplication on New 
Code](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-models-impl=51=new_duplicated_lines_density=list)
  
 
   [See analysis details on 
SonarCloud](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-models-impl=51)
   
   


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

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

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



[jira] [Commented] (SLING-12360) Models: Update to Parent 60, Java 11 Minimum Version

2024-06-24 Thread Stefan Seifert (Jira)


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

Stefan Seifert commented on SLING-12360:


excluding 
[https://github.com/apache/sling-org-apache-sling-models-validation-impl] and 
[https://github.com/apache/sling-org-apache-sling-models-integration-tests] 
here as those rely on outdated integration test infrastructure with an old 
sling version not compatible with java 17+ - this has to be handled in a 
separate ticket.

> Models: Update to Parent 60, Java 11 Minimum Version
> 
>
> Key: SLING-12360
> URL: https://issues.apache.org/jira/browse/SLING-12360
> Project: Sling
>  Issue Type: Improvement
>  Components: Sling Models
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>Priority: Major
> Fix For: Models Context-Aware Configuration 1.0.4, Models 
> Implementation 1.6.6, Models Jackson Exporter 1.1.6, Sling Models bnd Plugin 
> 1.0.2
>
>
> update to parent 60, see also [https://cwiki.apache.org/confluence/x/SI75E]
> this drops java 8 support, and instead supports java 11, 17, 21 - build is 
> done with java 17
> minimum java requirement for runtime is java 11



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


[jira] [Updated] (SLING-12360) Models: Update to Parent 60, Java 11 Minimum Version

2024-06-24 Thread Stefan Seifert (Jira)


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

Stefan Seifert updated SLING-12360:
---
Fix Version/s: (was: Models Validation Impl 1.1.2)

> Models: Update to Parent 60, Java 11 Minimum Version
> 
>
> Key: SLING-12360
> URL: https://issues.apache.org/jira/browse/SLING-12360
> Project: Sling
>  Issue Type: Improvement
>  Components: Sling Models
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>Priority: Major
> Fix For: Models Context-Aware Configuration 1.0.4, Models 
> Implementation 1.6.6, Models Jackson Exporter 1.1.6, Sling Models bnd Plugin 
> 1.0.2
>
>
> update to parent 60, see also [https://cwiki.apache.org/confluence/x/SI75E]
> this drops java 8 support, and instead supports java 11, 17, 21 - build is 
> done with java 17
> minimum java requirement for runtime is java 11



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


[PR] SLING-12360 Update to Parent 60, Java 11 Minimum Version [sling-org-apache-sling-bnd-models]

2024-06-24 Thread via GitHub


stefanseifert opened a new pull request, #1:
URL: https://github.com/apache/sling-org-apache-sling-bnd-models/pull/1

   and apply spotless formatting


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

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

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



[PR] SLING-12360 Update to Parent 60, Java 11 Minimum Version [sling-org-apache-sling-models-caconfig]

2024-06-24 Thread via GitHub


stefanseifert opened a new pull request, #2:
URL: https://github.com/apache/sling-org-apache-sling-models-caconfig/pull/2

   and apply spotless formatting


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

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

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



[PR] SLING-12360 Update to Parent 60, Java 11 Minimum Version [sling-org-apache-sling-models-jacksonexporter]

2024-06-24 Thread via GitHub


stefanseifert opened a new pull request, #13:
URL: 
https://github.com/apache/sling-org-apache-sling-models-jacksonexporter/pull/13

   and apply spotless formatting


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

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

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



[PR] SLING-12360 Update to Parent 60, Java 11 Minimum Version [sling-org-apache-sling-models-impl]

2024-06-24 Thread via GitHub


stefanseifert opened a new pull request, #52:
URL: https://github.com/apache/sling-org-apache-sling-models-impl/pull/52

   and apply spotless formatting


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

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

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



Re: [PR] SLING-12283 : changed the config Pid to separate factoryPID & PID wit… [sling-org-apache-sling-installer-factory-configuration]

2024-06-24 Thread via GitHub


rishabhdaim commented on code in PR #13:
URL: 
https://github.com/apache/sling-org-apache-sling-installer-factory-configuration/pull/13#discussion_r1650963825


##
src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigInstallTask.java:
##
@@ -92,6 +92,9 @@ public void execute(final InstallationContext ctx) {
 }
 
 Configuration config = 
ConfigUtil.getConfiguration(this.getConfigurationAdmin(), this.factoryPid, 
this.configPid);
+if (config == null) {
+config = 
ConfigUtil.getLegacyFactoryConfig(this.getConfigurationAdmin(), 
this.factoryPid, null, this.configPid);
+}

Review Comment:
   added in 
https://github.com/apache/sling-org-apache-sling-installer-factory-configuration/pull/13/commits/fa4ef701943d95402a5e952ffda6338fdbe29f4a



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

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

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



[PR] SLING-12361 Update to Parent 60, Java 11 Minimum Version [sling-org-apache-sling-caconfig-bnd-plugin]

2024-06-24 Thread via GitHub


stefanseifert opened a new pull request, #1:
URL: https://github.com/apache/sling-org-apache-sling-caconfig-bnd-plugin/pull/1

   and apply spotless formatting
   and update to bnd 6.0.0 as minimum version to compile against


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

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

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



[PR] SLING-12361 Update to Parent 60, Java 11 Minimum Version [sling-org-apache-sling-caconfig-impl]

2024-06-24 Thread via GitHub


stefanseifert opened a new pull request, #10:
URL: https://github.com/apache/sling-org-apache-sling-caconfig-impl/pull/10

   and apply spotless formatting


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

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

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



[PR] SLING-12361 Update to Parent 60, Java 11 Minimum Version [sling-org-apache-sling-caconfig-spi]

2024-06-24 Thread via GitHub


stefanseifert opened a new pull request, #2:
URL: https://github.com/apache/sling-org-apache-sling-caconfig-spi/pull/2

   and apply spotless formatting


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

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

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



Re: [PR] Added API for context aware config resource injection. [sling-org-apache-sling-caconfig-api]

2024-06-24 Thread via GitHub


stefanseifert closed pull request #1: Added API for context aware config 
resource injection.
URL: https://github.com/apache/sling-org-apache-sling-caconfig-api/pull/1


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

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

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



[PR] SLING-12361 Update to Parent 60, Java 11 Minimum Version [sling-org-apache-sling-caconfig-api]

2024-06-24 Thread via GitHub


stefanseifert opened a new pull request, #3:
URL: https://github.com/apache/sling-org-apache-sling-caconfig-api/pull/3

   and apply spotless formatting


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

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

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



[jira] [Commented] (SLING-12360) Models: Update to Parent 60, Java 11 Minimum Version

2024-06-24 Thread Stefan Seifert (Jira)


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

Stefan Seifert commented on SLING-12360:


models api already updated to parent 60 in SLING-12273

> Models: Update to Parent 60, Java 11 Minimum Version
> 
>
> Key: SLING-12360
> URL: https://issues.apache.org/jira/browse/SLING-12360
> Project: Sling
>  Issue Type: Improvement
>  Components: Sling Models
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>Priority: Major
> Fix For: Models Validation Impl 1.1.2, Models Context-Aware 
> Configuration 1.0.4, Models Implementation 1.6.6, Models Jackson Exporter 
> 1.1.6, Sling Models bnd Plugin 1.0.2
>
>
> update to parent 60, see also [https://cwiki.apache.org/confluence/x/SI75E]
> this drops java 8 support, and instead supports java 11, 17, 21 - build is 
> done with java 17
> minimum java requirement for runtime is java 11



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


[jira] [Updated] (SLING-12360) Models: Update to Parent 60, Java 11 Minimum Version

2024-06-24 Thread Stefan Seifert (Jira)


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

Stefan Seifert updated SLING-12360:
---
Fix Version/s: (was: Models API 1.5.2)

> Models: Update to Parent 60, Java 11 Minimum Version
> 
>
> Key: SLING-12360
> URL: https://issues.apache.org/jira/browse/SLING-12360
> Project: Sling
>  Issue Type: Improvement
>  Components: Sling Models
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>Priority: Major
> Fix For: Models Validation Impl 1.1.2, Models Context-Aware 
> Configuration 1.0.4, Models Implementation 1.6.6, Models Jackson Exporter 
> 1.1.6, Sling Models bnd Plugin 1.0.2
>
>
> update to parent 60, see also [https://cwiki.apache.org/confluence/x/SI75E]
> this drops java 8 support, and instead supports java 11, 17, 21 - build is 
> done with java 17
> minimum java requirement for runtime is java 11



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


[jira] [Updated] (SLING-12360) Models: Update to Parent 60, Java 11 Minimum Version

2024-06-24 Thread Stefan Seifert (Jira)


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

Stefan Seifert updated SLING-12360:
---
Fix Version/s: Sling Models bnd Plugin 1.0.2

> Models: Update to Parent 60, Java 11 Minimum Version
> 
>
> Key: SLING-12360
> URL: https://issues.apache.org/jira/browse/SLING-12360
> Project: Sling
>  Issue Type: Improvement
>  Components: Sling Models
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
>Priority: Major
> Fix For: Models Validation Impl 1.1.2, Models Context-Aware 
> Configuration 1.0.4, Models API 1.5.2, Models Implementation 1.6.6, Models 
> Jackson Exporter 1.1.6, Sling Models bnd Plugin 1.0.2
>
>
> update to parent 60, see also [https://cwiki.apache.org/confluence/x/SI75E]
> this drops java 8 support, and instead supports java 11, 17, 21 - build is 
> done with java 17
> minimum java requirement for runtime is java 11



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


[jira] [Created] (SLING-12361) caconfig: Update to Parent 60, Java 11 Minimum Version

2024-06-24 Thread Stefan Seifert (Jira)
Stefan Seifert created SLING-12361:
--

 Summary: caconfig: Update to Parent 60, Java 11 Minimum Version
 Key: SLING-12361
 URL: https://issues.apache.org/jira/browse/SLING-12361
 Project: Sling
  Issue Type: Improvement
  Components: Extensions
Reporter: Stefan Seifert
Assignee: Stefan Seifert
 Fix For: Context-Aware Configuration bnd Plugin 1.0.4, 
Context-Aware Configuration API 1.3.2, Context-Aware Configuration SPI 1.4.2, 
Context-Aware Configuration Impl 1.6.2


update to parent 60, see also [https://cwiki.apache.org/confluence/x/SI75E]

this drops java 8 support, and instead supports java 11, 17, 21 - build is done 
with java 17

minimum java requirement for runtime is java 11



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


[jira] [Created] (SLING-12360) Models: Update to Parent 60, Java 11 Minimum Version

2024-06-24 Thread Stefan Seifert (Jira)
Stefan Seifert created SLING-12360:
--

 Summary: Models: Update to Parent 60, Java 11 Minimum Version
 Key: SLING-12360
 URL: https://issues.apache.org/jira/browse/SLING-12360
 Project: Sling
  Issue Type: Improvement
  Components: Sling Models
Reporter: Stefan Seifert
Assignee: Stefan Seifert
 Fix For: Models Validation Impl 1.1.2, Models Context-Aware 
Configuration 1.0.4, Models API 1.5.2, Models Implementation 1.6.6, Models 
Jackson Exporter 1.1.6


update to parent 60, see also [https://cwiki.apache.org/confluence/x/SI75E]

this drops java 8 support, and instead supports java 11, 17, 21 - build is done 
with java 17

minimum java requirement for runtime is java 11



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


Re: [PR] SLING-12359 - Extend records support [sling-org-apache-sling-models-impl]

2024-06-24 Thread via GitHub


stefanseifert commented on code in PR #51:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/51#discussion_r1650759424


##
src/main/java/org/apache/sling/models/impl/AssignableFrom.java:
##
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.models.impl;
+
+public interface AssignableFrom {

Review Comment:
   i'm wondering if it's worth to provide this as a generic helper class 
supporting all types of checks - but it's only used for checking the (unknown) 
record class. suggestions:
   * refactor the helper class to only actually check for java.lang.Record - 
then it's not required to put "java.lang.Records" in multiple other places in 
the code
   * probably it's not even required to use "isAssignableFrom", afaik it's not 
possible to extend a Record class in java language by design
   * do not use a interface for this helper class - it's not used as an 
interface
   * do not make it public (even if part of impl package)



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

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

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



[jira] [Assigned] (SLING-12359) Extend records support

2024-06-24 Thread Stefan Seifert (Jira)


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

Stefan Seifert reassigned SLING-12359:
--

Assignee: Stefan Seifert
Priority: Major  (was: Blocker)

> Extend records support
> --
>
> Key: SLING-12359
> URL: https://issues.apache.org/jira/browse/SLING-12359
> Project: Sling
>  Issue Type: Improvement
>  Components: Sling Models
>Affects Versions: Models Implementation 1.6.4
>Reporter: Herman Ciechanowiec
>Assignee: Stefan Seifert
>Priority: Major
> Fix For: Models Implementation 1.6.6
>
>
> Java 14 introduced support for record classes, and Apache Sling 12 by default 
> runs with Java 17, allowing the use of records.
> Although Apache Sling 12 supports record classes, the current latest version 
> of Apache Sling Models Implementation does not fully support injection in 
> relation to records. Specifically, for records, the Apache Sling Models 
> Implementation *does* support constructor injection similarly to a usual 
> class if there is an *explicit* constructor annotated with 
> `javax.inject.Inject`:
> {code:java}
> @Model(
> adaptables = {Resource.class, SlingHttpServletRequest.class},
> defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
> )
> public record StudentModel(String name, int age) {
> @Inject
> public StudentModel(
> @ValueMapValue(name = "name") @Default(values = "unknown")
> String name, 
> @ValueMapValue(name = "age") @Default(intValues = 0)
> int age
> ) {
> this.name = name;
> this.age = age;
> }
> }
> {code}
> However, for records, Apache Sling Models Implementation *does not* support 
> constructor injection if there is an *implicit* constructor. Such a 
> constructor cannot be annotated with `javax.inject.Inject` and will not be 
> picked up during injection. Therefore, such a Sling Model will not be 
> instantiated at all:
> {code:java}
> @Model(
> adaptables = {Resource.class, SlingHttpServletRequest.class},
> defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
> )
> public record StudentModel(
> @ValueMapValue(name = "name") @Default(values = "unknown")
> String name,
> @ValueMapValue(name = "age") @Default(intValues = 0)
> int age
> ) {}
> {code}
> The above issue should be addressed by introducing support for injection in 
> records' implicit constructors.
> Note:
> 1. For records, only constructor injection is supported since records cannot 
> have instance fields (code with such fields will not compile).
> 2. Apache Sling Models Implementation is currently based on Java 8 and may 
> also be executed in a Java 8 environment. Therefore, the records check should 
> be introduced via dynamic loading of the `java.lang.Record` class.



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


Re: [PR] Bump org.springframework:spring-context from 5.2.9.RELEASE to 5.2.22.RELEASE [sling-org-apache-sling-models-impl]

2024-06-24 Thread via GitHub


stefanseifert merged PR #49:
URL: https://github.com/apache/sling-org-apache-sling-models-impl/pull/49


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

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

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



Re: [PR] Bump org.springframework:spring-context from 5.2.9.RELEASE to 5.2.22.RELEASE [sling-org-apache-sling-models-impl]

2024-06-24 Thread via GitHub


stefanseifert commented on PR #49:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/49#issuecomment-2186074385

   this is only a testing dependency


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

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

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



Re: [PR] SLING-12359 - Extend records support [sling-org-apache-sling-models-impl]

2024-06-24 Thread via GitHub


ciechanowiec commented on PR #51:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/51#issuecomment-2186006044

   @rombert , thank you for your comment. 
   
   According to your suggestion, I've created a Jira ticket for this 
improvement and updated this merge request to reference that ticket:
   https://issues.apache.org/jira/projects/SLING/issues/SLING-12359 


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

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

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



[jira] [Updated] (SLING-12359) Extend records support

2024-06-24 Thread Herman Ciechanowiec (Jira)


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

Herman Ciechanowiec updated SLING-12359:

Description: 
Java 14 introduced support for record classes, and Apache Sling 12 by default 
runs with Java 17, allowing the use of records.

Although Apache Sling 12 supports record classes, the current latest version of 
Apache Sling Models Implementation does not fully support injection in relation 
to records. Specifically, for records, the Apache Sling Models Implementation 
*does* support constructor injection similarly to a usual class if there is an 
*explicit* constructor annotated with `javax.inject.Inject`:


{code:java}
@Model(
adaptables = {Resource.class, SlingHttpServletRequest.class},
defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(String name, int age) {

@Inject
public StudentModel(
@ValueMapValue(name = "name") @Default(values = "unknown")
String name, 
@ValueMapValue(name = "age") @Default(intValues = 0)
int age
) {
this.name = name;
this.age = age;
}
}
{code}


However, for records, Apache Sling Models Implementation *does not* support 
constructor injection if there is an *implicit* constructor. Such a constructor 
cannot be annotated with `javax.inject.Inject` and will not be picked up during 
injection. Therefore, such a Sling Model will not be instantiated at all:


{code:java}
@Model(
adaptables = {Resource.class, SlingHttpServletRequest.class},
defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(
@ValueMapValue(name = "name") @Default(values = "unknown")
String name,
@ValueMapValue(name = "age") @Default(intValues = 0)
int age
) {}
{code}


The above issue should be addressed by introducing support for injection in 
records' implicit constructors.

Note:

1. For records, only constructor injection is supported since records cannot 
have instance fields (code with such fields will not compile).
2. Apache Sling Models Implementation is currently based on Java 8 and may also 
be executed in a Java 8 environment. Therefore, the records check should be 
introduced via dynamic loading of the `java.lang.Record` class.

  was:
Java 14 introduced support for record classes, and Apache Sling 12 by default 
runs with Java 17, allowing the use of records.

Although Apache Sling 12 supports record classes, the current latest version of 
Apache Sling Models Implementation does not fully support injection in relation 
to records. Specifically, for records, the Apache Sling Models Implementation 
*does* support constructor injection similarly to a usual class if there is an 
*explicit* constructor annotated with `javax.inject.Inject`:


{code:java}
@Model(
adaptables = {Resource.class, SlingHttpServletRequest.class},
defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(String name, int age) {

@Inject
public StudentModel(
@ValueMapValue(name = "name") @Default(values = "unknown")
String name, 
@ValueMapValue(name = "age") @Default(intValues = 0)
int age
) {
this.name = name;
this.age = age;
}
}
{code}


However, for records, Apache Sling Models Implementation *does not* support 
constructor injection if there is an *implicit* constructor. Such a constructor 
cannot be annotated with `javax.inject.Inject` and will not be picked up during 
injection. Therefore, such a Sling Model will not be instantiated at all:


{code:java}
@Model(
        adaptables = {Resource.class, SlingHttpServletRequest.class},
        defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(
        @ValueMapValue(name = "name") @Default(values = "unknown")
        String name,
        @ValueMapValue(name = "age") @Default(intValues = 0)
        int age) {}
{code}


The above issue should be addressed by introducing support for injection in 
records' implicit constructors.

Note:

1. For records, only constructor injection is supported since records cannot 
have instance fields (code with such fields will not compile).
2. Apache Sling Models Implementation is currently based on Java 8 and may also 
be executed in a Java 8 environment. Therefore, the records check should be 
introduced via dynamic loading of the `java.lang.Record` class.


> Extend records support
> --
>
> Key: SLING-12359
> URL: https://issues.apache.org/jira/browse/SLING-12359
> Project: Sling
>  Issue Type: Improvement
>  Components: Sling Models
>Affects Versions: Models Implementation 1.6.4
>Reporter: Herman Ciechanowiec
>Priority: Blocker
>  

[jira] [Updated] (SLING-12359) Extend records support

2024-06-24 Thread Herman Ciechanowiec (Jira)


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

Herman Ciechanowiec updated SLING-12359:

Description: 
Java 14 introduced support for record classes, and Apache Sling 12 by default 
runs with Java 17, allowing the use of records.

Although Apache Sling 12 supports record classes, the current latest version of 
Apache Sling Models Implementation does not fully support injection in relation 
to records. Specifically, for records, the Apache Sling Models Implementation 
*does* support constructor injection similarly to a usual class if there is an 
*explicit* constructor annotated with `javax.inject.Inject`:


{code:java}
@Model(
adaptables = {Resource.class, SlingHttpServletRequest.class},
defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(String name, int age) {

@Inject
public StudentModel(
@ValueMapValue(name = "name") @Default(values = "unknown")
String name, 
@ValueMapValue(name = "age") @Default(intValues = 0)
int age
) {
this.name = name;
this.age = age;
}
}
{code}


However, for records, Apache Sling Models Implementation *does not* support 
constructor injection if there is an *implicit* constructor. Such a constructor 
cannot be annotated with `javax.inject.Inject` and will not be picked up during 
injection. Therefore, such a Sling Model will not be instantiated at all:


{code:java}
@Model(
        adaptables = {Resource.class, SlingHttpServletRequest.class},
        defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(
        @ValueMapValue(name = "name") @Default(values = "unknown")
        String name,
        @ValueMapValue(name = "age") @Default(intValues = 0)
        int age) {}
{code}


The above issue should be addressed by introducing support for injection in 
records' implicit constructors.

Note:

1. For records, only constructor injection is supported since records cannot 
have instance fields (code with such fields will not compile).
2. Apache Sling Models Implementation is currently based on Java 8 and may also 
be executed in a Java 8 environment. Therefore, the records check should be 
introduced via dynamic loading of the `java.lang.Record` class.

  was:
Java 14 introduced support for record classes, and Apache Sling 12 by default 
runs with Java 17, allowing the use of records.

Although Apache Sling 12 supports record classes, the current latest version of 
Apache Sling Models Implementation does not fully support injection in relation 
to records. Specifically, for records, the Apache Sling Models Implementation 
*does* support constructor injection similarly to a usual class if there is an 
*explicit* constructor annotated with `javax.inject.Inject`:


{code:java}
@Model(
        adaptables = {Resource.class, SlingHttpServletRequest.class},
        defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(String name, int age) {

    @Inject
    public StudentModel(
            @ValueMapValue(name = "name") @Default(values = "unknown")
            String name, 
            @ValueMapValue(name = "age") @Default(intValues = 0)
            int age
    )

{         this.name = name;         this.age = age;     }

}
{code}


However, for records, Apache Sling Models Implementation *does not* support 
constructor injection if there is an *implicit* constructor. Such a constructor 
cannot be annotated with `javax.inject.Inject` and will not be picked up during 
injection. Therefore, such a Sling Model will not be instantiated at all:


{code:java}
@Model(
        adaptables = {Resource.class, SlingHttpServletRequest.class},
        defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(
        @ValueMapValue(name = "name") @Default(values = "unknown")
        String name,
        @ValueMapValue(name = "age") @Default(intValues = 0)
        int age) {}
{code}


The above issue should be addressed by introducing support for injection in 
records' implicit constructors.

Note:

1. For records, only constructor injection is supported since records cannot 
have instance fields (code with such fields will not compile).
2. Apache Sling Models Implementation is currently based on Java 8 and may also 
be executed in a Java 8 environment. Therefore, the records check should be 
introduced via dynamic loading of the `java.lang.Record` class.


> Extend records support
> --
>
> Key: SLING-12359
> URL: https://issues.apache.org/jira/browse/SLING-12359
> Project: Sling
>  Issue Type: Improvement
>  Components: Sling Models
>Affects Versions: Models Implementation 1.6.4
>Reporter: Herman Ciechanowiec
>Priority: Blocker
> 

[jira] [Commented] (SLING-12359) Extend records support

2024-06-24 Thread Herman Ciechanowiec (Jira)


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

Herman Ciechanowiec commented on SLING-12359:
-

Implementation of the improvement:
https://github.com/apache/sling-org-apache-sling-models-impl/pull/51

> Extend records support
> --
>
> Key: SLING-12359
> URL: https://issues.apache.org/jira/browse/SLING-12359
> Project: Sling
>  Issue Type: Improvement
>  Components: Sling Models
>Affects Versions: Models Implementation 1.6.4
>Reporter: Herman Ciechanowiec
>Priority: Blocker
> Fix For: Models Implementation 1.6.6
>
>
> Java 14 introduced support for record classes, and Apache Sling 12 by default 
> runs with Java 17, allowing the use of records.
> Although Apache Sling 12 supports record classes, the current latest version 
> of Apache Sling Models Implementation does not fully support injection in 
> relation to records. Specifically, for records, the Apache Sling Models 
> Implementation *does* support constructor injection similarly to a usual 
> class if there is an *explicit* constructor annotated with 
> `javax.inject.Inject`:
> {code:java}
> @Model(
>         adaptables = {Resource.class, SlingHttpServletRequest.class},
>         defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
> )
> public record StudentModel(String name, int age) {
>     @Inject
>     public StudentModel(
>             @ValueMapValue(name = "name") @Default(values = "unknown")
>             String name, 
>             @ValueMapValue(name = "age") @Default(intValues = 0)
>             int age
>     )
> {         this.name = name;         this.age = age;     }
> }
> {code}
> However, for records, Apache Sling Models Implementation *does not* support 
> constructor injection if there is an *implicit* constructor. Such a 
> constructor cannot be annotated with `javax.inject.Inject` and will not be 
> picked up during injection. Therefore, such a Sling Model will not be 
> instantiated at all:
> {code:java}
> @Model(
>         adaptables = {Resource.class, SlingHttpServletRequest.class},
>         defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
> )
> public record StudentModel(
>         @ValueMapValue(name = "name") @Default(values = "unknown")
>         String name,
>         @ValueMapValue(name = "age") @Default(intValues = 0)
>         int age) {}
> {code}
> The above issue should be addressed by introducing support for injection in 
> records' implicit constructors.
> Note:
> 1. For records, only constructor injection is supported since records cannot 
> have instance fields (code with such fields will not compile).
> 2. Apache Sling Models Implementation is currently based on Java 8 and may 
> also be executed in a Java 8 environment. Therefore, the records check should 
> be introduced via dynamic loading of the `java.lang.Record` class.



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


[jira] [Updated] (SLING-12359) Extend records support

2024-06-24 Thread Herman Ciechanowiec (Jira)


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

Herman Ciechanowiec updated SLING-12359:

Description: 
Java 14 introduced support for record classes, and Apache Sling 12 by default 
runs with Java 17, allowing the use of records.

Although Apache Sling 12 supports record classes, the current latest version of 
Apache Sling Models Implementation does not fully support injection in relation 
to records. Specifically, for records, the Apache Sling Models Implementation 
*does* support constructor injection similarly to a usual class if there is an 
*explicit* constructor annotated with `javax.inject.Inject`:


{code:java}
@Model(
        adaptables = {Resource.class, SlingHttpServletRequest.class},
        defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(String name, int age) {

    @Inject
    public StudentModel(
            @ValueMapValue(name = "name") @Default(values = "unknown")
            String name, 
            @ValueMapValue(name = "age") @Default(intValues = 0)
            int age
    )

{         this.name = name;         this.age = age;     }

}
{code}


However, for records, Apache Sling Models Implementation *does not* support 
constructor injection if there is an *implicit* constructor. Such a constructor 
cannot be annotated with `javax.inject.Inject` and will not be picked up during 
injection. Therefore, such a Sling Model will not be instantiated at all:


{code:java}
@Model(
        adaptables = {Resource.class, SlingHttpServletRequest.class},
        defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(
        @ValueMapValue(name = "name") @Default(values = "unknown")
        String name,
        @ValueMapValue(name = "age") @Default(intValues = 0)
        int age) {}
{code}


The above issue should be addressed by introducing support for injection in 
records' implicit constructors.

Note:

1. For records, only constructor injection is supported since records cannot 
have instance fields (code with such fields will not compile).
2. Apache Sling Models Implementation is currently based on Java 8 and may also 
be executed in a Java 8 environment. Therefore, the records check should be 
introduced via dynamic loading of the `java.lang.Record` class.

  was:
Java 14 introduced support for record classes, and Apache Sling 12 by default 
runs with Java 17, allowing the use of records.

Although Apache Sling 12 supports record classes, the current latest version of 
Apache Sling Models Implementation does not fully support injection in relation 
to records. Specifically, for records, the Apache Sling Models Implementation 
*does* support constructor injection similarly to a usual class if there is an 
*explicit* constructor annotated with `javax.inject.Inject`:

```java
@Model(
        adaptables = {Resource.class, SlingHttpServletRequest.class},
        defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(String name, int age) {

    @Inject
    public StudentModel(
            @ValueMapValue(name = "name") @Default(values = "unknown")
            String name, 
            @ValueMapValue(name = "age") @Default(intValues = 0)
            int age
    )

{         this.name = name;         this.age = age;     }

}
```

However, for records, Apache Sling Models Implementation *does not* support 
constructor injection if there is an *implicit* constructor. Such a constructor 
cannot be annotated with `javax.inject.Inject` and will not be picked up during 
injection. Therefore, such a Sling Model will not be instantiated at all:

```java
@Model(
        adaptables = {Resource.class, SlingHttpServletRequest.class},
        defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(
        @ValueMapValue(name = "name") @Default(values = "unknown")
        String name,
        @ValueMapValue(name = "age") @Default(intValues = 0)
        int age) {}
```

The above issue should be addressed by introducing support for injection in 
records' implicit constructors.

Note:

1. For records, only constructor injection is supported since records cannot 
have instance fields (code with such fields will not compile).
2. Apache Sling Models Implementation is currently based on Java 8 and may also 
be executed in a Java 8 environment. Therefore, the records check should be 
introduced via dynamic loading of the `java.lang.Record` class.


> Extend records support
> --
>
> Key: SLING-12359
> URL: https://issues.apache.org/jira/browse/SLING-12359
> Project: Sling
>  Issue Type: Improvement
>  Components: Sling Models
>Affects Versions: Models Implementation 1.6.4
>Reporter: Herman Ciechanowiec
>Priority: Blocker
> Fix For: 

[jira] [Updated] (SLING-12359) Extend records support

2024-06-24 Thread Herman Ciechanowiec (Jira)


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

Herman Ciechanowiec updated SLING-12359:

Description: 
Java 14 introduced support for record classes, and Apache Sling 12 by default 
runs with Java 17, allowing the use of records.

Although Apache Sling 12 supports record classes, the current latest version of 
Apache Sling Models Implementation does not fully support injection in relation 
to records. Specifically, for records, the Apache Sling Models Implementation 
*does* support constructor injection similarly to a usual class if there is an 
*explicit* constructor annotated with `javax.inject.Inject`:

```java
@Model(
        adaptables = {Resource.class, SlingHttpServletRequest.class},
        defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(String name, int age) {

    @Inject
    public StudentModel(
            @ValueMapValue(name = "name") @Default(values = "unknown")
            String name, 
            @ValueMapValue(name = "age") @Default(intValues = 0)
            int age
    )

{         this.name = name;         this.age = age;     }

}
```

However, for records, Apache Sling Models Implementation *does not* support 
constructor injection if there is an *implicit* constructor. Such a constructor 
cannot be annotated with `javax.inject.Inject` and will not be picked up during 
injection. Therefore, such a Sling Model will not be instantiated at all:

```java
@Model(
        adaptables = {Resource.class, SlingHttpServletRequest.class},
        defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(
        @ValueMapValue(name = "name") @Default(values = "unknown")
        String name,
        @ValueMapValue(name = "age") @Default(intValues = 0)
        int age) {}
```

The above issue should be addressed by introducing support for injection in 
records' implicit constructors.

Note:

1. For records, only constructor injection is supported since records cannot 
have instance fields (code with such fields will not compile).
2. Apache Sling Models Implementation is currently based on Java 8 and may also 
be executed in a Java 8 environment. Therefore, the records check should be 
introduced via dynamic loading of the `java.lang.Record` class.

  was:
Java 14 introduced support for record classes, and Apache Sling 12 by default 
runs with Java 17, allowing the use of records.

Although Apache Sling 12 supports record classes, the current latest version of 
Apache Sling Models Implementation does not fully support injection in relation 
to records. Specifically, for records, the Apache Sling Models Implementation 
**does** support constructor injection similarly to a usual class if there is 
an **explicit** constructor annotated with `javax.inject.Inject`:

```java
@Model(
        adaptables = \{Resource.class, SlingHttpServletRequest.class},
        defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(String name, int age) {

    @Inject
    public StudentModel(
            @ValueMapValue(name = "name") @Default(values = "unknown")
            String name, 
            @ValueMapValue(name = "age") @Default(intValues = 0)
            int age
    ) {
        this.name = name;
        this.age = age;
    }
}
```

However, for records, Apache Sling Models Implementation **does not** support 
constructor injection if there is an **implicit** constructor. Such a 
constructor cannot be annotated with `javax.inject.Inject` and will not be 
picked up during injection. Therefore, such a Sling Model will not be 
instantiated at all:

```java
@Model(
        adaptables = \{Resource.class, SlingHttpServletRequest.class},
        defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(
        @ValueMapValue(name = "name") @Default(values = "unknown")
        String name,
        @ValueMapValue(name = "age") @Default(intValues = 0)
        int age) {}
```

The above issue should be addressed by introducing support for injection in 
records' implicit constructors.

Note:

1. For records, only constructor injection is supported since records cannot 
have instance fields (code with such fields will not compile).
2. Apache Sling Models Implementation is currently based on Java 8 and may also 
be executed in a Java 8 environment. Therefore, the records check should be 
introduced via dynamic loading of the `java.lang.Record` class.


> Extend records support
> --
>
> Key: SLING-12359
> URL: https://issues.apache.org/jira/browse/SLING-12359
> Project: Sling
>  Issue Type: Improvement
>  Components: Sling Models
>Affects Versions: Models Implementation 1.6.4
>Reporter: Herman Ciechanowiec
>Priority: Blocker
> Fix For: Models 

[jira] [Created] (SLING-12359) Extend records support

2024-06-24 Thread Herman Ciechanowiec (Jira)
Herman Ciechanowiec created SLING-12359:
---

 Summary: Extend records support
 Key: SLING-12359
 URL: https://issues.apache.org/jira/browse/SLING-12359
 Project: Sling
  Issue Type: Improvement
  Components: Sling Models
Affects Versions: Models Implementation 1.6.4
Reporter: Herman Ciechanowiec
 Fix For: Models Implementation 1.6.6


Java 14 introduced support for record classes, and Apache Sling 12 by default 
runs with Java 17, allowing the use of records.

Although Apache Sling 12 supports record classes, the current latest version of 
Apache Sling Models Implementation does not fully support injection in relation 
to records. Specifically, for records, the Apache Sling Models Implementation 
**does** support constructor injection similarly to a usual class if there is 
an **explicit** constructor annotated with `javax.inject.Inject`:

```java
@Model(
        adaptables = \{Resource.class, SlingHttpServletRequest.class},
        defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(String name, int age) {

    @Inject
    public StudentModel(
            @ValueMapValue(name = "name") @Default(values = "unknown")
            String name, 
            @ValueMapValue(name = "age") @Default(intValues = 0)
            int age
    ) {
        this.name = name;
        this.age = age;
    }
}
```

However, for records, Apache Sling Models Implementation **does not** support 
constructor injection if there is an **implicit** constructor. Such a 
constructor cannot be annotated with `javax.inject.Inject` and will not be 
picked up during injection. Therefore, such a Sling Model will not be 
instantiated at all:

```java
@Model(
        adaptables = \{Resource.class, SlingHttpServletRequest.class},
        defaultInjectionStrategy = DefaultInjectionStrategy.REQUIRED
)
public record StudentModel(
        @ValueMapValue(name = "name") @Default(values = "unknown")
        String name,
        @ValueMapValue(name = "age") @Default(intValues = 0)
        int age) {}
```

The above issue should be addressed by introducing support for injection in 
records' implicit constructors.

Note:

1. For records, only constructor injection is supported since records cannot 
have instance fields (code with such fields will not compile).
2. Apache Sling Models Implementation is currently based on Java 8 and may also 
be executed in a Java 8 environment. Therefore, the records check should be 
introduced via dynamic loading of the `java.lang.Record` class.



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


Re: [PR] [MISC] Extend records support [sling-org-apache-sling-models-impl]

2024-06-24 Thread via GitHub


rombert commented on PR #51:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/51#issuecomment-2185906257

   Thanks for the PR @ciechanowiec , happy to see further support added for 
records; in my own limited testing I did not run into this problem. My ask 
would be that you create a Jira for this enhancement as it's non-trivial (and 
impactful).
   
   I think someone with more models knowledge should review this ( maybe @kwin 
/ @stefanseifert ? ).


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

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

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



Re: [PR] chore(deps): update dependency com.fasterxml.woodstox:woodstox-core to v6.7.0 [sling-org-apache-sling-starter]

2024-06-24 Thread via GitHub


rombert merged PR #340:
URL: https://github.com/apache/sling-org-apache-sling-starter/pull/340


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

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

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



RE: [VOTE] Release Apache Sling Feature Model Analyser 2.0.8

2024-06-24 Thread Stefan Seifert
+1

stefan


RE: [VOTE] Release Apache Sling OSGi Feature Maven Plugin 1.8.4

2024-06-24 Thread Stefan Seifert
+1

concerning the release notes: it's difficult to match the tickets to the commit 
logs, as they are referencing SLING-12353 which is not assigned to this 
release, whereas there is no trace of SLING-12305 or SLING-12356 in the change 
logs of release 1.8.4.

stefan


Re: [PR] SLING-12283 : changed the config Pid to separate factoryPID & PID wit… [sling-org-apache-sling-installer-factory-configuration]

2024-06-24 Thread via GitHub


jsedding commented on code in PR #13:
URL: 
https://github.com/apache/sling-org-apache-sling-installer-factory-configuration/pull/13#discussion_r1650485640


##
src/main/java/org/apache/sling/installer/factories/configuration/impl/ConfigInstallTask.java:
##
@@ -92,6 +92,9 @@ public void execute(final InstallationContext ctx) {
 }
 
 Configuration config = 
ConfigUtil.getConfiguration(this.getConfigurationAdmin(), this.factoryPid, 
this.configPid);
+if (config == null) {
+config = 
ConfigUtil.getLegacyFactoryConfig(this.getConfigurationAdmin(), 
this.factoryPid, null, this.configPid);
+}

Review Comment:
   We need it for deletion in case the config is removed on another cluster 
node, where it has the '~'-separated format.



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

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

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



[jira] [Commented] (SLING-9143) RangePoller is not closed when the cache is closed

2024-06-24 Thread Timothee Maret (Jira)


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

Timothee Maret commented on SLING-9143:
---

No. I have moved to the next release.

> RangePoller is not closed when the cache is closed
> --
>
> Key: SLING-9143
> URL: https://issues.apache.org/jira/browse/SLING-9143
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.4
>Reporter: Timothee Maret
>Priority: Minor
> Fix For: Content Distribution Journal Core 0.5.2
>
>
> When the PubQueueCache is closed, the underlying head poller (RangePoller) is 
> not closed. This issue will only manifest when the cache is closed while an 
> historical page is being fetched. This scenario is more likely when requests 
> to the journal are being throttled.



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


[jira] [Updated] (SLING-9143) RangePoller is not closed when the cache is closed

2024-06-24 Thread Timothee Maret (Jira)


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

Timothee Maret updated SLING-9143:
--
Fix Version/s: Content Distribution Journal Core 0.5.2
   (was: Content Distribution Journal Core 0.5.0)

> RangePoller is not closed when the cache is closed
> --
>
> Key: SLING-9143
> URL: https://issues.apache.org/jira/browse/SLING-9143
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.4
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>Priority: Minor
> Fix For: Content Distribution Journal Core 0.5.2
>
>
> When the PubQueueCache is closed, the underlying head poller (RangePoller) is 
> not closed. This issue will only manifest when the cache is closed while an 
> historical page is being fetched. This scenario is more likely when requests 
> to the journal are being throttled.



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


[jira] [Assigned] (SLING-9143) RangePoller is not closed when the cache is closed

2024-06-24 Thread Timothee Maret (Jira)


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

Timothee Maret reassigned SLING-9143:
-

Assignee: (was: Timothee Maret)

> RangePoller is not closed when the cache is closed
> --
>
> Key: SLING-9143
> URL: https://issues.apache.org/jira/browse/SLING-9143
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.4
>Reporter: Timothee Maret
>Priority: Minor
> Fix For: Content Distribution Journal Core 0.5.2
>
>
> When the PubQueueCache is closed, the underlying head poller (RangePoller) is 
> not closed. This issue will only manifest when the cache is closed while an 
> historical page is being fetched. This scenario is more likely when requests 
> to the journal are being throttled.



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


[jira] [Resolved] (SLING-9078) Keep skipped offsets in memory

2024-06-24 Thread Timothee Maret (Jira)


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

Timothee Maret resolved SLING-9078.
---
Resolution: Later

> Keep skipped offsets in memory
> --
>
> Key: SLING-9078
> URL: https://issues.apache.org/jira/browse/SLING-9078
> Project: Sling
>  Issue Type: Improvement
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.8
>Reporter: Timothee Maret
>Priority: Major
> Fix For: Content Distribution Journal Core 0.5.0
>
>
> In SLING-8908 we introduced a mechanism to keep track of skipped packages 
> such that in case of journal availability flip flop, the agents would still 
> progress. The implementation was done by persisting the offset in the 
> repository. In environments where many skipped packages will occur (e.g. 
> large customer with multiple agents) then those commits will start to 
> generate a non negligible load on the repository, consuming resources and 
> creating bottlenecks.
>  
> A first mitigation to this issue has been added in SLING-8965, however for 
> very large customers the mitigation will not be effective. Increasing the 
> grouping of skipped packages (e.g. 1/100 instead of 1/10) reduce the load on 
> the repository but may fail to ensure progress in case of flip/flop.
>  
> Instead of storing the skipped packages in the repository, we should keep 
> them in memory. A new service that does not reference the 
> {{JournalAvailable}} service could be added. The offsets would be 
> consolidated on demand from the stored offsets and those stored in memory. 



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


[jira] [Commented] (SLING-9078) Keep skipped offsets in memory

2024-06-24 Thread Timothee Maret (Jira)


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

Timothee Maret commented on SLING-9078:
---

This improvement is relevant if the mechanism introduced in SLING-8908 is 
active and we observe the load as being significant. I don't think it's a 
pressing issue ATM so I think we could defer.

> Keep skipped offsets in memory
> --
>
> Key: SLING-9078
> URL: https://issues.apache.org/jira/browse/SLING-9078
> Project: Sling
>  Issue Type: Improvement
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.8
>Reporter: Timothee Maret
>Priority: Major
> Fix For: Content Distribution Journal Core 0.5.0
>
>
> In SLING-8908 we introduced a mechanism to keep track of skipped packages 
> such that in case of journal availability flip flop, the agents would still 
> progress. The implementation was done by persisting the offset in the 
> repository. In environments where many skipped packages will occur (e.g. 
> large customer with multiple agents) then those commits will start to 
> generate a non negligible load on the repository, consuming resources and 
> creating bottlenecks.
>  
> A first mitigation to this issue has been added in SLING-8965, however for 
> very large customers the mitigation will not be effective. Increasing the 
> grouping of skipped packages (e.g. 1/100 instead of 1/10) reduce the load on 
> the repository but may fail to ensure progress in case of flip/flop.
>  
> Instead of storing the skipped packages in the repository, we should keep 
> them in memory. A new service that does not reference the 
> {{JournalAvailable}} service could be added. The offsets would be 
> consolidated on demand from the stored offsets and those stored in memory. 



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


[jira] [Resolved] (SLING-9065) Incorrect error handling for content distribution if binary is not present in blob store

2024-06-24 Thread Christian Schneider (Jira)


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

Christian Schneider resolved SLING-9065.

Resolution: Fixed

> Incorrect error handling for content distribution if binary is not present in 
> blob store
> 
>
> Key: SLING-9065
> URL: https://issues.apache.org/jira/browse/SLING-9065
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.6
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.4.0
>
>
> We did a content distribution and the publisher used a different blob store. 
> So the reference to the binary could not be resolved.
> We get a stack trace like below but the ui just shows the queue as running 
> with 0 retries. So it seems the error is not handled correctly.
> [https://gist.github.com/cschneider/c663fa7912b4e643c9d761aa8b70906f]



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


[jira] [Commented] (SLING-9065) Incorrect error handling for content distribution if binary is not present in blob store

2024-06-24 Thread Christian Schneider (Jira)


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

Christian Schneider commented on SLING-9065:


In the mean time we added a catch for RuntimeException which includes 
IllegalStateException. So this issue should be covered now.

> Incorrect error handling for content distribution if binary is not present in 
> blob store
> 
>
> Key: SLING-9065
> URL: https://issues.apache.org/jira/browse/SLING-9065
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.6
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.4.0
>
>
> We did a content distribution and the publisher used a different blob store. 
> So the reference to the binary could not be resolved.
> We get a stack trace like below but the ui just shows the queue as running 
> with 0 retries. So it seems the error is not handled correctly.
> [https://gist.github.com/cschneider/c663fa7912b4e643c9d761aa8b70906f]



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


[jira] [Updated] (SLING-12175) Remove PubQueueProvider cacheCallBack

2024-06-24 Thread Christian Schneider (Jira)


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

Christian Schneider updated SLING-12175:

Fix Version/s: Content Distribution Journal Core 0.5.0
   (was: Content Distribution Journal Core 0.4.0)

> Remove PubQueueProvider cacheCallBack
> -
>
> Key: SLING-12175
> URL: https://issues.apache.org/jira/browse/SLING-12175
> Project: Sling
>  Issue Type: Improvement
>  Components: Content Distribution
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.5.0
>
>
> At some point I introduced the CacheCallBack as we thought about splitting 
> the journal bundle. This change introduced a lot of indirection which 
> complicated the code but provided no gains.
> So I would like to remove this separation again.



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


[jira] [Updated] (SLING-11772) Add EventHandler dependency to the DistributionEventNotifier component

2024-06-24 Thread Christian Schneider (Jira)


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

Christian Schneider updated SLING-11772:

Fix Version/s: Content Distribution Journal Core 0.5.0
   (was: Content Distribution Journal Core 0.4.0)

> Add EventHandler dependency to the DistributionEventNotifier component
> --
>
> Key: SLING-11772
> URL: https://issues.apache.org/jira/browse/SLING-11772
> Project: Sling
>  Issue Type: Improvement
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.26
>Reporter: José Correia
>Priority: Major
> Fix For: Content Distribution Journal Core 0.5.0
>
>
> We should add an _EventHandler_ dependency to the _DistributionEventNotifier_ 
> in order to make sure that the OSGI components responsible for processing the 
> event are activated before the event emitter is up and sending events.
>  
> This way we avoid loosing created events.



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


[jira] [Updated] (SLING-9078) Keep skipped offsets in memory

2024-06-24 Thread Christian Schneider (Jira)


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

Christian Schneider updated SLING-9078:
---
Fix Version/s: Content Distribution Journal Core 0.5.0
   (was: Content Distribution Journal Core 0.4.0)

> Keep skipped offsets in memory
> --
>
> Key: SLING-9078
> URL: https://issues.apache.org/jira/browse/SLING-9078
> Project: Sling
>  Issue Type: Improvement
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.8
>Reporter: Timothee Maret
>Priority: Major
> Fix For: Content Distribution Journal Core 0.5.0
>
>
> In SLING-8908 we introduced a mechanism to keep track of skipped packages 
> such that in case of journal availability flip flop, the agents would still 
> progress. The implementation was done by persisting the offset in the 
> repository. In environments where many skipped packages will occur (e.g. 
> large customer with multiple agents) then those commits will start to 
> generate a non negligible load on the repository, consuming resources and 
> creating bottlenecks.
>  
> A first mitigation to this issue has been added in SLING-8965, however for 
> very large customers the mitigation will not be effective. Increasing the 
> grouping of skipped packages (e.g. 1/100 instead of 1/10) reduce the load on 
> the repository but may fail to ensure progress in case of flip/flop.
>  
> Instead of storing the skipped packages in the repository, we should keep 
> them in memory. A new service that does not reference the 
> {{JournalAvailable}} service could be added. The offsets would be 
> consolidated on demand from the stored offsets and those stored in memory. 



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


[jira] [Updated] (SLING-9143) RangePoller is not closed when the cache is closed

2024-06-24 Thread Christian Schneider (Jira)


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

Christian Schneider updated SLING-9143:
---
Fix Version/s: Content Distribution Journal Core 0.5.0
   (was: Content Distribution Journal Core 0.4.0)

> RangePoller is not closed when the cache is closed
> --
>
> Key: SLING-9143
> URL: https://issues.apache.org/jira/browse/SLING-9143
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.4
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>Priority: Minor
> Fix For: Content Distribution Journal Core 0.5.0
>
>
> When the PubQueueCache is closed, the underlying head poller (RangePoller) is 
> not closed. This issue will only manifest when the cache is closed while an 
> historical page is being fetched. This scenario is more likely when requests 
> to the journal are being throttled.



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


[jira] [Updated] (SLING-10614) Document package limits

2024-06-24 Thread Christian Schneider (Jira)


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

Christian Schneider updated SLING-10614:

Fix Version/s: Content Distribution Journal Core 0.5.0
   (was: Content Distribution Journal Core 0.4.0)

> Document package limits
> ---
>
> Key: SLING-10614
> URL: https://issues.apache.org/jira/browse/SLING-10614
> Project: Sling
>  Issue Type: Task
>  Components: Content Distribution
>Reporter: Timothee Maret
>Priority: Major
> Fix For: Content Distribution Journal Core 0.5.0
>
>
> With SLING-10528 we started rejecting packages bigger than 5MB. We should 
> document this limitation and provide strategies to avoid the limit. 
> The strategy is to use multi paths distribution requests instead of deep 
> distributing a single path. Limit to max 100 hierarchical node paths per 
> distribution request.



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


[jira] [Updated] (SLING-12294) Remove buffer on subscriber side

2024-06-24 Thread Christian Schneider (Jira)


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

Christian Schneider updated SLING-12294:

Fix Version/s: Content Distribution Journal Core 0.5.0
   (was: Content Distribution Journal Core 0.4.0)

> Remove buffer on subscriber side
> 
>
> Key: SLING-12294
> URL: https://issues.apache.org/jira/browse/SLING-12294
> Project: Sling
>  Issue Type: Improvement
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.5.0
>
>
> As we now do batching on messaging side I think, there is no need for the 
> items buffer anymore. By removing it we can remove quite some complexity.



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


[jira] [Commented] (SLING-9143) RangePoller is not closed when the cache is closed

2024-06-24 Thread Christian Schneider (Jira)


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

Christian Schneider commented on SLING-9143:


Never mind .. I think you are on PTO.

> RangePoller is not closed when the cache is closed
> --
>
> Key: SLING-9143
> URL: https://issues.apache.org/jira/browse/SLING-9143
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.4
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>Priority: Minor
> Fix For: Content Distribution Journal Core 0.4.0
>
>
> When the PubQueueCache is closed, the underlying head poller (RangePoller) is 
> not closed. This issue will only manifest when the cache is closed while an 
> historical page is being fetched. This scenario is more likely when requests 
> to the journal are being throttled.



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


[jira] [Commented] (SLING-9078) Keep skipped offsets in memory

2024-06-24 Thread Christian Schneider (Jira)


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

Christian Schneider commented on SLING-9078:


We do not flip the whole distribution system anymore when journal is not 
available. Do we still need this?

 

> Keep skipped offsets in memory
> --
>
> Key: SLING-9078
> URL: https://issues.apache.org/jira/browse/SLING-9078
> Project: Sling
>  Issue Type: Improvement
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.8
>Reporter: Timothee Maret
>Priority: Major
> Fix For: Content Distribution Journal Core 0.4.0
>
>
> In SLING-8908 we introduced a mechanism to keep track of skipped packages 
> such that in case of journal availability flip flop, the agents would still 
> progress. The implementation was done by persisting the offset in the 
> repository. In environments where many skipped packages will occur (e.g. 
> large customer with multiple agents) then those commits will start to 
> generate a non negligible load on the repository, consuming resources and 
> creating bottlenecks.
>  
> A first mitigation to this issue has been added in SLING-8965, however for 
> very large customers the mitigation will not be effective. Increasing the 
> grouping of skipped packages (e.g. 1/100 instead of 1/10) reduce the load on 
> the repository but may fail to ensure progress in case of flip/flop.
>  
> Instead of storing the skipped packages in the repository, we should keep 
> them in memory. A new service that does not reference the 
> {{JournalAvailable}} service could be added. The offsets would be 
> consolidated on demand from the stored offsets and those stored in memory. 



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


[jira] [Commented] (SLING-9143) RangePoller is not closed when the cache is closed

2024-06-24 Thread Christian Schneider (Jira)


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

Christian Schneider commented on SLING-9143:


I am preparing a new release. Do yo plan to work on this in the next days?

> RangePoller is not closed when the cache is closed
> --
>
> Key: SLING-9143
> URL: https://issues.apache.org/jira/browse/SLING-9143
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.4
>Reporter: Timothee Maret
>Assignee: Timothee Maret
>Priority: Minor
> Fix For: Content Distribution Journal Core 0.4.0
>
>
> When the PubQueueCache is closed, the underlying head poller (RangePoller) is 
> not closed. This issue will only manifest when the cache is closed while an 
> historical page is being fetched. This scenario is more likely when requests 
> to the journal are being throttled.



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


[jira] [Commented] (SLING-11772) Add EventHandler dependency to the DistributionEventNotifier component

2024-06-24 Thread Christian Schneider (Jira)


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

Christian Schneider commented on SLING-11772:
-

I don't think this is possible in OSGi in general.

> Add EventHandler dependency to the DistributionEventNotifier component
> --
>
> Key: SLING-11772
> URL: https://issues.apache.org/jira/browse/SLING-11772
> Project: Sling
>  Issue Type: Improvement
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.26
>Reporter: José Correia
>Priority: Major
> Fix For: Content Distribution Journal Core 0.4.0
>
>
> We should add an _EventHandler_ dependency to the _DistributionEventNotifier_ 
> in order to make sure that the OSGI components responsible for processing the 
> event are activated before the event emitter is up and sending events.
>  
> This way we avoid loosing created events.



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


[jira] [Resolved] (SLING-12327) Use async to send package distributed event

2024-06-24 Thread Christian Schneider (Jira)


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

Christian Schneider resolved SLING-12327.
-
Resolution: Fixed

> Use async to send package distributed event
> ---
>
> Key: SLING-12327
> URL: https://issues.apache.org/jira/browse/SLING-12327
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.4.0
>
>
> We had an issue where a customer implemented an event handler for 
> org/apache/sling/distribution/agent/package/distributed
> The event handler did not return in some cases and caused the whole update on 
> queues to stop working.
> We should use postEvent to make sure we do not get blocked by customer event 
> handlers.



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


[jira] [Resolved] (SLING-12345) Log import duration of each package

2024-06-24 Thread Christian Schneider (Jira)


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

Christian Schneider resolved SLING-12345.
-
Resolution: Fixed

> Log import duration of each package
> ---
>
> Key: SLING-12345
> URL: https://issues.apache.org/jira/browse/SLING-12345
> Project: Sling
>  Issue Type: Improvement
>  Components: Content Distribution
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.4.0
>
>
> We have a metric for import duration already but there it is not easy to 
> connect the slow import to a specific package id.
> So we should also log the duration to get the connection explicitly.



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


[jira] [Resolved] (SLING-12328) Metric for number of seconds current package import is running

2024-06-24 Thread Christian Schneider (Jira)


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

Christian Schneider resolved SLING-12328.
-
Resolution: Fixed

> Metric for number of seconds current package import is running
> --
>
> Key: SLING-12328
> URL: https://issues.apache.org/jira/browse/SLING-12328
> Project: Sling
>  Issue Type: Improvement
>  Components: Content Distribution
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.4.0
>
>
> In some cases the call to apply a content package can take very long or even 
> not return at all. 
> We should expose a metric that shows the seconds the current package import 
> took already.
> This allows detect from the outside when a package import is stuck.



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


[jira] [Resolved] (SLING-12357) Log details if applying a package takes too long

2024-06-24 Thread Christian Schneider (Jira)


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

Christian Schneider resolved SLING-12357.
-
Resolution: Fixed

> Log details if applying a package takes too long
> 
>
> Key: SLING-12357
> URL: https://issues.apache.org/jira/browse/SLING-12357
> Project: Sling
>  Issue Type: Improvement
>  Components: Content Distribution
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.4.0
>
>
> In recent change we introduced a metric that shows when a package import is 
> stuck.
> This allows to see there is a problem. It is also important though to 
> understand which package has the problem. So we should log when importing a 
> package takes too long.
>  



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