Skip to content

Commit dc301db

Browse files
authored
[config] Change config type from bool to coerce_bool (#2836)
- This removes coerce_bool usage warning when server starts
1 parent 42f025c commit dc301db

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

desktop/libs/azure/src/azure/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import logging
1919
import sys
2020

21-
from desktop.lib.conf import Config, UnspecifiedConfigSection, ConfigSection, coerce_password_from_script
21+
from desktop.lib.conf import Config, UnspecifiedConfigSection, ConfigSection, coerce_password_from_script, coerce_bool
2222
from desktop.lib.idbroker import conf as conf_idbroker
2323

2424
from hadoop import core_site
@@ -146,7 +146,7 @@ def get_default_abfs_fs():
146146
members=dict(
147147
ENABLE_DEFAULTFS_FROM_CORESITE=Config(
148148
key="enable_defaultfs_from_coresite",
149-
type=bool,
149+
type=coerce_bool,
150150
default=True,
151151
help="Enable this param to use the defaultFS from core-site.xml"),
152152
FS_DEFAULTFS=Config("fs_defaultfs", help="abfs://<container_name>@<account_name>.dfs.core.windows.net", type=str, default=None),

desktop/libs/indexer/src/indexer/conf.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import os
2222
import sys
2323

24-
from desktop.lib.conf import Config
24+
from desktop.lib.conf import Config, coerce_bool
2525
from libsolr import conf as libsolr_conf
2626
from libzookeeper import conf as libzookeeper_conf
2727

@@ -77,14 +77,14 @@ def zkensemble():
7777
ENABLE_NEW_INDEXER = Config(
7878
key="enable_new_indexer",
7979
help=_t("Flag to turn on the new Solr indexer."),
80-
type=bool,
80+
type=coerce_bool,
8181
default=True
8282
)
8383

8484
ENABLE_SCALABLE_INDEXER = Config(
8585
key="enable_scalable_indexer",
8686
help=_t("Flag to turn on the Morphline Solr indexer."),
87-
type=bool,
87+
type=coerce_bool,
8888
default=True
8989
)
9090

@@ -112,42 +112,42 @@ def zkensemble():
112112
ENABLE_SQOOP = Config(
113113
key="enable_sqoop",
114114
help=_t("Flag to turn on Sqoop imports."),
115-
type=bool,
115+
type=coerce_bool,
116116
default=True
117117
)
118118

119119
ENABLE_KAFKA = Config(
120120
key="enable_kafka",
121121
help=_t("Flag to turn on Kafka imports."),
122-
type=bool,
122+
type=coerce_bool,
123123
default=False
124124
)
125125

126126
ENABLE_FIELD_EDITOR = Config(
127127
key="enable_field_editor",
128128
help=_t("Flag to turn on the SQL/Morphline field editor."),
129-
type=bool,
129+
type=coerce_bool,
130130
default=False
131131
)
132132

133133
ENABLE_ENVELOPE = Config(
134134
key="enable_envelope",
135135
help=_t("Flag to turn on Envelope based jobs."),
136-
type=bool,
136+
type=coerce_bool,
137137
default=False
138138
)
139139

140140
ENABLE_ALTUS = Config(
141141
key="enable_altus",
142142
help=_t("Flag to turn on Altus imports."),
143-
type=bool,
143+
type=coerce_bool,
144144
default=False
145145
)
146146

147147
ENABLE_DIRECT_UPLOAD = Config(
148148
key="enable_direct_upload",
149149
help=_t("Flag to turn on the direct upload of a small file."),
150-
type=bool,
150+
type=coerce_bool,
151151
default=True
152152
)
153153

0 commit comments

Comments
 (0)