Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-20372

Extract shared logic between eventlet and threading backends to reduce code duplication

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • python-oslo-service
    • None
    • Sprint 7
    • 1

      Problem:

      The code between eventlet and threading backends contained significant duplication in loopingcall.py and threadgroup.py modules, making maintenance difficult and increasing the risk of inconsistencies.
      Solution:
      Extract common logic into a new _common/ package
      Create abstract base classes for LoopingCallBase and ThreadGroupBase
      Keep backend-specific implementations in their respective modules
      Preserve all existing public APIs

      Benefits:

      ✅ Reduce ~1166 lines of duplicated code
      ✅ Centralize shared behavior for easier maintenance
      ✅ Clearly define common interfaces
      ✅ Simplify future backend changes
      ✅ Improve consistency between backends

      Impact:

      • No impact on public APIs
      • Full backward compatibility maintained
      • More maintainable architecture

      Complexity:

      • Significant refactoring affecting 7 files
      • Common logic extraction requiring deep understanding of both backends
      • Testing required to ensure compatibility
      • But no API changes, so not maximum complexity

              mbollo@redhat.com Daniel Mats Niklas Bengtsson
              mbollo@redhat.com Daniel Mats Niklas Bengtsson
              rhos-dfg-pidone
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: