-
Notifications
You must be signed in to change notification settings - Fork 169
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
Fixing magic strings on operator flags #3327
Conversation
Let's revert all changes to the Python code. That code already has the licenses stuff. |
We can get rid of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this change, it was very needed.
pkg/operator/flags.go
Outdated
AzureSubnetsServiceEndpointManaged = "aro.azuresubnets.serviceendpoint.managed" | ||
BannerEnabled = "aro.banner.enabled" | ||
CheckerEnabled = "aro.checker.enabled" | ||
DnsMasqEnabled = "aro.dnsmasq.enabled" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Dnsmasq isn't camelCase. It's technically dnsmasq
but Go wants exported things to start with a capital letter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed it both for DnsmasqEnabled
and RestardDnsmasqEnabled
, thanks for pointing out :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm working on making pkg/api/ independent of the rest of the codebase so that it can be imported in the Installer Wrapper, MIMO, etc without dragging in potentially all the RP's dependencies. Is there a way we can do this without pkg/api/ having a hard dependency on pkg/operator/?
/azp run ci |
Azure Pipelines failed to run 1 pipeline(s). |
/azp run ci |
Azure Pipelines successfully started running 1 pipeline(s). |
Please rebase pull request. |
/azp run ci |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm nice clean up
* replacing usages of magic strings with flags from the subpackage * removing the //todo comment regarding the magic strings * replacing magic strings with operator constants * move DefaultOperatorFlags to operator package, inject when needed
* replacing usages of magic strings with flags from the subpackage * removing the //todo comment regarding the magic strings * replacing magic strings with operator constants * move DefaultOperatorFlags to operator package, inject when needed
Which issue this PR addresses:
There isn't a work item to be referenced for this change. The issue was found searching for
// TODO
in the code. It's a small refactor.What this PR does / why we need it:
flags.go
file that can be reused instead of us having a bunch of magic strings that could be wrongly changed easily everywhere.Test plan for issue:
✅
Is there any documentation that needs to be updated for this PR?
No documentation changes needed.