Andrushika commented on code in PR #74229:
URL: https://github.com/apache/airflow/pull/74229#discussion_r4310841583


##########
dev/breeze/src/airflow_breeze/commands/verify_commands.py:
##########
@@ -86,9 +103,20 @@ def _git(*args: str) -> list[str]:
     return tuple(sorted(set(changed)))
 
 
+def run_verification_commands(commands: list[str]) -> list[int]:
+    """Run each command in a shell from the repository root, carrying on after 
a failure."""
+    return_codes = []
+    for index, command in enumerate(commands, start=1):
+        get_console().print(f"\n[info]({index}/{len(commands)}) 
{escape(command)}[/]\n", soft_wrap=True)
+        return_codes.append(
+            run_command(["bash", "-c", command], check=False, 
cwd=AIRFLOW_ROOT_PATH).returncode
+        )
+    return return_codes
+
+
 @main.command(
     name="verify",
-    help="List the local verification CI would require for the current 
changes. Nothing is executed.",
+    help="Run the local verification CI would require for the current changes. 
Pass --dry-run to only list it.",

Review Comment:
   Makes sense. `breeze verify` lists by default again, and `--run` runs the 
list. I also dropped the AGENTS.md and publish-changes skill changes, so they 
stay as on main.
   



##########
dev/breeze/src/airflow_breeze/commands/verify_commands.py:
##########
@@ -86,9 +103,20 @@ def _git(*args: str) -> list[str]:
     return tuple(sorted(set(changed)))
 
 
+def run_verification_commands(commands: list[str]) -> list[int]:
+    """Run each command in a shell from the repository root, carrying on after 
a failure."""
+    return_codes = []
+    for index, command in enumerate(commands, start=1):
+        get_console().print(f"\n[info]({index}/{len(commands)}) 
{escape(command)}[/]\n", soft_wrap=True)
+        return_codes.append(
+            run_command(["bash", "-c", command], check=False, 
cwd=AIRFLOW_ROOT_PATH).returncode

Review Comment:
   The commands need shell syntax (`cd ... &&`, the loop over shared dists), so 
I quote the values with `shlex.quote` / `shlex.join` where 
`verification_plan.py` builds them. A test passes a test-types value with `[`, 
`$HOME` and `;` through bash and checks it comes back unchanged. Ctrl+C now 
stops the run, prints what failed and what did not finish, and exits 130.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to