[jira] [Updated] (SLING-11831) Allow setting job properties for custom job state

2023-05-08 Thread Dan Klco (Jira)


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

Dan Klco updated SLING-11831:
-
Fix Version/s: Event 4.3.12
   Event API 1.0.4
   (was: Event 4.3.10)
   (was: Event API 1.0.2)

> Allow setting job properties for custom job state
> -
>
> Key: SLING-11831
> URL: https://issues.apache.org/jira/browse/SLING-11831
> Project: Sling
>  Issue Type: Improvement
>  Components: Event
>Affects Versions: Event 4.3.8
>Reporter: Andrew Khoury
>Assignee: Dan Klco
>Priority: Major
> Fix For: Event 4.3.12, Event API 1.0.4
>
>
> The 
> [JobExecutionContext|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
>  currently allows updating Job progress info and the progress log but it 
> doesn't allow storing of custom properties.  The reason we would want to 
> support custom properties is to allow storing resume information.
> For example, let's say we have a job where we are moving multiple resources 
> around in a clustered environment with many sling instances pointing to the 
> same JCR repository (for example Oak MongoMK).  If the instance that is 
> running the move job crashes in the middle of the job execution we would want 
> some information stored so the job can be resumed on another node.
> To solve this issue, we can introduce a setProperty method to the 
> [JobExecutionContext.|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
> This method would allow us to save some state information for use in case the 
> job is resumed on another node.



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


[jira] [Updated] (SLING-11831) Allow setting job properties for custom job state

2023-05-03 Thread Dan Klco (Jira)


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

Dan Klco updated SLING-11831:
-
Fix Version/s: Event 4.3.10

> Allow setting job properties for custom job state
> -
>
> Key: SLING-11831
> URL: https://issues.apache.org/jira/browse/SLING-11831
> Project: Sling
>  Issue Type: Improvement
>  Components: Event
>Affects Versions: Event 4.3.8
>Reporter: Andrew Khoury
>Assignee: Dan Klco
>Priority: Major
> Fix For: Event 4.3.10, Event API 1.0.2
>
>
> The 
> [JobExecutionContext|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
>  currently allows updating Job progress info and the progress log but it 
> doesn't allow storing of custom properties.  The reason we would want to 
> support custom properties is to allow storing resume information.
> For example, let's say we have a job where we are moving multiple resources 
> around in a clustered environment with many sling instances pointing to the 
> same JCR repository (for example Oak MongoMK).  If the instance that is 
> running the move job crashes in the middle of the job execution we would want 
> some information stored so the job can be resumed on another node.
> To solve this issue, we can introduce a setProperty method to the 
> [JobExecutionContext.|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
> This method would allow us to save some state information for use in case the 
> job is resumed on another node.



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


[jira] [Updated] (SLING-11831) Allow setting job properties for custom job state

2023-05-03 Thread Dan Klco (Jira)


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

Dan Klco updated SLING-11831:
-
Fix Version/s: Event API 1.0.2

> Allow setting job properties for custom job state
> -
>
> Key: SLING-11831
> URL: https://issues.apache.org/jira/browse/SLING-11831
> Project: Sling
>  Issue Type: Improvement
>  Components: Event
>Affects Versions: Event 4.3.8
>Reporter: Andrew Khoury
>Assignee: Dan Klco
>Priority: Major
> Fix For: Event API 1.0.2
>
>
> The 
> [JobExecutionContext|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
>  currently allows updating Job progress info and the progress log but it 
> doesn't allow storing of custom properties.  The reason we would want to 
> support custom properties is to allow storing resume information.
> For example, let's say we have a job where we are moving multiple resources 
> around in a clustered environment with many sling instances pointing to the 
> same JCR repository (for example Oak MongoMK).  If the instance that is 
> running the move job crashes in the middle of the job execution we would want 
> some information stored so the job can be resumed on another node.
> To solve this issue, we can introduce a setProperty method to the 
> [JobExecutionContext.|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
> This method would allow us to save some state information for use in case the 
> job is resumed on another node.



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


[jira] [Updated] (SLING-11831) Allow setting job properties for custom job state

2023-04-17 Thread Andrew Khoury (Jira)


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

Andrew Khoury updated SLING-11831:
--
Priority: Major  (was: Minor)

> Allow setting job properties for custom job state
> -
>
> Key: SLING-11831
> URL: https://issues.apache.org/jira/browse/SLING-11831
> Project: Sling
>  Issue Type: Improvement
>  Components: Event
>Affects Versions: Event 4.3.8
>Reporter: Andrew Khoury
>Assignee: Konrad Windszus
>Priority: Major
>
> The 
> [JobExecutionContext|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
>  currently allows updating Job progress info and the progress log but it 
> doesn't allow storing of custom properties.  The reason we would want to 
> support custom properties is to allow storing resume information.
> For example, let's say we have a job where we are moving multiple resources 
> around in a clustered environment with many sling instances pointing to the 
> same JCR repository (for example Oak MongoMK).  If the instance that is 
> running the move job crashes in the middle of the job execution we would want 
> some information stored so the job can be resumed on another node.
> To solve this issue, we can introduce a setProperty method to the 
> [JobExecutionContext.|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
> This method would allow us to save some state information for use in case the 
> job is resumed on another node.



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


[jira] [Updated] (SLING-11831) Allow setting job properties for custom job state

2023-04-17 Thread Andrew Khoury (Jira)


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

Andrew Khoury updated SLING-11831:
--
Priority: Minor  (was: Major)

> Allow setting job properties for custom job state
> -
>
> Key: SLING-11831
> URL: https://issues.apache.org/jira/browse/SLING-11831
> Project: Sling
>  Issue Type: Improvement
>  Components: Event
>Affects Versions: Event 4.3.8
>Reporter: Andrew Khoury
>Assignee: Konrad Windszus
>Priority: Minor
>
> The 
> [JobExecutionContext|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
>  currently allows updating Job progress info and the progress log but it 
> doesn't allow storing of custom properties.  The reason we would want to 
> support custom properties is to allow storing resume information.
> For example, let's say we have a job where we are moving multiple resources 
> around in a clustered environment with many sling instances pointing to the 
> same JCR repository (for example Oak MongoMK).  If the instance that is 
> running the move job crashes in the middle of the job execution we would want 
> some information stored so the job can be resumed on another node.
> To solve this issue, we can introduce a setProperty method to the 
> [JobExecutionContext.|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
> This method would allow us to save some state information for use in case the 
> job is resumed on another node.



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


[jira] [Updated] (SLING-11831) Allow setting job properties for custom job state

2023-04-17 Thread Andrew Khoury (Jira)


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

Andrew Khoury updated SLING-11831:
--
Affects Version/s: Event 4.3.8
   (was: Event 4.2.10)

> Allow setting job properties for custom job state
> -
>
> Key: SLING-11831
> URL: https://issues.apache.org/jira/browse/SLING-11831
> Project: Sling
>  Issue Type: Improvement
>  Components: Event
>Affects Versions: Event 4.3.8
>Reporter: Andrew Khoury
>Assignee: Konrad Windszus
>Priority: Major
>
> The 
> [JobExecutionContext|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
>  currently allows updating Job progress info and the progress log but it 
> doesn't allow storing of custom properties.  The reason we would want to 
> support custom properties is to allow storing resume information.
> For example, let's say we have a job where we are moving multiple resources 
> around in a clustered environment with many sling instances pointing to the 
> same JCR repository (for example Oak MongoMK).  If the instance that is 
> running the move job crashes in the middle of the job execution we would want 
> some information stored so the job can be resumed on another node.
> To solve this issue, we can introduce a setProperty method to the 
> [JobExecutionContext.|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
> This method would allow us to save some state information for use in case the 
> job is resumed on another node.



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


[jira] [Updated] (SLING-11831) Allow setting job properties for custom job state

2023-04-17 Thread Andrew Khoury (Jira)


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

Andrew Khoury updated SLING-11831:
--
Description: 
The 
[JobExecutionContext|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
 currently allows updating Job progress info and the progress log but it 
doesn't allow storing of custom properties.  The reason we would want to 
support custom properties is to allow storing resume information.

For example, let's say we have a job where we are moving multiple resources 
around in a clustered environment with many sling instances pointing to the 
same JCR repository (for example Oak MongoMK).  If the instance that is running 
the move job crashes in the middle of the job execution we would want some 
information stored so the job can be resumed on another node.

To solve this issue, we can introduce a setProperty method to the 
[JobExecutionContext.|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]

This method would allow us to save some state information for use in case the 
job is resumed.

  was:Currently a {{JobConsumer}} returning {{JobResult.FAILED}} is usually 
retried 
(https://sling.apache.org/documentation/bundles/apache-sling-eventing-and-job-handling.html).
 Unfortunately this is not exposed in the logs, so in case a JobConsumer logs 
an error before returning {{JobResult.FAILED}} the job is silently retried 
without any particular log message. I think each failed job should lead to a 
WARN in the log (in case the job is retried) with the attempt number and 
outstanding attempts in the log message. In case a job is not retried, an ERROR 
should be emitted to the log for every failed job.


> Allow setting job properties for custom job state
> -
>
> Key: SLING-11831
> URL: https://issues.apache.org/jira/browse/SLING-11831
> Project: Sling
>  Issue Type: Improvement
>  Components: Event
>Affects Versions: Event 4.2.10
>Reporter: Andrew Khoury
>Assignee: Konrad Windszus
>Priority: Major
>
> The 
> [JobExecutionContext|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
>  currently allows updating Job progress info and the progress log but it 
> doesn't allow storing of custom properties.  The reason we would want to 
> support custom properties is to allow storing resume information.
> For example, let's say we have a job where we are moving multiple resources 
> around in a clustered environment with many sling instances pointing to the 
> same JCR repository (for example Oak MongoMK).  If the instance that is 
> running the move job crashes in the middle of the job execution we would want 
> some information stored so the job can be resumed on another node.
> To solve this issue, we can introduce a setProperty method to the 
> [JobExecutionContext.|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
> This method would allow us to save some state information for use in case the 
> job is resumed.



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


[jira] [Updated] (SLING-11831) Allow setting job properties for custom job state

2023-04-17 Thread Andrew Khoury (Jira)


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

Andrew Khoury updated SLING-11831:
--
Description: 
The 
[JobExecutionContext|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
 currently allows updating Job progress info and the progress log but it 
doesn't allow storing of custom properties.  The reason we would want to 
support custom properties is to allow storing resume information.

For example, let's say we have a job where we are moving multiple resources 
around in a clustered environment with many sling instances pointing to the 
same JCR repository (for example Oak MongoMK).  If the instance that is running 
the move job crashes in the middle of the job execution we would want some 
information stored so the job can be resumed on another node.

To solve this issue, we can introduce a setProperty method to the 
[JobExecutionContext.|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]

This method would allow us to save some state information for use in case the 
job is resumed on another node.

  was:
The 
[JobExecutionContext|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
 currently allows updating Job progress info and the progress log but it 
doesn't allow storing of custom properties.  The reason we would want to 
support custom properties is to allow storing resume information.

For example, let's say we have a job where we are moving multiple resources 
around in a clustered environment with many sling instances pointing to the 
same JCR repository (for example Oak MongoMK).  If the instance that is running 
the move job crashes in the middle of the job execution we would want some 
information stored so the job can be resumed on another node.

To solve this issue, we can introduce a setProperty method to the 
[JobExecutionContext.|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]

This method would allow us to save some state information for use in case the 
job is resumed.


> Allow setting job properties for custom job state
> -
>
> Key: SLING-11831
> URL: https://issues.apache.org/jira/browse/SLING-11831
> Project: Sling
>  Issue Type: Improvement
>  Components: Event
>Affects Versions: Event 4.2.10
>Reporter: Andrew Khoury
>Assignee: Konrad Windszus
>Priority: Major
>
> The 
> [JobExecutionContext|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
>  currently allows updating Job progress info and the progress log but it 
> doesn't allow storing of custom properties.  The reason we would want to 
> support custom properties is to allow storing resume information.
> For example, let's say we have a job where we are moving multiple resources 
> around in a clustered environment with many sling instances pointing to the 
> same JCR repository (for example Oak MongoMK).  If the instance that is 
> running the move job crashes in the middle of the job execution we would want 
> some information stored so the job can be resumed on another node.
> To solve this issue, we can introduce a setProperty method to the 
> [JobExecutionContext.|https://github.com/apache/sling-org-apache-sling-event-api/blob/d151fdf0da58ed0dbf18002788f8965b0ebcef84/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutionContext.java#L28]
> This method would allow us to save some state information for use in case the 
> job is resumed on another node.



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


[jira] [Updated] (SLING-11831) Allow setting job properties for custom job state

2023-04-17 Thread Andrew Khoury (Jira)


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

Andrew Khoury updated SLING-11831:
--
Fix Version/s: (was: Event 4.2.18)

> Allow setting job properties for custom job state
> -
>
> Key: SLING-11831
> URL: https://issues.apache.org/jira/browse/SLING-11831
> Project: Sling
>  Issue Type: Improvement
>  Components: Event
>Affects Versions: Event 4.2.10
>Reporter: Andrew Khoury
>Assignee: Konrad Windszus
>Priority: Major
>
> Currently a {{JobConsumer}} returning {{JobResult.FAILED}} is usually retried 
> (https://sling.apache.org/documentation/bundles/apache-sling-eventing-and-job-handling.html).
>  Unfortunately this is not exposed in the logs, so in case a JobConsumer logs 
> an error before returning {{JobResult.FAILED}} the job is silently retried 
> without any particular log message. I think each failed job should lead to a 
> WARN in the log (in case the job is retried) with the attempt number and 
> outstanding attempts in the log message. In case a job is not retried, an 
> ERROR should be emitted to the log for every failed job.



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