InvenTree/src
Oliver d8cac9bb61
Make plugin registry hash independent of plugin discovery order (#12151) (#12152)
* Make plugin registry hash independent of plugin discovery order

calculate_plugin_hash() iterates self.plugins.items() in insertion
order, which is the plugin discovery order of the local process. Two
processes can hold the same registry state (same plugins, versions,
active flags) in a different order and compute different hashes,
ping-ponging the _PLUGIN_REGISTRY_HASH setting and triggering endless
registry reloads in check_reload().

Sort by slug before hashing so the hash represents the registry state
rather than the iteration order of any particular process. Add a
regression test that reverses the plugin dict and asserts the hash is
unchanged.

* Address review comments: explicit sort key, guard against vacuous test

---------

Co-authored-by: Christopher Johnson <keitonasawa@gmail.com>
Co-authored-by: Nasawa <christopher@anigeek.com>
2026-06-11 11:15:50 +10:00
..
backend Make plugin registry hash independent of plugin discovery order (#12151) (#12152) 2026-06-11 11:15:50 +10:00
frontend UX: Disable standard allocation for trackable parts (#11811) (#11967) (#12113) 2026-06-08 07:53:58 +10:00
performance [API] Search improvements (#11094) 2026-01-08 18:06:23 +11:00