Skip to content

Commit

Permalink
Hide unpublished flags. (#2512)
Browse files Browse the repository at this point in the history
  • Loading branch information
kislaykishore authored Sep 24, 2024
1 parent c5cc97f commit 1178904
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cfg/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,16 @@ func BuildFlagSet(flagSet *pflag.FlagSet) error {

flagSet.BoolP("enable-empty-managed-folders", "", false, "This handles the corner case in listing managed folders. There are two corner cases (a) empty managed folder (b) nested managed folder which doesn't contain any descendent as object. This flag always works in conjunction with --implicit-dirs flag. (a) If only ImplicitDirectories is true, all managed folders are listed other than above two mentioned cases. (b) If both ImplicitDirectories and EnableEmptyManagedFolders are true, then all the managed folders are listed including the above-mentioned corner case. (c) If ImplicitDirectories is false then no managed folders are listed irrespective of enable-empty-managed-folders flag.")

if err := flagSet.MarkHidden("enable-empty-managed-folders"); err != nil {
return err
}

flagSet.BoolP("enable-hns", "", true, "Enables support for HNS buckets")

if err := flagSet.MarkHidden("enable-hns"); err != nil {
return err
}

flagSet.BoolP("enable-nonexistent-type-cache", "", false, "Once set, if an inode is not found in GCS, a type cache entry with type NonexistentType will be created. This also means new file/dir created might not be seen. For example, if this flag is set, and metadata-cache-ttl-secs is set, then if we create the same file/node in the meantime using the same mount, since we are not refreshing the cache, it will still return nil.")

flagSet.BoolP("experimental-enable-json-read", "", false, "By default, GCSFuse uses the GCS XML API to get and read objects. When this flag is specified, GCSFuse uses the GCS JSON API instead.\"")
Expand Down Expand Up @@ -401,6 +409,10 @@ func BuildFlagSet(flagSet *pflag.FlagSet) error {

flagSet.IntP("prometheus-port", "", 0, "Expose Prometheus metrics endpoint on this port and a path of /metrics.")

if err := flagSet.MarkHidden("prometheus-port"); err != nil {
return err
}

flagSet.IntP("rename-dir-limit", "", 0, "Allow rename a directory containing fewer descendants than this limit.")

flagSet.Float64P("retry-multiplier", "", 2, "Param for exponential backoff algorithm, which is used to increase waiting time b/w two consecutive retries.")
Expand Down
3 changes: 3 additions & 0 deletions cfg/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
type: "bool"
usage: "Enables support for HNS buckets"
default: true
hide-flag: true

- config-path: "file-cache.cache-file-for-range-read"
flag-name: "file-cache-cache-file-for-range-read"
Expand Down Expand Up @@ -362,6 +363,7 @@
(b) If both ImplicitDirectories and EnableEmptyManagedFolders are true, then all the managed folders are listed including the above-mentioned corner case.
(c) If ImplicitDirectories is false then no managed folders are listed irrespective of enable-empty-managed-folders flag.
default: false
hide-flag: true

- config-path: "logging.file-path"
flag-name: "log-file"
Expand Down Expand Up @@ -502,6 +504,7 @@
type: "int"
usage: "Expose Prometheus metrics endpoint on this port and a path of /metrics."
default: "0"
hide-flag: true

- config-path: "metrics.stackdriver-export-interval"
flag-name: "stackdriver-export-interval"
Expand Down

0 comments on commit 1178904

Please sign in to comment.