)]}'
{"specs/juno/keystone-dependency-injection-removal.rst":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"56ff61ef409b7febad7c806483f6c79f91c58dbf","unresolved":false,"context_lines":[{"line_number":15,"context_line":"Keystone has made use of a series of dependency injection decorators over the"},{"line_number":16,"context_line":"last few cycles. This has resulted in a number of headaches in debugging, code"},{"line_number":17,"context_line":"clarity, and difficulty ensuring the right dependencies are injected into the"},{"line_number":18,"context_line":"right objects. We should simplify dependency injection and make it less"},{"line_number":19,"context_line":"problematic with fewer edge cases."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Problem Description"}],"source_content_type":"text/x-rst","patch_set":5,"id":"baada198_c97e616a","line":18,"updated":"2014-07-17 00:35:28.000000000","message":"I haven\u0027t seen any of these problems.\n\nTestability should also be mentioned as a problem with a global registry.","commit_id":"de8c91ef730f07ef9ba1ed79621d9427a9ffe37f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"56ff61ef409b7febad7c806483f6c79f91c58dbf","unresolved":false,"context_lines":[{"line_number":25,"context_line":"and overall hard to ensure everything is working as expected. This stems from"},{"line_number":26,"context_line":"the desire to make the Managers something like a singleton (where a given"},{"line_number":27,"context_line":"manager is instantiated one time and then injected onto the object that"},{"line_number":28,"context_line":"requires it)."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Optional dependencies are even more fickle and have been the"},{"line_number":31,"context_line":"source of a few fairly significant bugs (revocation-api not really being"}],"source_content_type":"text/x-rst","patch_set":5,"id":"baada198_69e8f516","line":28,"updated":"2014-07-17 00:35:28.000000000","message":"Singletons are generally not injected. Typically you fetch the instance of the singleton when you need it... e.g., Singleton.getInstance()","commit_id":"de8c91ef730f07ef9ba1ed79621d9427a9ffe37f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"56ff61ef409b7febad7c806483f6c79f91c58dbf","unresolved":false,"context_lines":[{"line_number":28,"context_line":"requires it)."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Optional dependencies are even more fickle and have been the"},{"line_number":31,"context_line":"source of a few fairly significant bugs (revocation-api not really being"},{"line_number":32,"context_line":"optional and causing a security issue)."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Proposed Change"}],"source_content_type":"text/x-rst","patch_set":5,"id":"baada198_e91ec50c","line":31,"updated":"2014-07-17 00:35:28.000000000","message":"We could try to do better job not accepting unreviewable patches.","commit_id":"de8c91ef730f07ef9ba1ed79621d9427a9ffe37f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"56ff61ef409b7febad7c806483f6c79f91c58dbf","unresolved":false,"context_lines":[{"line_number":35,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"The proposed solution is to update the manager init process to support being"},{"line_number":38,"context_line":"passed in the dependencies directly. This will greatly simplify the code and"},{"line_number":39,"context_line":"the way dependencies are handled within the Keystone code-base. The use of"},{"line_number":40,"context_line":"the @dependency.requires and @dependency.optional decorators will be removed"},{"line_number":41,"context_line":"in this process."}],"source_content_type":"text/x-rst","patch_set":5,"id":"baada198_096cd99c","line":38,"updated":"2014-07-17 00:35:28.000000000","message":"I don\u0027t know what this means. Each implementation of the Manager class will have different requirements for what classes it needs so I don\u0027t see why the base Manager class has to change.","commit_id":"de8c91ef730f07ef9ba1ed79621d9427a9ffe37f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"56ff61ef409b7febad7c806483f6c79f91c58dbf","unresolved":false,"context_lines":[{"line_number":48,"context_line":"   exception if it does not exist. If the dependency is optional, simply"},{"line_number":49,"context_line":"   receive a None back."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"2. Continue to maintain and expand functionality of the dependency injection."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"3. Make the Managers Singletons."},{"line_number":54,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"baada198_a9404d08","line":51,"updated":"2014-07-17 00:35:28.000000000","message":"Let\u0027s do this instead... write up a spec!\n\nRemove this since it\u0027s not really an alternative.","commit_id":"de8c91ef730f07ef9ba1ed79621d9427a9ffe37f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"56ff61ef409b7febad7c806483f6c79f91c58dbf","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"2. Continue to maintain and expand functionality of the dependency injection."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"3. Make the Managers Singletons."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"4. Use an @property method to lookup the global registry of manager objects."},{"line_number":56,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"baada198_09f3f9e7","line":53,"updated":"2014-07-17 00:35:28.000000000","message":"Shooting ourselves in the foot is also an alternative.","commit_id":"de8c91ef730f07ef9ba1ed79621d9427a9ffe37f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"56ff61ef409b7febad7c806483f6c79f91c58dbf","unresolved":false,"context_lines":[{"line_number":100,"context_line":"----------"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"* Update manager baseclass to support being passed the dependencies on"},{"line_number":103,"context_line":"  instantiation."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"* Convert all dependency injection to direct passing of the registry objects"},{"line_number":106,"context_line":"  on init."}],"source_content_type":"text/x-rst","patch_set":5,"id":"baada198_c9110106","line":103,"updated":"2014-07-17 00:35:28.000000000","message":"I don\u0027t know what this means. Each implementation of the Manager class will have different requirements for what classes it needs so I don\u0027t see why the base Manager class has to change. I don\u0027t think you can actually stop a subclass from overriding and adding arguments to __init__.","commit_id":"de8c91ef730f07ef9ba1ed79621d9427a9ffe37f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"56ff61ef409b7febad7c806483f6c79f91c58dbf","unresolved":false,"context_lines":[{"line_number":102,"context_line":"* Update manager baseclass to support being passed the dependencies on"},{"line_number":103,"context_line":"  instantiation."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"* Convert all dependency injection to direct passing of the registry objects"},{"line_number":106,"context_line":"  on init."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"* Support validating that a dependency is being met and that a manager that"}],"source_content_type":"text/x-rst","patch_set":5,"id":"baada198_29751d32","line":105,"updated":"2014-07-17 00:35:28.000000000","message":"registry? Is this some global object? Get rid of it.","commit_id":"de8c91ef730f07ef9ba1ed79621d9427a9ffe37f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"56ff61ef409b7febad7c806483f6c79f91c58dbf","unresolved":false,"context_lines":[{"line_number":105,"context_line":"* Convert all dependency injection to direct passing of the registry objects"},{"line_number":106,"context_line":"  on init."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"* Support validating that a dependency is being met and that a manager that"},{"line_number":109,"context_line":"  requires a given dependency has an attribute referencing that dependency."},{"line_number":110,"context_line":"  This is to ensure dependency errors are raised before normal runtime."},{"line_number":111,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"baada198_09c4d93f","line":108,"updated":"2014-07-17 00:35:28.000000000","message":"Let\u0027s just have a clear and understandable startup procedure that sets up the system before running.","commit_id":"de8c91ef730f07ef9ba1ed79621d9427a9ffe37f"}]}
