feat(site): artifact apply writes deployed secrets and answers SecretsApplied

This commit is contained in:
Joseph Doherty
2026-09-28 19:29:55 -04:00
parent 838fb4177b
commit 52cd4fb096
5 changed files with 466 additions and 16 deletions
@@ -836,13 +836,20 @@ akka {{
// it after an artifact deploy applies external-system changes.
var externalSystemCache = _serviceProvider
.GetService<ZB.MOM.WW.ScadaBridge.SiteRuntime.Repositories.ExternalSystemDefinitionCache>();
// Task 10 (site-secrets artifact deploy): the same per-node singleton AddSiteRuntime
// registers (and AddHostedService runs periodically) is reconciled SYNCHRONOUSLY by
// HandleDeployArtifacts right after it writes a shipped secret set, so the deploy
// reply's SecretsApplied reflects this node's own apply/verify outcome immediately
// rather than waiting for the next periodic pass.
var secretsMirror = _serviceProvider
.GetService<ZB.MOM.WW.ScadaBridge.SiteRuntime.Secrets.DeployedSecretsMirror>();
var dm = SingletonRegistrar.Start(
_actorSystem!, "deployment-manager",
Props.Create(() => new DeploymentManagerActor(
storage, compilationService, sharedScriptLibrary, streamManager,
siteRuntimeOptionsValue, dmLogger, dclManager,
siteHealthCollector, _serviceProvider, null, deploymentConfigFetcher,
null, null, externalSystemCache)),
null, null, externalSystemCache, null, null, null, secretsMirror)),
_logger, role: siteRole);
var dmProxy = dm.Proxy;