-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove SparkInK8s internal deprecations #38777
Remove SparkInK8s internal deprecations #38777
Conversation
FYI when executing pytest for the first time, Given
|
I guess until Airflow 3 we still need to have SubDag operator into the We need to take into the account that some of the test was created years ago, and TBH most of the tests do not require a Dag and especially DagBag for the tests, so it could be rewritten to not to use this parts. And last but not least, many tests use generic parts which are now deprecated, e.g. create DagRun without providing run_id. That mean a lot of test could be fixed by the same pattern. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And for about this PR, I have no objection to merge it. There are some of from this list might be False Negative (it is originally raise an error during the creation of this list) or already fixed somewhere
And if someone interested why check failed into the most test case into the The problem with mocking deprecated module instead of actual use in airflow/tests/providers/cncf/kubernetes/operators/test_spark_kubernetes.py Lines 197 to 198 in ec6091d
================================================ short test summary info ================================================
FAILED tests/providers/cncf/kubernetes/operators/test_spark_kubernetes.py::TestSparkKubernetesOperator::test_create_application_from_yaml_json - airflow.exceptions.AirflowProviderDeprecationWarning: This module is deprecated. Please use `airflow.providers.cncf.kubernetes.operators.pod` instead.
FAILED tests/providers/cncf/kubernetes/operators/test_spark_kubernetes.py::TestSparkKubernetesOperator::test_new_template_from_yaml - airflow.exceptions.AirflowProviderDeprecationWarning: This module is deprecated. Please use `airflow.providers.cncf.kubernetes.operators.pod` instead.
FAILED tests/providers/cncf/kubernetes/operators/test_spark_kubernetes.py::TestSparkKubernetesOperator::test_template_spec - airflow.exceptions.AirflowProviderDeprecationWarning: This module is deprecated. Please use `airflow.providers.cncf.kubernetes.operators.pod` instead.
FAILED tests/providers/cncf/kubernetes/operators/test_spark_kubernetes.py::TestSparkKubernetesOperator::test_env - airflow.exceptions.AirflowProviderDeprecationWarning: This module is deprecated. Please use `airflow.providers.cncf.kubernetes.operators.pod` instead.
FAILED tests/providers/cncf/kubernetes/operators/test_spark_kubernetes.py::TestSparkKubernetesOperator::test_volume - airflow.exceptions.AirflowProviderDeprecationWarning: This module is deprecated. Please use `airflow.providers.cncf.kubernetes.operators.pod` instead.
FAILED tests/providers/cncf/kubernetes/operators/test_spark_kubernetes.py::TestSparkKubernetesOperator::test_pull_secret - airflow.exceptions.AirflowProviderDeprecationWarning: This module is deprecated. Please use `airflow.providers.cncf.kubernetes.operators.pod` instead.
FAILED tests/providers/cncf/kubernetes/operators/test_spark_kubernetes.py::TestSparkKubernetesOperator::test_affinity - airflow.exceptions.AirflowProviderDeprecationWarning: This module is deprecated. Please use `airflow.providers.cncf.kubernetes.operators.pod` instead.
FAILED tests/providers/cncf/kubernetes/operators/test_spark_kubernetes.py::TestSparkKubernetesOperator::test_toleration - airflow.exceptions.AirflowProviderDeprecationWarning: This module is deprecated. Please use `airflow.providers.cncf.kubernetes.operators.pod` instead.
FAILED tests/providers/cncf/kubernetes/operators/test_spark_kubernetes.py::TestSparkKubernetesOperator::test_get_logs_from_driver - airflow.exceptions.AirflowProviderDeprecationWarning: This module is deprecated. Please use `airflow.providers.cncf.kubernetes.operators.pod` instead.
============================================= 9 failed, 1 warning in 7.30s ============================================== |
Part of the fixes for #38642
I executed
pytest tests/providers/cncf/kubernetes/operators/test_spark_kubernetes.py::test_spark_kubernetes_operator
andpytest tests/providers/cncf/kubernetes/operators/test_spark_kubernetes.py::test_spark_kubernetes_operator_hook
. Both are running successfully without warnings. Executing with args-W default
does raise warnings but they are not emitted into warnings.txt, so I believe they are warnings from 3rd party libraries.Hence I believe these 2 are false alarms and can be removed safely, but If that's not the case, I'm happy to fix the warnings for these 2 tests in this PR