Prevent extension reload loops when altering extension state on load.

Review Request #7297 — Created May 12, 2015 and submitted

Information

Djblets
release-0.8.x
b12b603...

Reviewers

During extension loading and initialization, it's possible for an
operation to bump the synchronization generation number, which would
cause another extension load on the next HTTP request, eventually
spiraling out of control. This would happen for any extensions with
dependencies or when saving extension settings on initialization, as
each enable/disable/settings save operation would try to bump the
number.

We now have a flag set when loading extensions, which will block any
attempts to bump the number. The result is that any load operation will
retain its previous number, preventing these load loops.

Unit tests failed before this, but succeeded after.

Description From Last Updated

Can you add a comment here explaining what _block_sync_gen does and why it's necessary?

daviddavid
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/extensions/manager.py
        djblets/extensions/tests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/extensions/manager.py
        djblets/extensions/tests.py
    
    
  2. 
      
david
  1. 
      
  2. djblets/extensions/manager.py (Diff revision 1)
     
     
    Show all issues

    Can you add a comment here explaining what _block_sync_gen does and why it's necessary?

  3. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.8.x (baa7697)