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

[Breaking] Consolidate multiple flags into a few SuperFlags #7436

Merged
merged 80 commits into from
Feb 25, 2021

Conversation

karlmcguire
Copy link
Contributor

@karlmcguire karlmcguire commented Feb 16, 2021

(This is related to DGRAPH-3026.)

Old Name Old Type New Name New Type Al Ze Bu Ba Li De
--badger
badger.compression string compression string 🟢 🟢 🟢
(new) goroutines int 🟢 🟢 🟢
badger.cache_mb string cache-mb string 🟢
badger.cache_percentage string cache-percentage string 🟢
--acl
acl_secret_file string secret-file string 🟢
acl_access_ttl time.Duration access-ttl string 🟢
acl_refresh_ttl time.Duration refresh-ttl string 🟢
--ludicrous
ludicrous_mode bool enabled bool 🟢
ludicrous_concurrency int concurrency int 🟢
--graphql
graphql_introspection bool introspection bool 🟢
graphql_debug bool debug bool 🟢
graphql_extensions bool extensions bool 🟢
graphql_poll_interval time.Duration poll-interval string 🟢
graphql_lambda_url string lambda-url string 🟢
--raft
pending_proposals int pending-proposals int 🟢
idx int idx int 🟢 🟢
group int group int 🟢
learner bool learner bool 🟢 🟢
snapshot-after int snapshot-after bool 🟢
--security
auth_token string token string 🟢
whitelist string whitelist string 🟢
--limit
query_edge_limit uint64 query-edge uint64 🟢
normalize_node_limit int normalize-node int 🟢
mutations_nquad_limit int mutations-nquad int 🟢
--tls
tls_cacert string cacert string 🟢 🟢 🟢 🟢 🟢
tls_use_system_ca bool use-system-ca bool 🟢 🟢 🟢 🟢 🟢
tls_server_name string server-name string 🟢 🟢 🟢 🟢 🟢
tls_client_auth string client-auth string 🟢 🟢
tls_node_cert string node-cert string 🟢 🟢
tls_node_key string node-key string 🟢 🟢
tls_internal_port_enabled bool internal-port-enabled bool 🟢 🟢 🟢 🟢 🟢
tls_cert string cert string 🟢 🟢 🟢 🟢 🟢
tls_key string key string 🟢 🟢 🟢 🟢 🟢
--trace
trace float64 ratio float64 🟢 🟢
jaeger.collector string jaeger string 🟢 🟢
datadog.collector string datadog string 🟢 🟢
--vault
vault_addr string addr string 🟢 🟢 🟢 🟢 🟢
vault_roleid_file string role-id-file string 🟢 🟢 🟢 🟢 🟢
vault_secretid_file string secret-id-file string 🟢 🟢 🟢 🟢 🟢
vault_path string path string 🟢 🟢 🟢 🟢 🟢
vault_field string field string 🟢 🟢 🟢 🟢 🟢
vault_format string format string 🟢 🟢 🟢 🟢 🟢

Example

Previously you could use ACL flags like this:

dgraph alpha --acl_secret_file=./secret --acl_access_ttl=21600000000000 --acl_refresh_ttl=2592000000000000

After this PR:

dgraph alpha --acl "secret-file=./secret; access-ttl=6h; refresh-ttl=30d;"

This change is Reviewable

@github-actions github-actions bot added area/enterprise Related to proprietary features area/graphql Issues related to GraphQL support on Dgraph. labels Feb 16, 2021
@karlmcguire karlmcguire changed the title Karl/superflags [Breaking] Consolidate multiple flags into a few SuperFlags Feb 16, 2021
@karlmcguire karlmcguire marked this pull request as draft February 16, 2021 22:51
@karlmcguire karlmcguire marked this pull request as ready for review February 17, 2021 17:05
@karlmcguire karlmcguire added the area/tools Issues related to maintenance tools and CLI. label Feb 17, 2021
Copy link
Contributor Author

@karlmcguire karlmcguire left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 of 103 files reviewed, 11 unresolved discussions (waiting on @danielmai, @karlmcguire, @manishrjain, @martinmr, @pawanrawal, and @vvbalaji-dgraph)


dgraph/cmd/alpha/run.go, line 666 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

ideally, this can just be parsed in the right package instead of here.

Done.


dgraph/cmd/alpha/run.go, line 714 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Ideally, worker options only contains the SuperFlags, and lets the modules do what they need to with them.

Done.


dgraph/cmd/alpha/run.go, line 235 at r4 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

no need to use backticks if it fits in one line.

Done.


edgraph/server.go, line 1197 at r4 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Just ensure that we're not doing this parsing in the critical path.

Done.

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 area/graphql Issues related to GraphQL support on Dgraph. area/tools Issues related to maintenance tools and CLI.
Development

Successfully merging this pull request may close these issues.

3 participants