forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not reset DB in CI tests if not needed
The apache#43979 refactoring of tests caused unnecessary database reset attempts in tests that did not require it or had no database set. This caused unnecessary `airflow db reset` in collection-only tests with removed non-ARM packages, but also it caused the error printed in non-DB tests: ``` Resetting the DB [2024-11-16T03:50:37.812+0000] {cli_parser.py:67} ERROR - Failed to load CLI commands from executor: LocalExecutor Traceback (most recent call last): File "/opt/airflow/airflow/cli/cli_parser.py", line 64, in <module> executor, _ = ExecutorLoader.import_executor_cls(executor_name) File "/opt/airflow/airflow/executors/executor_loader.py", line 285, in import_executor_cls return _import_and_validate(executor_name.module_path), executor_name.connector_source File "/opt/airflow/airflow/executors/executor_loader.py", line 282, in _import_and_validate cls.validate_database_executor_compatibility(executor) File "/opt/airflow/airflow/executors/executor_loader.py", line 327, in validate_database_executor_compatibility if engine.dialect.name == "sqlite": AttributeError: 'NoneType' object has no attribute 'dialect' [2024-11-16T03:50:37.813+0000] {cli_parser.py:68} ERROR - Ensure all dependencies are met and try again. If using a Celery based executor install a 3.3.0+ version of the Celery provider. If using a Kubernetes executor, install a 7.4.0+ version of the CNCF provider Traceback (most recent call last): File "/usr/local/bin/airflow", line 8, in <module> sys.exit(main()) File "/opt/airflow/airflow/__main__.py", line 62, in main args.func(args) File "/opt/airflow/airflow/cli/cli_config.py", line 49, in command return func(*args, **kwargs) File "/opt/airflow/airflow/utils/providers_configuration_loader.py", line 55, in wrapped_function return func(*args, **kwargs) File "/opt/airflow/airflow/cli/commands/db_command.py", line 63, in resetdb print(f"DB: {settings.engine.url!r}") AttributeError: 'NoneType' object has no attribute 'url' Database has been reset ``` The fix is to add `--no-db-reset` in collection tests and force db_reset = False in case `skip_db_tests` is set to True.
- Loading branch information
Showing
18 changed files
with
391 additions
and
369 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
706a617a798c2d5a0f64d356cab3ef96 | ||
369acf181f53ebddbaf928f4743e0014 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6821f495c57914229fd83e5ab850e38f | ||
3c833010b2dc87dd333e69700a1b7073 |
102 changes: 53 additions & 49 deletions
102
dev/breeze/doc/images/output_testing_core-integration-tests.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion
2
dev/breeze/doc/images/output_testing_core-integration-tests.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
7eb5ce3a9b1e3aa95bfe0bc66f2ba06a | ||
5894cf887269f4cc5da2b0c5fb015685 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
08246b54e85155d59d8a2626cea6e093 | ||
802a9c84c375b0c45706af3586080783 |
104 changes: 54 additions & 50 deletions
104
dev/breeze/doc/images/output_testing_providers-integration-tests.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion
2
dev/breeze/doc/images/output_testing_providers-integration-tests.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
aee7e27c7ce9648aec22cb696da4afb6 | ||
b49b90e4e681c9a0d66187bc086437e0 |
206 changes: 105 additions & 101 deletions
206
dev/breeze/doc/images/output_testing_providers-tests.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
52adde67bdd7a3a4c9c62eaa941bd317 | ||
7e368768c7b33789e242b4fc1bd4dfe9 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
e9585ade0c8a09928c98991c55579621 | ||
7fc5b82d9be11a1262c99f0b58a31fa7 |
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