Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Make additional_flags parameter optional in tests/scripts/ci.py
Browse files Browse the repository at this point in the history
This parameter was introduced in
apache#12833, and was passed for all
subcommands defined using `generate_command`.  However, this broke the
`ci.py lint` subcommand.  This PR makes the `additional_flags`
parameter to the `docker` function be optional, to avoid this
breakage.
Lunderberg committed Oct 31, 2022

Verified

This commit was signed with the committer’s verified signature.
abonander Austin Bonander
1 parent 25a0d47 commit f633668
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/scripts/ci.py
Original file line number Diff line number Diff line change
@@ -153,7 +153,7 @@ def docker(
scripts: List[str],
env: Dict[str, str],
interactive: bool,
additional_flags: Dict[str, str],
additional_flags: Optional[Dict[str, str]] = None,
):
"""
Invoke a set of bash scripts through docker/bash.sh
@@ -204,9 +204,10 @@ def docker(
command.append("--env")
command.append(f"{key}={value}")

for key, value in additional_flags.items():
command.append(key)
command.append(value)
if additional_flags is not None:
for key, value in additional_flags.items():
command.append(key)
command.append(value)

SCRIPT_DIR.mkdir(exist_ok=True)

@@ -357,7 +358,7 @@ def generate_command(
help: str,
precheck: Optional[Callable[[], None]] = None,
post_build: Optional[List[str]] = None,
additional_flags: Dict[str, str] = {},
additional_flags: Optional[Dict[str, str]] = None,
):
"""
Helper to generate CLIs that:

0 comments on commit f633668

Please sign in to comment.