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:
Hugo Hobson 2025-04-01 10:21:30 +01:00 committed by GitHub
parent c6acce9906
commit acc84c2459
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -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:

View File

@ -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: