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

avoid deadlock when deleting decisions if PAPI is half configured #3283

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions pkg/apiserver/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@

controller.AlertsAddChan = apiClient.AlertsAddChan

if config.ConsoleConfig.IsPAPIEnabled() {
if config.ConsoleConfig.IsPAPIEnabled() && config.OnlineClient.Credentials.PapiURL != "" {
if apiClient.apiClient.IsEnrolled() {
log.Info("Machine is enrolled in the console, Loading PAPI Client")

Expand Down Expand Up @@ -340,7 +340,7 @@

// csConfig.API.Server.ConsoleConfig.ShareCustomScenarios
if s.apic.apiClient.IsEnrolled() {
if s.consoleConfig.IsPAPIEnabled() {
if s.consoleConfig.IsPAPIEnabled() && s.papi != nil {

Check warning on line 343 in pkg/apiserver/apiserver.go

View check run for this annotation

Codecov / codecov/patch

pkg/apiserver/apiserver.go#L343

Added line #L343 was not covered by tests
if s.papi.URL != "" {
log.Info("Starting PAPI decision receiver")
s.papi.pullTomb.Go(func() error { return s.papiPull(ctx) })
Expand Down
Loading