Skip to content

Commit

Permalink
[config] Change config type from bool to coerce_bool (#2836)
Browse files Browse the repository at this point in the history
- This removes coerce_bool usage warning when server starts
  • Loading branch information
Harshg999 committed May 6, 2022
1 parent 42f025c commit dc301db
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions desktop/libs/azure/src/azure/conf.py
Expand Up @@ -18,7 +18,7 @@
import logging
import sys

from desktop.lib.conf import Config, UnspecifiedConfigSection, ConfigSection, coerce_password_from_script
from desktop.lib.conf import Config, UnspecifiedConfigSection, ConfigSection, coerce_password_from_script, coerce_bool
from desktop.lib.idbroker import conf as conf_idbroker

from hadoop import core_site
Expand Down Expand Up @@ -146,7 +146,7 @@ def get_default_abfs_fs():
members=dict(
ENABLE_DEFAULTFS_FROM_CORESITE=Config(
key="enable_defaultfs_from_coresite",
type=bool,
type=coerce_bool,
default=True,
help="Enable this param to use the defaultFS from core-site.xml"),
FS_DEFAULTFS=Config("fs_defaultfs", help="abfs://<container_name>@<account_name>.dfs.core.windows.net", type=str, default=None),
Expand Down
18 changes: 9 additions & 9 deletions desktop/libs/indexer/src/indexer/conf.py
Expand Up @@ -21,7 +21,7 @@
import os
import sys

from desktop.lib.conf import Config
from desktop.lib.conf import Config, coerce_bool
from libsolr import conf as libsolr_conf
from libzookeeper import conf as libzookeeper_conf

Expand Down Expand Up @@ -77,14 +77,14 @@ def zkensemble():
ENABLE_NEW_INDEXER = Config(
key="enable_new_indexer",
help=_t("Flag to turn on the new Solr indexer."),
type=bool,
type=coerce_bool,
default=True
)

ENABLE_SCALABLE_INDEXER = Config(
key="enable_scalable_indexer",
help=_t("Flag to turn on the Morphline Solr indexer."),
type=bool,
type=coerce_bool,
default=True
)

Expand Down Expand Up @@ -112,42 +112,42 @@ def zkensemble():
ENABLE_SQOOP = Config(
key="enable_sqoop",
help=_t("Flag to turn on Sqoop imports."),
type=bool,
type=coerce_bool,
default=True
)

ENABLE_KAFKA = Config(
key="enable_kafka",
help=_t("Flag to turn on Kafka imports."),
type=bool,
type=coerce_bool,
default=False
)

ENABLE_FIELD_EDITOR = Config(
key="enable_field_editor",
help=_t("Flag to turn on the SQL/Morphline field editor."),
type=bool,
type=coerce_bool,
default=False
)

ENABLE_ENVELOPE = Config(
key="enable_envelope",
help=_t("Flag to turn on Envelope based jobs."),
type=bool,
type=coerce_bool,
default=False
)

ENABLE_ALTUS = Config(
key="enable_altus",
help=_t("Flag to turn on Altus imports."),
type=bool,
type=coerce_bool,
default=False
)

ENABLE_DIRECT_UPLOAD = Config(
key="enable_direct_upload",
help=_t("Flag to turn on the direct upload of a small file."),
type=bool,
type=coerce_bool,
default=True
)

Expand Down

0 comments on commit dc301db

Please sign in to comment.