vincbeck commented on PR #38044: URL: https://github.com/apache/airflow/pull/38044#issuecomment-1989245759
The function `_get_test_name` in `tests/system/providers/amazon/aws/utils/__init__.py` return the test file name by looking at the files from `inspect.stack()`. My understanding is `inspect.stack()` returns all files loaded in memory (thus, the test file and all the imports). In order to find the test file, we are using `TEST_FILE_IDENTIFIER` to check whether the file is named like a test file (example_...py or test_...py). In #37947 I added "test" as pattern to check whether a given file is a test file. The problem with "test" is it is too permissive. Basically any files under `/tests` matches it. This is the issue. The consequence is, any system test which need to fetch some external parameter (using SSM) would fail. That explains why some system tests kept succeeding. The reason why these system test failed is `_get_test_name` was not returning the correct system test file name but any random file which than lead to "Could not find the parameter in SSM" because the system test was not providing the correct system test name. -- 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]
