From bc4958732b5406bd4111df6c2718d981dd6684bc Mon Sep 17 00:00:00 2001 From: Stephen Levine Date: Fri, 8 Nov 2024 14:21:33 -0500 Subject: [PATCH] warn on unknown edition for update --- lib/autoupdate/agent/updater.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/autoupdate/agent/updater.go b/lib/autoupdate/agent/updater.go index 490e436677aa1..f2358ce60c0fd 100644 --- a/lib/autoupdate/agent/updater.go +++ b/lib/autoupdate/agent/updater.go @@ -384,8 +384,12 @@ func (u *Updater) Update(ctx context.Context) error { } targetVersion := resp.AutoUpdate.AgentVersion var flags InstallFlags - if resp.Edition == "ent" { + switch resp.Edition { + case modules.BuildEnterprise: flags |= FlagEnterprise + case modules.BuildOSS, modules.BuildCommunity: + default: + u.Log.WarnContext(ctx, "Unknown edition detected, defaulting to community.", "edition", resp.Edition) } if resp.FIPS { flags |= FlagFIPS