mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-11 17:08:23 +00:00
fix(cli): stop deployment config being overwritten by cli defaults (#13036)
`executor_id` and `time_zone` values set in the `deployment` block of a recipe are not being used by `datahub ingest deploy` cli command when deploying recipes. This is because the [cli values take precedence over deployment config](https://github.com/datahub-project/datahub/blob/master/metadata-ingestion/src/datahub/utilities/ingest_utils.py#L63), so where the cli has default values these as always used. Default values should be set in [`DeployOptions`](https://github.com/datahub-project/datahub/blob/master/metadata-ingestion/src/datahub/utilities/ingest_utils.py#L23), not in the cli options.
This commit is contained in:
parent
c6acce9906
commit
acc84c2459
@ -216,9 +216,9 @@ def run(
|
||||
@click.option(
|
||||
"--executor-id",
|
||||
type=str,
|
||||
default="default",
|
||||
help="Executor id to route execution requests to. Do not use this unless you have configured a custom executor.",
|
||||
required=False,
|
||||
default=None,
|
||||
)
|
||||
@click.option(
|
||||
"--cli-version",
|
||||
@ -239,7 +239,7 @@ def run(
|
||||
type=str,
|
||||
help="Timezone for the schedule in 'America/New_York' format. Uses UTC by default.",
|
||||
required=False,
|
||||
default="UTC",
|
||||
default=None,
|
||||
)
|
||||
@click.option(
|
||||
"--debug", type=bool, help="Should we debug.", required=False, default=False
|
||||
@ -255,10 +255,10 @@ def deploy(
|
||||
name: Optional[str],
|
||||
config: str,
|
||||
urn: Optional[str],
|
||||
executor_id: str,
|
||||
executor_id: Optional[str],
|
||||
cli_version: Optional[str],
|
||||
schedule: Optional[str],
|
||||
time_zone: str,
|
||||
time_zone: Optional[str],
|
||||
extra_pip: Optional[str],
|
||||
debug: bool = False,
|
||||
) -> None:
|
||||
|
@ -32,10 +32,10 @@ def deploy_source_vars(
|
||||
name: Optional[str],
|
||||
config: str,
|
||||
urn: Optional[str],
|
||||
executor_id: str,
|
||||
executor_id: Optional[str],
|
||||
cli_version: Optional[str],
|
||||
schedule: Optional[str],
|
||||
time_zone: str,
|
||||
time_zone: Optional[str],
|
||||
extra_pip: Optional[str],
|
||||
debug: bool = False,
|
||||
) -> dict:
|
||||
|
Loading…
x
Reference in New Issue
Block a user