Ben Hoyt

Results 203 comments of Ben Hoyt

I can see where this causes confusion, however it's sort of expected: when you call `harness.add_relation_unit` it should add more units, and also triggers `relation_joined`, so you probably shouldn't use...

1) This has been a while, so we should probably try to reproduce this on Juju 3 and see what events we get. 2) Probably the least invasive change would...

@PietroPasotti What's the actual concern here: noise in the debug log? The unit blipping into error state for a second during teardown? Or something else? To me the current behaviour...

Yeah, let's close this for now -- presuming the issue has gone away in recent version of Juju. If we have a clear repro in future, happy to reopen.

Events like `ActionEvent.defer` raise `RuntimeError` for this, so we could follow that precedent for these "tearing down" events.

This is still an issue. However, we're thinking of (maybe!) deprecating defer in general, see https://github.com/canonical/operator/issues/966

Support for merge in the harness was added in 1.5.0, see https://github.com/canonical/operator/commit/e3bc30bf8491716d33c8bb6061eb63bd8306ca1d

Not going to implement this for now -- agreed with John's take above.

I think the updated docstring that Pietro copied above is thorough enough that we can mark this fixed.

I've created PR https://github.com/canonical/operator/pull/1029 to tweak the docstrings for status. In addition to Pietro's docs (and the new collect-status, which is documented as operating at the end of the hook...