Taragolis commented on code in PR #28996:
URL: https://github.com/apache/airflow/pull/28996#discussion_r1072924681
##########
airflow/providers/docker/operators/docker.py:
##########
@@ -209,6 +212,7 @@ def __init__(
log_opts_max_size: str | None = None,
log_opts_max_file: str | None = None,
ipc_mode: str | None = None,
+ skip_exit_code: int = 99,
Review Comment:
Just a question. Should we actually provide any default value for that? Or
is it user responsibility?
In theory some current users pipelines might return 99 status code
##########
tests/providers/docker/operators/test_docker.py:
##########
@@ -510,6 +511,26 @@ def test_execute_unicode_logs(self):
logging.raiseExceptions = original_raise_exceptions
print_exception_mock.assert_not_called()
+ @parameterized.expand(
+ [
+ (None, 99, AirflowSkipException),
+ ({"skip_exit_code": 100}, 100, AirflowSkipException),
+ ({"skip_exit_code": 100}, 101, AirflowException),
+ ({"skip_exit_code": None}, 99, AirflowException),
+ ]
+ )
+ def test_skip(self, extra_kwargs, actual_exit_code, expected_exc):
Review Comment:
Would be nice also add this kind of test to docker decorator
https://github.com/apache/airflow/blob/4f91931b359f76ae38272c727bfe21a18a470f2b/tests/providers/docker/decorators/test_docker.py#L26
Right not docker decorator tests run under non-mocked environment
--
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]