Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

fix: Allow reconfiguring provider in unmanaged mode #158

Merged
merged 2 commits into from
Jan 20, 2022

Conversation

disq
Copy link
Member

@disq disq commented Jan 20, 2022

info level maybe too low, make it warn? not sure.

@disq disq requested a review from roneli January 20, 2022 11:43
@github-actions github-actions bot added the fix label Jan 20, 2022
Copy link
Contributor

@roneli roneli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the changes, I think that maybe we can make it a little shorter with a IsDebug function

if p.Logger == nil {
return &cqproto.ConfigureProviderResponse{Error: fmt.Sprintf("provider %s logger not defined, make sure to run it with serve", p.Name)}, fmt.Errorf("provider %s logger not defined, make sure to run it with serve", p.Name)
}

if p.meta != nil {
if !p.Unmanaged() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: why not just create a function that checks if CQ_PROVIDER_DEBUG = 1 and call it? instead of adding a new field.

Copy link
Contributor

@roneli roneli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@roneli roneli merged commit 67978bc into main Jan 20, 2022
@roneli roneli deleted the fix/reconfigure-provider branch January 20, 2022 12:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants