Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions airflow/cli/cli_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,28 @@ def string_lower_type(val):
help="The section name",
)

# config lint
ARG_LINT_CONFIG_SECTION = Arg(
("--section",),
help="The section name(s) to lint in the airflow config.",
type=string_list_type,
)
ARG_LINT_CONFIG_OPTION = Arg(
("--option",),
help="The option name(s) to lint in the airflow config.",
type=string_list_type,
)
ARG_LINT_CONFIG_IGNORE_SECTION = Arg(
("--ignore-section",),
help="The section name(s) to ignore to lint in the airflow config.",
type=string_list_type,
)
ARG_LINT_CONFIG_IGNORE_OPTION = Arg(
("--ignore-option",),
help="The option name(s) to ignore to lint in the airflow config.",
type=string_list_type,
)

# kubernetes cleanup-pods
ARG_NAMESPACE = Arg(
("--namespace",),
Expand Down Expand Up @@ -1869,6 +1891,18 @@ class GroupCommand(NamedTuple):
ARG_VERBOSE,
),
),
ActionCommand(
name="lint",
help="lint options for the configuration changes while migrating from Airflow 2.x to Airflow 3.0",
func=lazy_load_command("airflow.cli.commands.remote_commands.config_command.lint_config"),
args=(
ARG_LINT_CONFIG_SECTION,
ARG_LINT_CONFIG_OPTION,
ARG_LINT_CONFIG_IGNORE_SECTION,
ARG_LINT_CONFIG_IGNORE_OPTION,
ARG_VERBOSE,
),
),
)

KUBERNETES_COMMANDS = (
Expand Down
Loading