-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added 'extend_existing' to Sqla Table object (#626)
What is the current behavior? Quite often this test group fails to run in the CI: nox -s "test-3.8(airflow='2.3')" -- --splits 12 --group 1 --cov=src --cov-report=xml --cov-branch With: =========================== short test summary info ============================ FAILED tests/test_example_dags.py::test_example_dag[example_snowflake_partial_table_with_append] ==== 1 failed, 29 passed, 329 deselected, 22 warnings in 294.40s (0:04:54) ===== Even if there were no changes that affected this test/our code-base, for instance: #480 https://github.com/astronomer/astro-sdk/runs/7231300739 closes: #516 What is the new behavior? The issue was with SQLA's reflection cache which keeps track of the tables created and maintains all the tables in a map schema_columns[self.normalize_name(table_name)]. When this test was individually run there are no issues on local since SQLA cache is just initialized just for this test and because of which this was an intermittent issue CI. The fix is to introduce a parameter extend_existing which basically ensures the cache is not used. Ran test multiple time to ensure this is working: https://github.com/astronomer/astro-sdk/actions/runs/2832783413 Does this introduce a breaking change? Nope
- Loading branch information
1 parent
407b47f
commit 4f4d9d6
Showing
4 changed files
with
28 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters