Skip to content

Fatal flaw in Arisa's "catching up" logic #753

@violine1101

Description

@violine1101

The Bug

Arisa has a feature where it "catches up" on all recent things that happened on Mojira after a downtime. However I believe the way some modules are written, they have the incorrect assumption that all changes in the ticket happened after lastRun.

Now, Arisa goes through the tickets by "updated" value. This means that it'll only look at the tickets that were last updated during the last run. Some modules assume that all changes before the last run have already been checked. For example, CommandModule has a check so that it only checks commands that have been updated after the last run.

It appears not all modules are affected by this though; however I did encounter this while testing a new module that I'm in the process of writing.

Consider this timeline:

  • Arisa shuts off
  • A comment with a command gets left on ticket MC-1234
  • 20 minutes later, an attachment is added to the ticket
  • Arisa is started again
  • When Arisa sees the ticket, it won't act on the command comment because it's older than lastRun

To fix this, we'd need to store the time when we've seen the ticket for the last time, for every ticket. Not sure if that's worth it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions