Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-1710

CommitCommandWorkItem always fetches Commit

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.0
    • None
    • bots
    • None

      During bot restart, quite a few CommitCommandWorkItems are spawned. Most of them will discover that nothing needs to be done. One of the first things done in the run method is fetching the commit from the remote repository. The Commit instance will always be created with the full set of diffs for the commit. In certain cases, where commits are very large, this can take considerable time. Specifically in the jfx repos, there are examples where the REST request is split into 147 pages. (e.g. https://github.com/openjdk/jfx11u/commit/4bd6877dbd46e37f6774c50dcdc98a8a1ab41214) They way these WorkItems are spawned on startup, most of these gigantic commits will be part of it for a long time. The Commit instance isn't needed to figure out if a new command is present, just the comments are. This means we can move this query to after we have established that a command is to be executed.

      We could take this even further and only fetch the Commit in the commands that actually need any other field than the hash. Currently only the BackportCommand does. We could also change the HostedRepository::commit method to only fetch the full diffs when requested to further improve this.

            erikj Erik Joelsson
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: