Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add watchdog feature flag check before checking for task installation #2028

Merged
merged 2 commits into from
Jan 6, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ee/watchdog/controller_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ func (wc *WatchdogController) publishLogs(ctx context.Context) {
return
}

// don't bother processing further unless watchdog is enabled.
// note that this means if you manually install watchdog via CLI, logs
// will not be published unless you have the corresponding feature flag enabled
if !wc.knapsack.LauncherWatchdogEnabled() {
return
}

// note that there is a small window here where there could be pending logs before the watchdog task is removed -
// there is no harm in leaving them and we could recover these with the original timestamps if we ever needed.
// to avoid endlessly re-processing empty logs while we are disabled, we accept this possibility and exit early here
Expand Down
Loading