This issue has been created
There are 2 updates, 2 comments.
 
 
Job Macro / cid:jira-generated-image-avatar-8086308b-d00d-425c-8388-f5ccd2cdb6b5 JOBMACRO-20 Open

Jobs executed with the job macro don't display / store logs

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-0fbb524e-78d1-4688-ab6c-21369d5c5102 Anca Luca created this issue on 26/Jan/25 02:48
 
Summary: Jobs executed with the job macro don't display / store logs
Issue Type: cid:jira-generated-image-avatar-8086308b-d00d-425c-8388-f5ccd2cdb6b5 Bug
Affects Versions: 2.1
Assignee: Unassigned
Created: 26/Jan/25 02:48
Priority: cid:jira-generated-image-static-major-85237dbd-0dda-4569-80f4-1ced49c48202 Major
Reporter: Anca Luca
Description:

I reproduce this on XWiki version 15.10.10 and XWiki version 16.4.6.

How to reproduce:

  • make a job with the job macro, with
    {{job id='jobid' start='true'}}
    [...]
    {{/job}}
    
  • execute the job by executing the macro (displaying the page in view mode)
  • restart XWiki to clean the job status from the memory
  • display the status of the ran job with:
    {{job id='jobid' start='false' /}}
    

Expected result:

  • the logs of the job ran just before should be displayed

Actual result:

  • no job logs are displayed, the job macro does not display any result

Moreover, trying to display the job status / job with the rest jobstatus API doesn't display anything, at URL:

[domain]/xwiki/rest/jobstatus/jobid

I didn't make a test now, but I am pretty sure the jobs ran with the job macro were displaying their status when not ran (with parameter start=false).

If the status of a job not created with the job macro is displayed with the job macro, the logs are properly displayed (e.g. the logs of a refactoring job).

On disk, in the permanent directory in the jobs folder, there is a difference between the way jobs created with jobmacro are stored and the way jobs created from java are stored:

  • in the job folder, jobs created with job macro only have the status.xml.zip file
  • while other jobs also have log.index and log.xml files.
 
 

2 updates

 
cid:jira-generated-image-avatar-0fbb524e-78d1-4688-ab6c-21369d5c5102 Changes by Anca Luca on 26/Jan/25 02:48
 
Description: I reproduce this on XWiki version 15.10.10 and XWiki version 16.4.6.

How to reproduce:
* make a job with the job macro, with
{noformat}
{{job id='jobid' start='true'}}
[...]
{{/job}}
{noformat}
* execute the job by executing the macro (displaying the page in view mode)
* restart XWiki to clean the job status from the memory
* display the status of the ran job with:
{noformat}
{{job id='jobid' start='false' /}}
{noformat}

Expected result:
* the logs of the job ran just before should be displayed

Actual result:
* no job logs are displayed, the job macro does not display any result

Moreover, trying to display the job status / job with the rest jobstatus API doesn't display anything, at URL:

{noformat}
[domain]/xwiki/rest/jobstatus/jobid
{noformat}

I didn't make a test now, but I am pretty sure the jobs ran with the job macro were displaying their status when not ran (with parameter start=false).

If the status of a job not created with the job macro is displayed with the job macro, the logs are properly displayed (e.g. the logs of a refactoring job).

On disk, in the permanent directory in the jobs folder, there is a difference between the way jobs created with jobmacro are stored and the way jobs created from java are stored:

* in the job folder, jobs created with job macro only have the status.xml.zip file
* while other jobs also have log.index and log.xml files.
Labels: regression
 
 

2 comments

 
cid:jira-generated-image-avatar-0fbb524e-78d1-4688-ab6c-21369d5c5102 Anca Luca on 26/Jan/25 02:49
 

I didn't make a test now, but I am pretty sure the jobs ran with the job macro were displaying their status when not ran (with parameter start=false), so I'll mark this as a regression (even if it may be related to the version of XWiki and change of the job API).

 
cid:jira-generated-image-avatar-0fbb524e-78d1-4688-ab6c-21369d5c5102 Anca Luca on 26/Jan/25 02:49
 
I didn't make a test now, but I am pretty sure the jobs ran with the job macro were displaying their status when not ran (with parameter start=false) properly , so I'll mark this as a regression (even if it may be related to the version of XWiki and change of the job API).