{"push_id":869430550,"size":2,"distinct_size":2,"ref":"refs/heads/master","head":"0bf7c3826a0b1755d8179851bb013e6702693b09","before":"a22f7e3a25e5fdc587075177f98c1aa3711dbd04","commits":[{"sha":"0547b0153d8eb703d0a49580eade65898191234f","author":{"email":"0a123068ee4de2ed74e7fac46874617db80da104@canonical.com","name":"Menno Smits"},"message":"state: Ensure the collectionwatcher always filters by environment\n\ncollectionwatcher was recently used to implement the new\nState.WatchForUnitAssignment method, but it didn't specify a filter to\nlimit the returned documents to a single environment. This, combined\nwith lax id handling inside the watcher, caused the watcher to return\n\"local\" unit ids for docuements for the desired environment\n(e.g. \"ubuntu/0\") and full ids for documents for other environments\n(e.g. \"some-long-uid:ubuntu/0\"). The documents for other environments\nshould never have been returned.\n\nInstead of fixing the problem in WatchForUnitAssignment,\ncollectionwatcher has been updated to make it impossible to repeat the\nproblem.\n\n1. Environment level filtering is always applied, whether a filter\nfunction is supplied to collectionwatcher or not.\n\n2. If an id for the wrong environment is somehow seen by the\ncollectionwatcher it is now treated as an error instead of allowing it\nto pass. Failing earlier and closer to the source makes the problem\neasier to track down.\n\nSide note: collectionwatcher had only previously been used for actions\nand the filtering used there did limit records to a single\nenvironment.","distinct":true,"url":"https://api.github.com/repos/bz2/juju/commits/0547b0153d8eb703d0a49580eade65898191234f"},{"sha":"0bf7c3826a0b1755d8179851bb013e6702693b09","author":{"email":"28c2b79e213f53c52a14677e00898d5b855059a0@users.noreply.github.com","name":"Juju bot"},"message":"Merge pull request #3737 from mjs/1516144-unitassigner-watcher-fix\n\nstate: Ensure the collectionwatcher always filters by environment\n\ncollectionwatcher was recently used to implement the new State.WatchForUnitAssignment method, but it didn't specify a filter to limit the returned documents to a single environment. This, combined\r\nwith lax id handling inside the watcher, caused the watcher to return \"local\" unit ids for docuements for the desired environment (e.g. \"ubuntu/0\") and full ids for documents for other environments (e.g. \"some-long-uid:ubuntu/0\"). The documents for other environments should never have been returned.\r\n\r\nInstead of fixing the problem in WatchForUnitAssignment, collectionwatcher has been updated to make it impossible to repeat the problem.\r\n\r\n1. Environment level filtering is always applied, whether a filter function is supplied to collectionwatcher or not.\r\n2. If an id for the wrong environment is somehow seen by the collectionwatcher it is now treated as an error instead of allowing it to pass. Failing earlier and closer to the source makes the problem easier to track down.\r\n\r\nSide note: collectionwatcher had only previously been used for actions and the filtering used there did limit records to a single environment.\n\n(Review request: http://reviews.vapour.ws/r/3144/)","distinct":true,"url":"https://api.github.com/repos/bz2/juju/commits/0bf7c3826a0b1755d8179851bb013e6702693b09"}]}