Skip to content

[Breaking] fix(Flags): consolidation and help text improvements #7544

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

Merged
merged 22 commits into from
Mar 12, 2021

Conversation

karlmcguire
Copy link
Contributor

@karlmcguire karlmcguire commented Mar 10, 2021

DGRAPH-3172

Old Name New Name Type Subcommands
--telemetry
telemetry reports bool alpha, zero
enable_sentry sentry bool alpha, zero
--limit
mutations mutations string alpha
--badger
max_retries max-retries int alpha

These are the only flag names changed. They've all been moved into their respective SuperFlags, and only --telemetry is new.

Note: In DGRAPH-3172 it says to move max_retries into --badger "only after verifying if that flag is used only in commitToDisk." I made sure the only time the flag is used is here in the toDisk function, but I'm not sure if that's exactly what the ticket is referring to.


This change is Reviewable

@github-actions github-actions bot added the area/enterprise Related to proprietary features label Mar 10, 2021
@@ -712,8 +717,6 @@ func run() {
setupCustomTokenizers()
x.Init()
x.Config.PortOffset = Alpha.Conf.GetInt("port_offset")
x.Config.Limit = z.NewSuperFlag(Alpha.Conf.GetString("limit")).MergeAndCheckDefault(
worker.LimitDefaults)
x.Config.LimitMutationsNquad = int(x.Config.Limit.GetInt64("mutations-nquad"))
x.Config.LimitQueryEdge = x.Config.Limit.GetUint64("query-edge")
Copy link
Contributor

Choose a reason for hiding this comment

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

just a quick thought wouldnt this be great to actually have struct say
type Limit struct { ... ... }

I am sensing with super flags we are just putting too much reliance over x.SuperFlag.Get* function and causing too much noise in various package configuration. Like limit is super flag but x.Config has all the individual limits options. Seems strange to me and bit unstructured

Copy link
Contributor

@darkn3rd darkn3rd left a comment

Choose a reason for hiding this comment

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

:lgtm:

@aman-bansal aman-bansal merged commit ee1bf5f into master Mar 12, 2021
@aman-bansal aman-bansal deleted the karl/superflag-help branch March 12, 2021 15:12
aman-bansal added a commit that referenced this pull request Mar 12, 2021
* small SuperFlag --help fixes

* update Ristretto

* combine telemetry flags

* combine telemetry flags

* cleanup enable_sentry

* minor fixes

* get tls working for now

* move --mutations flag to --limit superflag

* fix limit default

* move max_retries to badger superflag

* critical path helper

* fix

* --help fixes

* always show default string in --help

* clean up cdc flag handling

* move cdc defaults outside of _ee

* telemetry documentation

* cleaning

* fix comment

* clean up tls defaults

* nevermind

* removing some extra fields

Co-authored-by: aman-bansal <bansalaman2905@gmail.com>
aman-bansal added a commit that referenced this pull request Mar 12, 2021
… (#7560)

* small SuperFlag --help fixes

* update Ristretto

* combine telemetry flags

* combine telemetry flags

* cleanup enable_sentry

* minor fixes

* get tls working for now

* move --mutations flag to --limit superflag

* fix limit default

* move max_retries to badger superflag

* critical path helper

* fix

* --help fixes

* always show default string in --help

* clean up cdc flag handling

* move cdc defaults outside of _ee

* telemetry documentation

* cleaning

* fix comment

* clean up tls defaults

* nevermind

* removing some extra fields

Co-authored-by: aman-bansal <bansalaman2905@gmail.com>

Co-authored-by: Karl McGuire <karl@karlmcguire.com>
aaroncarey added a commit to dgraph-io/dgraph-docs that referenced this pull request Mar 16, 2021
…rt of a CLI Command Reference (#111)

* Added flag mapping

* Update cli-command-ref.md

* terminology update to align with CLI help

* Add compound flags per hypermodeinc/dgraph/pull/7544

* Update cli-command-ref.md

* Update cli-command-ref.md

* Add basic information for each command

* Old flags formatted as flags

* Complete cli-command-ref.md

* spellcheck etc.

* Update cli-command-ref.md
aaroncarey added a commit to dgraph-io/dgraph-docs that referenced this pull request Mar 22, 2021
…s replaced by superflags and their options, plus spellcheck and some minor edits (#122)

* Added flag mapping

* Update cli-command-ref.md

* terminology update to align with CLI help

* Add compound flags per hypermodeinc/dgraph/pull/7544

* Update cli-command-ref.md

* Update cli-command-ref.md

* Add basic information for each command

* Old flags formatted as flags

* Complete cli-command-ref.md

* Updates per superflags

Updates thru --enable_sentry, next is  --tls_*

* spellcheck

* Update cli-command-ref.md

* Adding details to command list table

* Update cli-command-ref.md

* Update content/deploy/dgraph-administration.md

Co-authored-by: Abu Sakib <sakib@dgraph.io>

* Apply suggestions from code review

Co-authored-by: Abu Sakib <sakib@dgraph.io>

* Apply suggestions from code review

Co-authored-by: Abu Sakib <sakib@dgraph.io>

* Delete cli-command-ref.md.bak

* Update tls-configuration.md

* Apply suggestions from code review

Co-authored-by: Abu Sakib <sakib@dgraph.io>

* superflag replacements (final self-review next)

* feedback incorporation / pre-review fixes

* Final self-review, spellcheck using `aspell check -M -x file-name.md`

* final tweaks

* Update content/deploy/config.md

Co-authored-by: Abu Sakib <sakib@dgraph.io>

* Update content/deploy/kubernetes.md

Co-authored-by: Abu Sakib <sakib@dgraph.io>

* Update content/deploy/kubernetes.md

Co-authored-by: Abu Sakib <sakib@dgraph.io>

* Update content/deploy/single-host-setup.md

Co-authored-by: Abu Sakib <sakib@dgraph.io>

* Update content/deploy/single-host-setup.md

Co-authored-by: Abu Sakib <sakib@dgraph.io>

* Update content/deploy/single-host-setup.md

Co-authored-by: Abu Sakib <sakib@dgraph.io>

* Update content/deploy/single-host-setup.md

Co-authored-by: Abu Sakib <sakib@dgraph.io>

* Feedback incorporation

Co-authored-by: Abu Sakib <sakib@dgraph.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/enterprise Related to proprietary features
Development

Successfully merging this pull request may close these issues.

3 participants