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

Change the flags that enable/disable a component use 'Enabled' for co… #60

Closed
wants to merge 2 commits into from

Conversation

schmidtw
Copy link
Member

@schmidtw schmidtw commented Apr 4, 2024

…nsistency.

@schmidtw schmidtw requested review from denopink and piccione99 April 4, 2024 13:49
Copy link
Contributor

@denopink denopink left a comment

Choose a reason for hiding this comment

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

I chose Disable because it worked nicely with the default value, but understand and agree with the need to keep things consistent

lgtm

@@ -258,6 +258,7 @@ var defaultConfig = Config{
},
},
Websocket: Websocket{
Enabled: true,
URLPath: "api/v2/device",
Copy link
Contributor

@denopink denopink Apr 4, 2024

Choose a reason for hiding this comment

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

added a new default if we wanted to ws to be enable by default
#60 (review)

Copy link
Contributor

Choose a reason for hiding this comment

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

this is fine but does disabled make more sense because default bool is false? I missed this pattern so I can switch the mocktr181 to use disabled if that's better

Copy link
Contributor

Choose a reason for hiding this comment

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

fyi @schmidtw in case you didn't want this behavior

Copy link
Contributor

@denopink denopink Apr 4, 2024

Choose a reason for hiding this comment

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

because of the power of goschtalt, either one is fine and both works for me

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm - the question I have is:
If this defaults to on, will the default configuration actually work for any service?

If you need to provide some configuration to make ti work, I think defaulting it to off is ok. If it will work just fine without any non-default values, then I agree that Disabled would make more sense.

Copy link
Contributor

@denopink denopink Apr 4, 2024

Choose a reason for hiding this comment

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

what do you think @johnabass ? nevermind

Copy link
Member Author

Choose a reason for hiding this comment

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

@denopink and I chatted & while well intended, I'm not merging this PR for a few reasons:

  1. When we enable QUIC as a protocol, we'll know better how we want to refactor the config & yes, it will be a breaking change, but that's probably better than guessing about several things and being wrong & then still have a breaking change later.
  2. This doesn't help us reach our initial goal/deadline.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the feedback!

@schmidtw schmidtw closed this Apr 4, 2024
@denopink denopink deleted the enabled branch July 15, 2024 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants