{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5430","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5430/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5430/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5430/events","html_url":"https://github.com/cockroachdb/cockroach/pull/5430","id":142238085,"number":5430,"title":"cli: Enable use of environment variable to override configuration flags","user":{"login":"knz","id":642886,"avatar_url":"https://avatars.githubusercontent.com/u/642886?v=3","gravatar_id":"","url":"https://api.github.com/users/knz","html_url":"https://github.com/knz","followers_url":"https://api.github.com/users/knz/followers","following_url":"https://api.github.com/users/knz/following{/other_user}","gists_url":"https://api.github.com/users/knz/gists{/gist_id}","starred_url":"https://api.github.com/users/knz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knz/subscriptions","organizations_url":"https://api.github.com/users/knz/orgs","repos_url":"https://api.github.com/users/knz/repos","events_url":"https://api.github.com/users/knz/events{/privacy}","received_events_url":"https://api.github.com/users/knz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cockroachdb/cockroach/labels/docs-todo","name":"docs-todo","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-03-21T02:24:14Z","updated_at":"2016-04-01T01:55:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/5430","html_url":"https://github.com/cockroachdb/cockroach/pull/5430","diff_url":"https://github.com/cockroachdb/cockroach/pull/5430.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/5430.patch"},"body":"The order of configuration is:\r\n\r\n1. command line flag, if set,\r\n2. env var, if set and valid,\r\n3. default value\r\n\r\nFor each flag \"x\", the env var is COCKROACH_X (\"x\" upper-cased)\r\n\r\nA new CLI command \"env\" dumps all known environment variables.\r\n\r\n**noteworthy**:\r\n\r\n- \"MetricsFrequency\" has been renamed to \"MetricsSampleInterval\"\r\n  (the accompanying env. var. is COCKROACH_METRICS_SAMPLE_INTERVAL)\r\n- the following environment variables have been renamed:\r\n  - ANNOTATE_TRACES -> COCKROACH_ANNOTATE_TRACES\r\n  - RANDOM_SEED -> COCKROACH_RANDOM_SEED\r\n  - ENABLE_LOCAL_CALLS -> COCKROACH_ENABLE_LOCAL_CALLS\r\n\r\nFixes #2706.\r\n\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/cockroachdb/cockroach/5430)\r\n<!-- Reviewable:end -->"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/204205950","html_url":"https://github.com/cockroachdb/cockroach/pull/5430#issuecomment-204205950","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5430","id":204205950,"user":{"login":"tamird","id":1535036,"avatar_url":"https://avatars.githubusercontent.com/u/1535036?v=3","gravatar_id":"","url":"https://api.github.com/users/tamird","html_url":"https://github.com/tamird","followers_url":"https://api.github.com/users/tamird/followers","following_url":"https://api.github.com/users/tamird/following{/other_user}","gists_url":"https://api.github.com/users/tamird/gists{/gist_id}","starred_url":"https://api.github.com/users/tamird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamird/subscriptions","organizations_url":"https://api.github.com/users/tamird/orgs","repos_url":"https://api.github.com/users/tamird/repos","events_url":"https://api.github.com/users/tamird/events{/privacy}","received_events_url":"https://api.github.com/users/tamird/received_events","type":"User","site_admin":false},"created_at":"2016-04-01T01:55:15Z","updated_at":"2016-04-01T01:55:15Z","body":"\n\n\n\nReview status: all files reviewed at latest revision, 13 unresolved discussions.\n\n---\n\n*[cli/flags.go, line 310 \\[r7\\]](https://reviewable.io:443/reviews/cockroachdb/cockroach/5430#-KEEWs-WmF278z_6exBm:-KEEWs-XPHfi2MUbeTMQ:-565536233) ([raw file](https://github.com/cockroachdb/cockroach/blob/c8e4aa42dc75dda9ac77c3c5d252b3ac1d0df21c/cli/flags.go#L310)):*\nlooks like this function just moved - the diff may be smaller if you keep it in its original location. also, the comment has the function name wrong.\n\n---\n\n\n*Comments from the [review on Reviewable.io](https://reviewable.io:443/reviews/cockroachdb/cockroach/5430)*\n<!-- Sent from Reviewable.io -->\n"}}