hussein-awala commented on code in PR #30734:
URL: https://github.com/apache/airflow/pull/30734#discussion_r1171174451
##########
airflow/operators/bash.py:
##########
@@ -140,15 +141,21 @@ def __init__(
env: dict[str, str] | None = None,
append_env: bool = False,
output_encoding: str = "utf-8",
- skip_exit_code: int = 99,
+ skip_exit_code: int | None = None,
+ skip_on_exit_code: int = 99,
cwd: str | None = None,
**kwargs,
) -> None:
super().__init__(**kwargs)
self.bash_command = bash_command
self.env = env
self.output_encoding = output_encoding
- self.skip_exit_code = skip_exit_code
+ if skip_exit_code is not None:
+ warnings.warn(
+ "skip_exit_code is deprecated. Please use skip_on_exit_code",
DeprecationWarning, stacklevel=2
+ )
+ self.skip_on_exit_code = skip_exit_code
+ self.skip_on_exit_code = skip_on_exit_code
Review Comment:
I think `self.skip_on_exit_code = skip_on_exit_code` override
`self.skip_on_exit_code = skip_exit_code` and replace it by `None`, you need to
put it in `else`
--
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]