dolfinus commented on code in PR #36303:
URL: https://github.com/apache/airflow/pull/36303#discussion_r1431637548
##########
airflow/providers/ssh/operators/ssh.py:
##########
@@ -156,6 +167,8 @@ def raise_for_status(self, exit_status: int, stderr: bytes,
context=None) -> Non
if context and self.do_xcom_push:
ti = context.get("task_instance")
ti.xcom_push(key="ssh_exit", value=exit_status)
+ if self.skip_on_exit_code is not None and exit_status in
self.skip_on_exit_code:
+ raise AirflowSkipException(f"SSH command returned exit code
{self.skip_on_exit_code}. Skipping.")
Review Comment:
Fixed
##########
docs/apache-airflow/howto/operator/bash.rst:
##########
@@ -79,7 +79,7 @@ Skipping
In general a non-zero exit code produces an AirflowException and thus a task
failure. In cases where it is desirable
to instead have the task end in a ``skipped`` state, you can exit with code
``99`` (or with another exit code if you
-pass ``skip_exit_code``).
+pass ``skip_on_exit_code``).
Review Comment:
Ok
--
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]