Closed marcoppenheimer closed 2 months ago
Just discussed offline with Marc. Actually I did not realized that this pattern is also like this in ZK, here. Although also Marc is not fond of this, we can just keep it as-is for the time being, but I would like to improve this in the next weeks when we are together in Madrid.
Features
feat: zookeeper, peer and client data secrets supported
zookeeper
interface, and upcomingzookeeper_client
interface, optionally using secretschore: bump data_interfaces to v34
Refactoring
chore: support tls + tls-ca and ca + ca-cert
ca-cert
andca
in peer-data, cleaning up old ones when we get granted a new CAbool(tls-ca)
from ZooKeeper, defaulting to originaltls=enabled
refactor: align with ZooKeeper charm patterns
provider.update_connection_info()
-->charm.update_client_data()
with newstate.clients
+models.KafkaClient
literals.Substrate
-->core.models.SUBSTRATES
+literals.SUBSTRATE
state.broker
-->state.unit_broker
, mostly for clarity that this is 'the unit'test: replace model_full_name with ops_test
test: updating int-test helpers
test: sync unit-tests with K8s
Bug Fixes
fix: explicitly emit config_changed events where necessary
self._on_config_changed(event)
whenever we wanted to do thingsconfig_changed
deferred, it re-ran the whole event, which caused a whole lot of restarting issues and non-idempotent event handling and hard-to-grok event orderingcertificates-available
, which calledconfig_changed
, which deferred. Incertificates-available
, we have a check that says 'If I already have a cert, restart'. So after we deferred the event, we re-run it, have a cert, and restart, which we may not have wantedconfig-changed
event helps avoid issues like that, as only the 'changed' event gets deferredchore: avoid ruff warnings
pyproject.toml
to avoid warningstest: add async sleeps to int-tests
secret-changed
events where before we had 'instant'relation-changed
eventsfast-forward: asyncio.sleep
has helped somewhat. Will keep looking at this