mirror of
https://github.com/Tencent/WeKnora.git
synced 2026-10-15 02:53:07 +08:00
An upgrade whose runtime finishes starting in the background (a kubernetes rollout, a version the plugin hosts have not started yet) used to commit at once: the domains switched to the new manifest and the old runtime retired while the new one was not serving, and a rollout that never became ready (an image that does not pull) left the plugin down. Such an upgrade now waits. When an activator stages with a PendingError, the reconciler keeps the staged versions aside and the previous version serves; the upgrade shows as upgradeState "pending" with what it waits for. It commits once every Waiting staged is ready, checked when the runtime reports ready, every five seconds and on every pass. A newer version or a rollback aborts it; disabling the plugin drops it. A first load still commits at once and shows degraded until ready. The kubernetes driver stages by applying the resources; once the rollout is ready it checks the service (remote.Manager.PrepareDeployed) but serves it only from the commit, and an abort applies the previous version's resources again. An upgraded plugin the plugin hosts run waits until one of them runs the new version. Staged versions may commit, abort or retire after the context they were staged with is done (a request that installed the plugin); the kubernetes driver no longer uses it for that work.