Wave 2: mail names its own store, org and data root, and leaves the boot to a bundle (mcl-mail#31) #32
Loading…
Reference in a new issue
No description provided.
Delete branch "pluto/31-wave2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs martha-ai/mcl-martha#1 (wave 2, the per-service packages), macula-services/mcl-om#8, and macula-services/mcl-mail#31
What changes
The per-service changes a bundle of several mcl services needs, with its own standalone release left doing exactly what it does today.
mailboxes_read_model_replayread evoq'sstore_idapp env, which is one value per VM and is set differently by every service in a bundle. It namesmcl_mail_store:id/0now, the one place this service's store id is written. The nine CMD desks already name it on every dispatch and are untouched.mcl_mail_service:info/0carriesorg => <<"mcl-mail">>, which mcl-om#8's boot reads. The pinned hex release, mcl_om 1.8.0, reads only themcl_omapp env, so that config line stays and a test holds the two equal; the key is inert until the pin is~> 1.9, and C6 completes with that move, not this one.{bundled, true}stops the application callingmcl_om:boot/1; it opens the store and starts the service supervisor, andmcl_mail_service:start/1answers a supervisor that is already running, so a bundle's ownmcl_om:boot([...])registers the service instead of failingalready_started. Unset, which is every standalone release, keeps today's one call.{mcl_mail, data_root}, which the shipped config fills fromMCL_DATA_DIR; no code reads the OS variable. The store keeps itsmcl_mail_storesubdirectory, so/data/mcl_mail_storeis unchanged.Gates
rebar3 eunit157 pass,rebar3 lintclean,rebar3 dialyzerclean, OTP 28.4.3.The per-service changes a bundle of several services needs, without moving its own standalone release off what it does today. - C2: the read-model replay names mcl_mail_store:id/0 instead of reading evoq's `store_id' app env, which is one value per VM that every service in a bundle sets differently. The nine CMD desks already name it on dispatch. - C6: info/0 carries the service's org and a test holds it equal to the config line. The key is inert on the pinned mcl_om 1.8.0, which reads only the app env; the line stays until the pin is ~> 1.9. - C7: a `bundled' app env stops the application calling mcl_om:boot itself, and the service's start/1 answers an already-running supervisor, so a bundle's boot registers the service instead of failing already_started. - C8/C9: the store's data root comes from {mcl_mail, data_root}, which the shipped config fills from MCL_DATA_DIR; no code reads the OS variable. - A3 package 4: nothing to wrap. Mail publishes and subscribes to no topic, and its read model is local, so no side effect runs twice per node. eunit 157 pass, lint and dialyzer clean on OTP 28.4.3.