Eventlet Removal Logo
Eventlet Removal

Post-Migration Guidance

Now that your project is free from Eventlet, the journey isn't over. This guide provides actionable recommendations to ensure Eventlet doesn't sneak back in and compromise the stability, performance, or compatibility of your codebase.

Add Custom Hacking Checks 🔗

To prevent Eventlet from being reintroduced accidentally, we recommend adding specific checks using the OpenStack Hacking framework or similar linting tools.

Example: H999 – Ban Eventlet Import

# In your custom hacking plugin:
import re

EVENTLET_IMPORT_RE = re.compile(r'^\s*(import|from)\s+eventlet')

def check_no_eventlet_import(logical_line):
    if EVENTLET_IMPORT_RE.search(logical_line):
        return (0, "H999: eventlet must not be imported.")

To enable this check, register it in your setup.cfg:

[flake8]
enable-extensions = H999

This ensures that any import of eventlet is blocked at code review time.

Monitor Your Dependencies 🔗

Make sure none of your dependencies reintroduce Eventlet indirectly:

Dependency Auditing

Use tools like pipdeptree or pip freeze to regularly audit your dependencies and their dependencies for eventlet usage.

pipdeptree | grep -i eventlet

Constraints Files

Use constraints files or negative requirements to enforce Eventlet's absence:

# In constraints.txt
eventlet==none

# Or in requirements.txt
exclude eventlet

Review Practices 🔗

Update your code review checklist to include Eventlet-specific checks:

Code Review Checklist

  • No direct or transitive Eventlet usage
  • Green light from custom hacking checks
  • Async compatibility maintained
  • No monkey-patching in the codebase
  • Proper error handling for async operations

Educate Your Team 🔗

Add a section in your team's onboarding and review documentation explaining:

Why Eventlet Was Removed

Document the technical debt, performance issues, and compatibility problems that led to the removal decision.

Risks of Reintroduction

Explain the potential consequences of reintroducing Eventlet: incompatibility issues, maintenance burden, and performance problems.

Preferred Alternatives

Clearly document which alternatives (AsyncIO, Threading) are now being used and provide guidance on how to use them correctly.

Join the Community 🔗

Stay connected with the broader community working on Eventlet removal:

Community Resources

  • Subscribe to the #openstack-eventlet-removal OFTC IRC channel
  • Join the Eventlet Removal LinkedIn group to stay informed of the latest updates
  • Share your experiences and tools back through this community-driven resource

This is not just a cleanup – it's a commitment. A commitment to long-term maintainability, performance, and clarity in your codebase.