[jira] [Commented] (SLING-8800) A change in a Content Package will not be reflected in a Converted CP on a rebuild

2019-11-26 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer commented on SLING-8800:
-

I merged my PR as this was pending after a month and I discovered another issue 
where when two modules in a project have the same artifact id like ui.apps (but 
different group ids) then the deflated folder would contain both code as the 
folders are not deleted.
I fixed that by adding the package id as a prefix to the file name - hopefully 
this makes the folder unique. Anyhow the deletion of the folder would prevent 
the code duplication.

> A change in a Content Package will not be reflected in a Converted CP on a 
> rebuild
> --
>
> Key: SLING-8800
> URL: https://issues.apache.org/jira/browse/SLING-8800
> Project: Sling
>  Issue Type: Bug
>  Components: Feature Model
>Reporter: Andreas Schaefer
>Assignee: Simone Tripodi
>Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.0.0
>
> Attachments: secondary-test.zip
>
>
> After a successful content package conversion any change in a content package 
> will not be reflected in a converted content package.
> The reason is that the temporary generated file inside a temporary folder 
> created in the VaultPackageAssembler is not deleted.
> The CP Converter should at least provide a flag to force the deletion but 
> maybe it is best to use a hash to see if the content has changed and if 
> should delete the temporary folder.



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


[jira] [Resolved] (SLING-8800) A change in a Content Package will not be reflected in a Converted CP on a rebuild

2019-11-26 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer resolved SLING-8800.
-
Resolution: Fixed

Merged

> A change in a Content Package will not be reflected in a Converted CP on a 
> rebuild
> --
>
> Key: SLING-8800
> URL: https://issues.apache.org/jira/browse/SLING-8800
> Project: Sling
>  Issue Type: Bug
>  Components: Feature Model
>Reporter: Andreas Schaefer
>Assignee: Andreas Schaefer
>Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.0.0
>
> Attachments: secondary-test.zip
>
>
> After a successful content package conversion any change in a content package 
> will not be reflected in a converted content package.
> The reason is that the temporary generated file inside a temporary folder 
> created in the VaultPackageAssembler is not deleted.
> The CP Converter should at least provide a flag to force the deletion but 
> maybe it is best to use a hash to see if the content has changed and if 
> should delete the temporary folder.



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


[jira] [Assigned] (SLING-8800) A change in a Content Package will not be reflected in a Converted CP on a rebuild

2019-11-26 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer reassigned SLING-8800:
---

Assignee: Andreas Schaefer  (was: Simone Tripodi)

> A change in a Content Package will not be reflected in a Converted CP on a 
> rebuild
> --
>
> Key: SLING-8800
> URL: https://issues.apache.org/jira/browse/SLING-8800
> Project: Sling
>  Issue Type: Bug
>  Components: Feature Model
>Reporter: Andreas Schaefer
>Assignee: Andreas Schaefer
>Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.0.0
>
> Attachments: secondary-test.zip
>
>
> After a successful content package conversion any change in a content package 
> will not be reflected in a converted content package.
> The reason is that the temporary generated file inside a temporary folder 
> created in the VaultPackageAssembler is not deleted.
> The CP Converter should at least provide a flag to force the deletion but 
> maybe it is best to use a hash to see if the content has changed and if 
> should delete the temporary folder.



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


[GitHub] [sling-org-apache-sling-feature-cpconverter] schaefa merged pull request #20: Fixed the issue with reusing an existing deflated folder keeping remo…

2019-11-26 Thread GitBox
schaefa merged pull request #20: Fixed the issue with reusing an existing 
deflated folder keeping remo…
URL: 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/20
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Resolved] (SLING-8396) Sling Content Package to Feature Model fails with embedded Bundles

2019-11-26 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer resolved SLING-8396.
-
Resolution: Fixed

As of now this issue seems to be resolved.

