)]}'
{
  "commit": "05c096ed827467645776abcec6b39523b4e76843",
  "tree": "54ac17bdcfc08a6f48664f95042aa3573b3724e5",
  "parents": [
    "2e2a6415a979e74e454a11e6e1637cb0d9d7a20a"
  ],
  "author": {
    "name": "Luca Milanesio",
    "email": "luca.milanesio@gmail.com",
    "time": "Thu Jun 27 23:35:36 2024 +0100"
  },
  "committer": {
    "name": "Luca Milanesio",
    "email": "luca.milanesio@gmail.com",
    "time": "Fri Jun 28 22:02:53 2024 +0000"
  },
  "message": "Move ReplicationQueue and associated bindings to ReplicationModule\n\nDuring the refactoring in I8003ec6c827f the ReplicationQueue and its\nassociated bindings were moved to the ReplicationConfigModule for\nallowing the users of the replication APIs to be able to have the\nfull bindings of all the internal replication plugin mechanisms.\n\nHowever, the change was reverted in I461cd1bef because of the\nbreakages generated and later a new approch has been introduced\nwith I349461e29d where the APIs are exposed via DynamicItem\u003c\u003e\nand the caller isn\u0027t required anymore to have the full Guice\nbindings to re-create the replication objects.\n\nAs a result, the bindings of the replication plugin internals\nremained in the ReplicationConfigModule with nasty consequences\nof other plugins (e.g. pull-replication) to inadvertently generate\njust-in-time bindings of the replication plugin classes.\n\nWhen using the pull-replication and replication plugins together\nthe just-in-time bindings would then eventually conflict\nwith the explicit bindings done in the replication plugin.\n\nExample:\n\n[2024-06-27T22:23:19.471+01:00] [main] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin replication\ncom.google.inject.CreationException: Unable to create injector, see the following errors:\n\n1) [Guice/JitBindingAlreadySet]: A just-in-time binding to DynamicSet\u003cReplicationStateListener\u003e was already configured on a parent injector.\n  at DynamicSet.setOf(DynamicSet.java:88)\n\n1 error\nDynamicSet:               \"com.google.gerrit.extensions.registration.DynamicSet\"\nReplicationStateListener: \"com.googlesource.gerrit.plugins.replication.ReplicationStateListener\"\n\nBy moving back the replication plugin internal classes\nbindings into its proper ReplicationModule the problem is fully\nresolved and there aren\u0027t just-in-time bindings created\nimplicitly anymore.\n\nChange-Id: I2bf9dab0d2555310b4d1b0c66528b2aaa2cc5106\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ec9cf507ba28ffcd5fec20c2301f35db65c5b53c",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationConfigModule.java",
      "new_id": "b0343c974edf3eb5fa98067e29e0b4f276875c78",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationConfigModule.java"
    },
    {
      "type": "modify",
      "old_id": "c7e560ef8d23a37263c88e67c43ecde40cf02c47",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationModule.java",
      "new_id": "e3e402110a046697e0038ddbd0ebc81b7317063c",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationModule.java"
    }
  ]
}
