Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Reset ephemeral Windows state before native lifecycle proof

[email protected]a9d215401e7e
diff --git a/.github/workflows/unified-agent-native.yml b/.github/workflows/unified-agent-native.yml
index 791f81c149..f776e454af 100644
--- a/.github/workflows/unified-agent-native.yml
+++ b/.github/workflows/unified-agent-native.yml
@@ -131,6 +131,14 @@ jobs:
shell: pwsh
timeout-minutes: 10
run: |
+ if (Get-Service -Name 'PulseAgent' -ErrorAction SilentlyContinue) {
+ throw 'PulseAgent is already installed; refusing to clear lifecycle state.'
+ }
+ $lifecycleStateDir = Join-Path $env:ProgramData 'Pulse'
+ if (Test-Path $lifecycleStateDir) {
+ Write-Host "Removing test-only Pulse state before clean lifecycle proof: $lifecycleStateDir"
+ Remove-Item -Path $lifecycleStateDir -Recurse -Force
+ }
go build -buildvcs=false -trimpath -ldflags="-s -w -X main.Version=6.0.5-ci.1" -o pulse-agent-windows-ci-1.exe ./cmd/pulse-agent
go build -buildvcs=false -trimpath -ldflags="-s -w -X main.Version=6.0.5-ci.2" -o pulse-agent-windows-ci-2.exe ./cmd/pulse-agent
go build -buildvcs=false -trimpath -o windows-lifecycle-server.exe ./scripts/installtests/windowslifecycleserver
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index f4a87b52b7..a04142ebe4 100644
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@ -4959,7 +4959,10 @@ native installed-lifecycle, appliance-lab, and platform code-signing evidence
separately. The native Windows binary self-test must use runner-temporary state
and logging paths so it cannot create the machine-global `ProgramData\Pulse`
directory before the same job exercises the clean install, update, service
-recovery, and uninstall lifecycle.
+recovery, and uninstall lifecycle. The dedicated ephemeral Windows job must
+also clear test-only `ProgramData\Pulse` state immediately before that proof;
+the lifecycle harness still refuses to proceed when the PulseAgent service is
+already installed.
Normal release promotion requires platform-native identity for desktop agent
binaries. macOS agents must be Developer ID signed, submitted successfully to
diff --git a/scripts/installtests/install_ps1_test.go b/scripts/installtests/install_ps1_test.go
index 4a8f6adffb..d8b24b4626 100644
--- a/scripts/installtests/install_ps1_test.go
+++ b/scripts/installtests/install_ps1_test.go
@@ -113,6 +113,9 @@ func TestNativeWindowsSelfTestDoesNotPreseedLifecycleState(t *testing.T) {
`$selfTestStateDir = Join-Path $env:RUNNER_TEMP 'pulse-agent-self-test'`,
`$selfTestLogFile = Join-Path $selfTestStateDir 'pulse-agent.log'`,
`--self-test --state-dir $selfTestStateDir --log-file $selfTestLogFile`,
+ `Get-Service -Name 'PulseAgent' -ErrorAction SilentlyContinue`,
+ `$lifecycleStateDir = Join-Path $env:ProgramData 'Pulse'`,
+ `Remove-Item -Path $lifecycleStateDir -Recurse -Force`,
}
for _, needle := range required {
if !strings.Contains(workflow, needle) {