← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1547283] Re: hacking rules for callback notifications

 

This probably does not turn out to be as simple as I initially
anticipated.

** Changed in: neutron
       Status: Confirmed => Incomplete

** Changed in: neutron
    Milestone: newton-3 => None

** Changed in: neutron
     Assignee: j_king (james-agentultra) => (unassigned)

** Tags removed: low-hanging-fruit

** Changed in: neutron
       Status: Incomplete => Won't Fix

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1547283

Title:
  hacking rules for callback notifications

Status in neutron:
  Won't Fix

Bug description:
  Callbacks were made available during the Liberty timeframe [1]. They
  have been put to use in a number of places, like [2] and [3].

  Currently there's no formal convention or place where to locate
  callback notifications. This can represent a potential drawback where
  an inexperienced developer may accidentally add a duplicated
  notification (with exact signature) without carefully checking for
  existing notifications. A reviewer can also easily miss the error
  during code review.

  This could lead to callbacks called multiple times from different
  places of workflow, without the callback being able to distinguish the
  difference: so long as callbacks are designed to be idempotent, this
  is fine, but if they aren't, then this could lead to unexpected
  results.

  We should add a hacking rule that validates that a patch introducing a
  new notification hook, does not duplicate the exact signature of an
  existing notification.

  Callbacks can (un)subscribe multiple times to the same resource event,
  and that's idempotent by design.

  [1] http://docs.openstack.org/developer/neutron/devref/callbacks.html
  [2] https://github.com/openstack/neutron/commit/868e67b480b08cc815d802cf950547c6b5ac0153
  [3] https://github.com/openstack/neutron/commit/593b64dee4c0923fc85d6656e29a2beb27f27b17

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1547283/+subscriptions


References