Skip to content

Commit

Permalink
makes enable-hns default false (#2395)
Browse files Browse the repository at this point in the history
* makes enable-hns default false

* makes enable-hns default false

* makes enable-hns default false

* fixes config test

* checking flakiness
  • Loading branch information
ankitaluthra1 authored Aug 27, 2024
1 parent a80dd0d commit c36327d
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cfg/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func BindFlags(v *viper.Viper, flagSet *pflag.FlagSet) error {
return err
}

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

if err := v.BindPFlag("enable-hns", flagSet.Lookup("enable-hns")); err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions cmd/config_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,14 +551,14 @@ func TestValidateConfigFile_EnableHNSConfigSuccessful(t *testing.T) {
name: "empty_config_file",
configFile: "testdata/empty_file.yaml",
expectedConfig: &cfg.Config{
EnableHns: true,
EnableHns: false,
},
},
{
name: "valid_config_file",
configFile: "testdata/valid_config.yaml",
expectedConfig: &cfg.Config{
EnableHns: false,
EnableHns: true,
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ func TestArgsParsing_EnableHNSFlags(t *testing.T) {
{
name: "default",
args: []string{"gcsfuse", "abc", "pqr"},
expectedEnableHNS: true,
expectedEnableHNS: false,
},
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/testdata/valid_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ file-system:
temp-dir: ~/temp
list:
enable-empty-managed-folders: true
enable-hns: false
enable-hns: true
2 changes: 1 addition & 1 deletion internal/config/mount_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const (
DefaultEnableEmptyManagedFoldersListing = false
DefaultGrpcConnPoolSize = 1
DefaultAnonymousAccess = false
DefaultEnableHNS = true
DefaultEnableHNS = false
DefaultIgnoreInterrupts = true
DefaultPrometheusPort = 0

Expand Down
2 changes: 1 addition & 1 deletion internal/config/yaml_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func validateDefaultConfig(t *testing.T, mountConfig *MountConfig) {
assert.Equal(t, false, mountConfig.FileCacheConfig.DisableODirect)
assert.Equal(t, 1, mountConfig.GCSConnection.GRPCConnPoolSize)
assert.False(t, mountConfig.GCSAuth.AnonymousAccess)
assert.True(t, bool(mountConfig.EnableHNS))
assert.False(t, bool(mountConfig.EnableHNS))
assert.True(t, mountConfig.FileSystemConfig.IgnoreInterrupts)
assert.False(t, mountConfig.FileSystemConfig.DisableParallelDirops)
assert.Equal(t, DefaultKernelListCacheTtlSeconds, mountConfig.KernelListCacheTtlSeconds)
Expand Down
2 changes: 1 addition & 1 deletion tools/config-gen/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
flag-name: "enable-hns"
type: "bool"
usage: "Enables support for HNS buckets"
default: true
default: false

- config-path: "file-cache.cache-file-for-range-read"
flag-name: "cache-file-for-range-read"
Expand Down

0 comments on commit c36327d

Please sign in to comment.