> Sling Content Package to Feature Model fails with embedded Bundles
> --
>
> Key: SLING-8396
> URL: https://issues.apache.org/jira/browse/SLING-8396
> Project: Sling
>  Issue Type: Bug
>  Components: Content-Package to Feature Model Converter
>Affects Versions: Content-Package to Feature Model Converter 1.0.0
> Environment: Apache Sling 11, Mac OS X 10.13.6, Java 8
>Reporter: Andreas Schaefer
>Assignee: Simone Tripodi
>Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.0.0
>
>
> When a content package contains an embedded bundle the bundle will not be 
> listed inside the generated FM json file if content package requires more 
> than one bundle.
> I have an ui.apps content package that has a bundle which is not provided and 
> one embedded bundle (core). The not provided bundle is listed in the json 
> file but the core is missing.
> If I have a content package with just the embedded bundle it is listed there.
> Failing json file:
> {code:json}
> {
>   "id":"com.peregrine-cms:base.ui.apps:slingosgifeature:1.0-SNAPSHOT",
>   "description":"JCR Package for the Peregrine CMS Platform including\n       
>  the Platform Core bundle.",
>   "bundles":[
>     {
>       "id":"org.apache.sling:org.apache.sling.servlet-helpers:1.1.8",
>       "start-order":"20"
>     }
>   ],
> {code}
>  
> Working json file:
> {code:json}
> {
>   "id":"com.peregrine-cms:felib.ui.apps:slingosgifeature:1.0-SNAPSHOT",
>   "description":"JCR Package for the Peregrine CMS Felib module.",
>   "bundles":[
>     {
>       "id":"com.peregrine-cms:felib.core:1.0-SNAPSHOT",
>       "start-order":"20"
>     }
>   ],
> {code}



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


[jira] [Commented] (SLING-8396) Sling Content Package to Feature Model fails with embedded Bundles

2019-11-26 Thread Andreas Schaefer (Jira)


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

Andreas Schaefer commented on SLING-8396:
-

Turns out that the servlethelpers dependency is inlined into the maven module. 
In Peregrine commons-lang was retired and commons-lang3 seems to work just fine.

> Sling Content Package to Feature Model fails with embedded Bundles
> --
>
> Key: SLING-8396
> URL: https://issues.apache.org/jira/browse/SLING-8396
> Project: Sling
>  Issue Type: Bug
>  Components: Content-Package to Feature Model Converter
>Affects Versions: Content-Package to Feature Model Converter 1.0.0
> Environment: Apache Sling 11, Mac OS X 10.13.6, Java 8
>Reporter: Andreas Schaefer
>Assignee: Simone Tripodi
>Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.0.0
>
>
> When a content package contains an embedded bundle the bundle will not be 
> listed inside the generated FM json file if content package requires more 
> than one bundle.
> I have an ui.apps content package that has a bundle which is not provided and 
> one embedded bundle (core). The not provided bundle is listed in the json 
> file but the core is missing.
> If I have a content package with just the embedded bundle it is listed there.
> Failing json file:
> {code:json}
> {
>   "id":"com.peregrine-cms:base.ui.apps:slingosgifeature:1.0-SNAPSHOT",
>   "description":"JCR Package for the Peregrine CMS Platform including\n       
>  the Platform Core bundle.",
>   "bundles":[
>     {
>       "id":"org.apache.sling:org.apache.sling.servlet-helpers:1.1.8",
>       "start-order":"20"
>     }
>   ],
> {code}
>  
> Working json file:
> {code:json}
> {
>   "id":"com.peregrine-cms:felib.ui.apps:slingosgifeature:1.0-SNAPSHOT",
>   "description":"JCR Package for the Peregrine CMS Felib module.",
>   "bundles":[
>     {
>       "id":"com.peregrine-cms:felib.core:1.0-SNAPSHOT",
>       "start-order":"20"
>     }
>   ],
> {code}



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


[jira] [Created] (SLING-8863) Only trigger circuit breaker once

2019-11-26 Thread Christian Schneider (Jira)
Christian Schneider created SLING-8863:
--

 Summary: Only trigger circuit breaker once
 Key: SLING-8863
 URL: https://issues.apache.org/jira/browse/SLING-8863
 Project: Sling
  Issue Type: Improvement
  Components: Content Distribution
Affects Versions: Content Distribution Journal Core 0.1.4
Reporter: Christian Schneider
Assignee: Christian Schneider
 Fix For: Content Distribution Journal Core 0.1.6


Currently we reset the number of errors and trigger the JournalAvailability 
checks for each error event we receive. 

I think it makes sense to only trigger once when we reach the minimal number of 
errors to trigger.  We should also only reset the number of errors once the 
circuit is closed again.



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


[jira] [Resolved] (SLING-8751) Allow to extract arbitrary content packages from the package topic

2019-11-26 Thread Christian Schneider (Jira)


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

Christian Schneider resolved SLING-8751.

Resolution: Fixed

> Allow to extract arbitrary content packages from the package topic
> --
>
> Key: SLING-8751
> URL: https://issues.apache.org/jira/browse/SLING-8751
> Project: Sling
>  Issue Type: Improvement
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.4
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.6
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> To debug some issues it would be very helpful to extract the content package 
> from a package message. 
> As messages are retained for several days we have a nice history present to 
> be used for analysing issues.
> The implementation should offer the service as a web console plugin. The main 
> url of the plugin shows a form to enter the offset of a package. The form 
> will issue a GET request with the offset as parameter. The request will also 
> be handled by the plugin and will return the binary of the package or 404 if 
> none was found.



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


[jira] [Resolved] (SLING-8859) PubQueueCache keeps sending seeding messages when journal is not available

2019-11-26 Thread Christian Schneider (Jira)


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

Christian Schneider resolved SLING-8859.

Resolution: Fixed

> PubQueueCache keeps sending seeding messages when journal is not available
> --
>
> Key: SLING-8859
> URL: https://issues.apache.org/jira/browse/SLING-8859
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.4
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.6
>
>
> When an instance comes up and there is a permanent authentication failure we 
> see the situation that JournalAvailableChecker reports the journal as 
> unavailable but the PubQueueCache continues to send seeding messages.
> The JournalAvailableChecker unregisters the JournalAvailable service. This 
> should cause the PubQueueCacheService to deactivate and stop sending seeding 
> messages.



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


[jira] [Resolved] (SLING-8861) Introduce separate delay in seeding in case of errors

2019-11-26 Thread Christian Schneider (Jira)


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

Christian Schneider resolved SLING-8861.

Resolution: Fixed

> Introduce separate delay in seeding in case of errors
> -
>
> Key: SLING-8861
> URL: https://issues.apache.org/jira/browse/SLING-8861
> Project: Sling
>  Issue Type: Improvement
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.4
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.6
>
>
> We currently retry to send a seeding message every second. 
> In case of a persistent error (like auth error) this causes significant noise 
> in the logs. So I propose we use a longer delay like 10s in the error case.
> Normally this should make no big difference as the JournalAvailable should 
> pull down the seeding but we had cases where this did not work.



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


[jira] [Resolved] (SLING-8862) Extract JournalAvailableServiceMarker

2019-11-26 Thread Christian Schneider (Jira)


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

Christian Schneider resolved SLING-8862.

Resolution: Fixed

> Extract JournalAvailableServiceMarker
> -
>
> Key: SLING-8862
> URL: https://issues.apache.org/jira/browse/SLING-8862
> Project: Sling
>  Issue Type: Improvement
>  Components: Content Distribution
>Affects Versions: Content Distribution Journal Core 0.1.4
>Reporter: Christian Schneider
>Assignee: Christian Schneider
>Priority: Major
> Fix For: Content Distribution Journal Core 0.1.6
>
>
> We need to sync access to the ServiceRegistration of the JournalAvailable 
> service.
> To nicely encapsulate this it makes sense to move the logic regarding the 
> management of the marker service into its own class.



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


[jira] [Created] (SLING-8862) Extract JournalAvailableServiceMarker

2019-11-26 Thread Christian Schneider (Jira)
Christian Schneider created SLING-8862:
--

 Summary: Extract JournalAvailableServiceMarker
 Key: SLING-8862
 URL: https://issues.apache.org/jira/browse/SLING-8862
 Project: Sling
  Issue Type: Improvement
  Components: Content Distribution
Affects Versions: Content Distribution Journal Core 0.1.4
Reporter: Christian Schneider
Assignee: Christian Schneider
 Fix For: Content Distribution Journal Core 0.1.6


We need to sync access to the ServiceRegistration of the JournalAvailable 
service.

To nicely encapsulate this it makes sense to move the logic regarding the 
management of the marker service into its own class.



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


[jira] [Created] (SLING-8861) Introduce separate delay in seeding in case of errors

2019-11-26 Thread Christian Schneider (Jira)
Christian Schneider created SLING-8861:
--

 Summary: Introduce separate delay in seeding in case of errors
 Key: SLING-8861
 URL: https://issues.apache.org/jira/browse/SLING-8861
 Project: Sling
  Issue Type: Improvement
  Components: Content Distribution
Affects Versions: Content Distribution Journal Core 0.1.4
Reporter: Christian Schneider
Assignee: Christian Schneider
 Fix For: Content Distribution Journal Core 0.1.6


We currently retry to send a seeding message every second. 

In case of a persistent error (like auth error) this causes significant noise 
in the logs. So I propose we use a longer delay like 10s in the error case.

Normally this should make no big difference as the JournalAvailable should pull 
down the seeding but we had cases where this did not work.



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


[jira] [Created] (SLING-8860) Issue a warning when data-sly-test is passed a constant value for evaluation

2019-11-26 Thread Radu Cotescu (Jira)
Radu Cotescu created SLING-8860:
---

 Summary: Issue a warning when data-sly-test is passed a constant 
value for evaluation
 Key: SLING-8860
 URL: https://issues.apache.org/jira/browse/SLING-8860
 Project: Sling
  Issue Type: Improvement
  Components: Scripting
Reporter: Radu Cotescu
Assignee: Radu Cotescu
 Fix For: HTL Compiler 1.2.2-1.4.0, HTL Maven Plugin 1.3.2-1.4.0


The {{data-sly-test}} plugin should issue a warning every time it's passed a 
constant value (including an empty expression which translated into a 
{{NullLiteral}}) or a concatenation operation for evaluation - the former is 
redundant, whereas the latter doesn't make sense and could potentially be a 
typo:
{code:html}

if true 
if true 
if true 
if true 
if true 
{code}



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


[GitHub] [sling-org-apache-sling-distribution-core] tmaret closed pull request #12: SLING-7754: implementation of Resource Based Queues

2019-11-26 Thread GitBox
tmaret closed pull request #12: SLING-7754: implementation of Resource Based 
Queues
URL: https://github.com/apache/sling-org-apache-sling-distribution-core/pull/12
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [sling-org-apache-sling-distribution-core] tmaret commented on issue #12: SLING-7754: implementation of Resource Based Queues

2019-11-26 Thread GitBox
tmaret commented on issue #12: SLING-7754: implementation of Resource Based 
Queues
URL: 
https://github.com/apache/sling-org-apache-sling-distribution-core/pull/12#issuecomment-558624704
 
 
   Closing this PR since an resource based queues have been added in `
   `6a3670c1cfe1779aff3f9fe9e1b4df04b4e112cd`


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


With regards,
Apache Git Services


[jira] [Commented] (SLING-8854) In-file and In-memory queue-providers for Forward Distribution report incorrect value for processing "Attempts"

2019-11-26 Thread Ashish Chopra (Jira)


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

Ashish Chopra commented on SLING-8854:
--

_(in continuation with discussion summarized here)_:
 hi [~marett], as you had asked for off-JIRA, here are the PRs for all three 
approaches possible here:
 * @ashishc's approach #1 (described here): add a {{.recordProcessingAttempt}} 
method to {{DistributionQueue}} SPI that {{DistributionQueueProcessor}} impls 
are expected to invoke once they dequeue the queue-head with the intent of 
processing it
 ** [https://github.com/apache/sling-org-apache-sling-distribution-core/pull/22]
 * @ashishc's approach #2 (described here): add a {{.peek}} method to 
{{DistributionQueue}} SPI. {{DistributionQueue}} impls are not expected to 
consider this method's invocation as a processing attempt of the queue-head - 
this method is expected to be invoked by functions which need to introspect the 
Queue (Health Checks, MBeans, UI, etc.)
 ** [https://github.com/apache/sling-org-apache-sling-distribution-core/pull/25]
 * @marett's approach (described here): impls of {{DistributionQueueProvider}}, 
{{DistributionQueue}} and {{DistributionQueueProcessors}} are expected to 
manage the state by sharing implementation details amongst them.
 ** [https://github.com/apache/sling-org-apache-sling-distribution-core/pull/26]

> In-file and In-memory queue-providers for Forward Distribution report 
> incorrect value for processing "Attempts"
> ---
>
> Key: SLING-8854
> URL: https://issues.apache.org/jira/browse/SLING-8854
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Core 0.4.0
>Reporter: Ashish Chopra
>Assignee: Timothee Maret
>Priority: Major
> Attachments: 
> 0001-SLING-8854-In-file-and-In-memory-queue-providers-for.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> {{ForwardDistributionAgentFactory}} allows specifying "In-Memory" and 
> "In-File" queue-providers [0]. Both these implementations are provided by 
> {{SimpleDistributionQueue}} [1].
> While responding to a queue-processing request, the head of the queue is 
> fetched to create a {{DistributionQueueEntry}}, which encapsulates a 
> {{DistributionQueueItemStatus}}. While retrieving the queue-head-entry, the 
> number-of-attempts are also incremented by 1, implying _one more_ 
> processing-attempt to have happened on a given queue-item. [2]
> The trouble arises from the fact that {{SimpleDistributionQueue#getHead}} 
> ends up being called from at least three other places:
> # Queue status Health Check [3], which is a periodic job
> # UI (via {{ExtendedDistributionServiceResourceProvider}}) [4]
> # Distribution Queue status MBean [5]
> Out of these, #1 is most troublesome - because of its periodic nature, the 
> number of Attempts for a queue-item that's being processed (or, is blocked) 
> will keep on increasing without corresponding dequeue-attempts.
> Due to #2, everytime the queue status is delivered to the UI, the attempt 
> would again increase. Similar would be the case of MBean invocations.
> This needs to be addressed. Notably, "Sling Jobs" based queue doesn't suffer 
> from this issue because it relies on retry-counts as maintained by Sling Job 
> Execution Engine.
> [0] 
> https://github.com/apache/sling-org-apache-sling-distribution-core/blob/deb3d2ae33c4f4678c8503091a9fffdbb141e569/src/main/java/org/apache/sling/distribution/agent/impl/ForwardDistributionAgentFactory.java#L258-L262
> [1] 
> https://github.com/apache/sling-org-apache-sling-distribution-core/blob/deb3d2ae33c4f4678c8503091a9fffdbb141e569/src/main/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueue.java
> [2] 
> https://github.com/apache/sling-org-apache-sling-distribution-core/blob/deb3d2ae33c4f4678c8503091a9fffdbb141e569/src/main/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueue.java#L110-L112
> [3] 
> https://github.com/apache/sling-org-apache-sling-distribution-core/blob/deb3d2ae33c4f4678c8503091a9fffdbb141e569/src/main/java/org/apache/sling/distribution/monitor/DistributionQueueHealthCheck.java#L113
> [4] 
> https://github.com/apache/sling-org-apache-sling-distribution-core/blob/deb3d2ae33c4f4678c8503091a9fffdbb141e569/src/main/java/org/apache/sling/distribution/resources/impl/ExtendedDistributionServiceResourceProvider.java#L158
> [5] 
> https://github.com/apache/sling-org-apache-sling-distribution-core/blob/deb3d2ae33c4f4678c8503091a9fffdbb141e569/src/main/java/org/apache/sling/distribution/monitor/impl/DistributionQueueMBeanImpl.java#L62-L91



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


[jira] [Comment Edited] (SLING-8854) In-file and In-memory queue-providers for Forward Distribution report incorrect value for processing "Attempts"

2019-11-26 Thread Ashish Chopra (Jira)


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

Ashish Chopra edited comment on SLING-8854 at 11/26/19 11:41 AM:
-

_(in continuation with discussion summarized 
[here|https://issues.apache.org/jira/browse/SLING-8854?focusedCommentId=16982155=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16982155])_:
 hi [~marett], as you had asked for off-JIRA, here are the PRs for all three 
approaches possible here:
 * @ashishc's approach #1 (described 
[here|https://issues.apache.org/jira/browse/SLING-8854?focusedCommentId=16981545=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16981545]):
 add a {{.recordProcessingAttempt}} method to {{DistributionQueue}} SPI that 
{{DistributionQueueProcessor}} impls are expected to invoke once they dequeue 
the queue-head with the intent of processing it
 ** [https://github.com/apache/sling-org-apache-sling-distribution-core/pull/22]
 * @ashishc's approach #2 (described 
[here|https://issues.apache.org/jira/browse/SLING-8854?focusedCommentId=16981545=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16981545]):
 add a {{.peek}} method to {{DistributionQueue}} SPI. {{DistributionQueue}} 
impls are not expected to consider this method's invocation as a processing 
attempt of the queue-head - this method is expected to be invoked by functions 
which need to introspect the Queue (Health Checks, MBeans, UI, etc.)
 ** [https://github.com/apache/sling-org-apache-sling-distribution-core/pull/25]
 * @marett's approach (described 
[here|https://issues.apache.org/jira/browse/SLING-8854?focusedCommentId=16980314=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16980314]):
 impls of {{DistributionQueueProvider}}, {{DistributionQueue}} and 
{{DistributionQueueProcessors}} are expected to manage the state by sharing 
implementation details amongst them.
 ** [https://github.com/apache/sling-org-apache-sling-distribution-core/pull/26]


was (Author: ashishc):
_(in continuation with discussion summarized here)_:
 hi [~marett], as you had asked for off-JIRA, here are the PRs for all three 
approaches possible here:
 * @ashishc's approach #1 (described here): add a {{.recordProcessingAttempt}} 
method to {{DistributionQueue}} SPI that {{DistributionQueueProcessor}} impls 
are expected to invoke once they dequeue the queue-head with the intent of 
processing it
 ** [https://github.com/apache/sling-org-apache-sling-distribution-core/pull/22]
 * @ashishc's approach #2 (described here): add a {{.peek}} method to 
{{DistributionQueue}} SPI. {{DistributionQueue}} impls are not expected to 
consider this method's invocation as a processing attempt of the queue-head - 
this method is expected to be invoked by functions which need to introspect the 
Queue (Health Checks, MBeans, UI, etc.)
 ** [https://github.com/apache/sling-org-apache-sling-distribution-core/pull/25]
 * @marett's approach (described here): impls of {{DistributionQueueProvider}}, 
{{DistributionQueue}} and {{DistributionQueueProcessors}} are expected to 
manage the state by sharing implementation details amongst them.
 ** [https://github.com/apache/sling-org-apache-sling-distribution-core/pull/26]

> In-file and In-memory queue-providers for Forward Distribution report 
> incorrect value for processing "Attempts"
> ---
>
> Key: SLING-8854
> URL: https://issues.apache.org/jira/browse/SLING-8854
> Project: Sling
>  Issue Type: Bug
>  Components: Content Distribution
>Affects Versions: Content Distribution Core 0.4.0
>Reporter: Ashish Chopra
>Assignee: Timothee Maret
>Priority: Major
> Attachments: 
> 0001-SLING-8854-In-file-and-In-memory-queue-providers-for.patch
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> {{ForwardDistributionAgentFactory}} allows specifying "In-Memory" and 
> "In-File" queue-providers [0]. Both these implementations are provided by 
> {{SimpleDistributionQueue}} [1].
> While responding to a queue-processing request, the head of the queue is 
> fetched to create a {{DistributionQueueEntry}}, which encapsulates a 
> {{DistributionQueueItemStatus}}. While retrieving the queue-head-entry, the 
> number-of-attempts are also incremented by 1, implying _one more_ 
> processing-attempt to have happened on a given queue-item. [2]
> The trouble arises from the fact that {{SimpleDistributionQueue#getHead}} 
> ends up being called from at least three other places:
> # Queue status Health Check [3], which is a periodic job
> # UI (via {{ExtendedDistributionServiceResourceProvider}}) [4]
> # Distribution Queue status MBean [5]
> Out of these, 

[GitHub] [sling-org-apache-sling-distribution-core] actinium15 opened a new pull request #25: SLING-8854 In-file and In-memory queue-providers for Forward …

2019-11-26 Thread GitBox
actinium15 opened a new pull request #25: SLING-8854 In-file and In-memory 
queue-providers for Forward …
URL: https://github.com/apache/sling-org-apache-sling-distribution-core/pull/25
 
 
   …Distribution report incorrect value for processing "Attempts"


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


With regards,
Apache Git Services


[jira] [Created] (SLING-8859) PubQueueCache keeps sending seeding messages when journal is not available

2019-11-26 Thread Christian Schneider (Jira)
Christian Schneider created SLING-8859:
--

 Summary: PubQueueCache keeps sending seeding messages when journal 
is not available
 Key: SLING-8859
 URL: https://issues.apache.org/jira/browse/SLING-8859
 Project: Sling
  Issue Type: Bug
  Components: Content Distribution
Affects Versions: Content Distribution Journal Core 0.1.4
Reporter: Christian Schneider
Assignee: Christian Schneider
 Fix For: Content Distribution Journal Core 0.1.6


When an instance comes up and there is a permanent authentication failure we 
see the situation that JournalAvailableChecker reports the journal as 
unavailable but the PubQueueCache continues to send seeding messages.

The JournalAvailableChecker unregisters the JournalAvailable service. This 
should cause the PubQueueCacheService to deactivate and stop sending seeding 
messages.



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


Re: Sling FM Starter Module

2019-11-26 Thread David Bosschaert
Hi Andreas,

I might have missed a detail or two in this long email thread, but I just
wanted to share, that the feature models that are part of your Maven
project (e.g. the ones in src/main/features) do get added to the maven
dependencies of the current project, so instead of generating a feature
model of the current pom.xml, you could take a fm-first approach: create
that feature model and include it in your project - the
slingfeature-maven-plugin will make the bundles that are part of your
project dependencies of your current maven project. That way you don't need
to mention the artifacts (i.e. bundles) referenced in your feature model in
your pom.xml. This might save you from generating one from the other in the
first place.

Best regards,

David

On Tue, 26 Nov 2019 at 00:41, Andreas Schaefer 
wrote:

> Hi
>
> I started to work on a Goal in the Sling Feature Maven Plugin to create
> and install plain slingosgifeature files into the local Maven repo.
>
> This is what I added to a bundle:
>
> 
> org.apache.sling
> slingfeature-maven-plugin
> ${slingfeature-maven-plugin.version}
> true
> 
> 
> analyze
> package
> 
> create-fm-descriptor
> 
> 
> 
> 
>
> This will create the an FM descriptor and place it into my local Maven
> repo.
>
> In my launcher module I used the Convert PM to FM to convert Sling and
> then add the bundle FM descriptor this way:
>
> 
> org.apache.sling
> slingfeature-maven-plugin
> ${slingfeature-maven-plugin.version}
> true
> 
> target/fm
> ${basedir}/target/fm
> 
> 
> 
> aggregate-base-feature
> generate-test-sources
> 
> aggregate-features
> 
> 
> 
> 
> example-runtime
> **/*.json
>
> org.apache.sling:org.apache.sling.serviceusermapper:LATEST
>
> *=USE_LATEST
> 
> ${project.groupId}
> wfx-api
> ${project.version}
> slingosgifeature
> 
> …
>
> Then I used the Sling Feature Maven Plugin Launcher goal to launch both
> Sling and my demo project and both came up just fine.
>
> Finally I wanted to add Peregrine CMS into my project which can be done
> with just this one:
>
> 
> com.peregrine-cms
> com.peregrine-cms.featuremodel.starter
> 1.0.0-SNAPSHOT
> example-runtime
> slingosgifeature
> 
>
> The same way would Sling be added into my project when the FM descriptor
> is available.
>
> This is what I think a project should look like:
>
> - bundle(s): creates FM descriptor and installs it when built
> - project: creates Project Wide FM Descriptor and install it (Sling,
> Peregrine CMS etc). For Peregrine CMS this would only create a FM
> descriptor for its own modules and for example would not include Sling
> - launcher: takes the projects and modules FM descriptors, aggregates
> final FM descriptor and then launches it
>
> I will go on now and apply this to Sling Modules.
>
> As the FM specification does not lay out a grouping feature like the PMs
> have for Sling 12 we have these options:
>
> - Have the Sling FM Starter maintain a list of all FM from the Sling
> Project. We might want to consider to create a 
> container that then can set group wide properties like group id, type etc
> to all its  children
> - Create Group Modules similar to the PMs that just create grouping FM
> descriptors
> - Create Group Modules inside the Sling FM Starter
>
> As soon as I have more experience with the Sling Feature Maven Plugin and
> the create-fm-descriptor goal I will commit and push.
>
> Cheers - Andy Schaefer
>
> > On Nov 19, 2019, at 5:40 PM, Andreas Schaefer 
> wrote:
> >
> > Hi Robert
> >
> > Both, we need FM descriptors for single bundles and for groups (ala PMs).
> > The reason for single bundles is to provide the ability to assemble an
> application by cherry picking bundles so that I do not have to wait for a
> group to be released.
> >
> > - Andy
> >
> >> On Nov 19, 2019, at 6:41 AM, Robert Munteanu 
> wrote:
> >>
> >> On Fri, 2019-11-15 at 11:47 -0800, Andreas Schaefer wrote:
> >>> Hi
> >>>
> >>> I started to get the pieces into place for a build up of Peregrine
> >>> CMS based on Sling 11 using FMs.
> >>>
> >>> First I updated the Sling Feature Converter Maven Plugin to install
> >>> the generated slingosgifeature into my local Maven repo and then use
> >>> these dependencies to assemble and launch Peregrine. This works fine
> >>> for most parts (content does not deploy but that is another story).
> >>>
> >>> Next step is to install FMs from Bundles into the local Maven repo
> >>> which will be used for bundles or content bundles like Sling.
> >>>
> >>> My question is: is it expected for the