Skip to content

Scan job might not work all the time after an app upgrade #44

Description

@oanalavinia

Describe the bug
The antivirus scan is done by a java job. This job is affected by a XWiki issue https://jira.xwiki.org/browse/XWIKI-14494 , which means that after the antivirus app upgrade the scan job will not work anymore until a manual unschedule / schedule is done. So, as part of #32 an automatic unschedule / schedule was added.
Now, on another app that uses the same 'trick', a bug was reported as this isn't actually working all the time xwikisas/application-licensing#177
Even if we haven't received reports that this has happened on antivirus as well, most probably users haven't checked the job status. It's hard to reproduce on our side since it's not happening all the time.

Steps to reproduce

  1. Have antivirus app
  2. Check Antivirus Job scheduler job status, since this should be scheduled
  3. Trigger job and check that it is executed correctly
  4. Upgrade antivirus app
  5. Check again the job status
  6. Trigger job and check that it is executed correctly

Expected behavior
Job is scheduled after upgrade and triggering it works as expected

Actual behavior
Just sometimes, after an upgrade, the job remains in a broken state. This might means that it is not marked as scheduled, or even if it is scheduled, triggering it will throw errors

Additional context
Please apply the same suggestions as on xwikisas/application-licensing#177 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions