Skip to content
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

Do not reset DB in CI tests if not needed #44084

Merged
merged 1 commit into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions dev/breeze/doc/images/output-commands.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions dev/breeze/doc/images/output_shell.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 dev/breeze/doc/images/output_shell.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
706a617a798c2d5a0f64d356cab3ef96
369acf181f53ebddbaf928f4743e0014
16 changes: 8 additions & 8 deletions dev/breeze/doc/images/output_start-airflow.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 dev/breeze/doc/images/output_start-airflow.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6821f495c57914229fd83e5ab850e38f
3c833010b2dc87dd333e69700a1b7073
102 changes: 53 additions & 49 deletions 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.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7eb5ce3a9b1e3aa95bfe0bc66f2ba06a
5894cf887269f4cc5da2b0c5fb015685
182 changes: 93 additions & 89 deletions dev/breeze/doc/images/output_testing_core-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 dev/breeze/doc/images/output_testing_core-tests.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
08246b54e85155d59d8a2626cea6e093
802a9c84c375b0c45706af3586080783
104 changes: 54 additions & 50 deletions 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.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
aee7e27c7ce9648aec22cb696da4afb6
b49b90e4e681c9a0d66187bc086437e0
206 changes: 105 additions & 101 deletions 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.
2 changes: 1 addition & 1 deletion dev/breeze/doc/images/output_testing_providers-tests.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
52adde67bdd7a3a4c9c62eaa941bd317
7e368768c7b33789e242b4fc1bd4dfe9
94 changes: 49 additions & 45 deletions dev/breeze/doc/images/output_testing_system-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 dev/breeze/doc/images/output_testing_system-tests.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e9585ade0c8a09928c98991c55579621
7fc5b82d9be11a1262c99f0b58a31fa7
4 changes: 3 additions & 1 deletion dev/breeze/src/airflow_breeze/commands/common_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,11 @@ def _set_default_from_parent(ctx: click.core.Context, option: click.core.Option,
)
option_db_reset = click.option(
"-d",
"--db-reset",
"--db-reset/--no-db-reset",
help="Reset DB when entering the container.",
is_flag=True,
default=False,
show_default=True,
envvar="DB_RESET",
)
option_debug_resources = click.option(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ def _run_test_command(
use_packages_from_dist=use_packages_from_dist,
use_xdist=use_xdist,
run_tests=True,
db_reset=db_reset,
db_reset=db_reset if not skip_db_tests else False,
)
rebuild_or_pull_ci_image_if_needed(command_params=shell_params)
fix_ownership_using_docker()
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/testing/run_unit_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function core_tests() {
set +x
elif [[ "${TEST_SCOPE}" == "ARM collection" ]]; then
set -x
breeze testing core-tests --collect-only --remove-arm-packages --test-type "All"
breeze testing core-tests --collect-only --remove-arm-packages --test-type "All" --no-db-reset
RESULT=$?
set +x
elif [[ "${TEST_SCOPE}" == "System" ]]; then
Expand Down Expand Up @@ -102,7 +102,7 @@ function providers_tests() {
set +x
elif [[ "${TEST_SCOPE}" == "ARM collection" ]]; then
set -x
breeze testing providers-tests --collect-only --remove-arm-packages --test-type "All"
breeze testing providers-tests --collect-only --remove-arm-packages --test-type "All" --no-db-reset
RESULT=$?
set +x
elif [[ "${TEST_SCOPE}" == "System" ]]; then
Expand Down