You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/03/20 16:09:03 UTC
[GitHub] [airflow] potiuk commented on a change in pull request #14915: Running tests in parallel
potiuk commented on a change in pull request #14915:
URL: https://github.com/apache/airflow/pull/14915#discussion_r598129070
##########
File path: scripts/ci/testing/ci_run_airflow_testing.sh
##########
@@ -109,66 +66,265 @@ function prepare_tests_to_run() {
fi
readonly DOCKER_COMPOSE_LOCAL
- if [[ -n "${TEST_TYPE=}" ]]; then
- # Handle case where test type is passed from outside
- export TEST_TYPES="${TEST_TYPE}"
+ if [[ -n "${FORCE_TEST_TYPE=}" ]]; then
+ # Handle case where test type is forced from outside
+ export TEST_TYPES="${FORCE_TEST_TYPE}"
fi
if [[ -z "${TEST_TYPES=}" ]]; then
TEST_TYPES="Core Providers API CLI Integration Other WWW"
echo
- echo "Test types not specified. Running all: ${TEST_TYPES}"
+ echo "Test types not specified. Adding all: ${TEST_TYPES}"
echo
fi
- if [[ -n "${TEST_TYPE=}" ]]; then
+ if [[ -z "${FORCE_TEST_TYPE=}" ]]; then
# Add Postgres/MySQL special test types in case we are running several test types
- if [[ ${BACKEND} == "postgres" ]]; then
+ if [[ ${BACKEND} == "postgres" && ${TEST_TYPES} != "Quarantined" ]]; then
TEST_TYPES="${TEST_TYPES} Postgres"
+ echo
+ echo "Added Postgres. Tests to run: ${TEST_TYPES}"
+ echo
fi
- if [[ ${BACKEND} == "mysql" ]]; then
+ if [[ ${BACKEND} == "mysql" && ${TEST_TYPES} != "Quarantined" ]]; then
TEST_TYPES="${TEST_TYPES} MySQL"
+ echo
+ echo "Added MySQL. Tests to run: ${TEST_TYPES}"
+ echo
fi
fi
readonly TEST_TYPES
}
-build_images::prepare_ci_build
+function kill_all_running_docker_containers() {
+ echo
+ echo "${COLOR_BLUE}Kill all running docker containers${COLOR_RESET}"
+ echo
+ # shellcheck disable=SC2046
+ docker kill $(docker ps -q) || true
+}
-build_images::rebuild_ci_image_if_needed_with_group
+function system_prune_docker() {
+ echo
+ echo "${COLOR_BLUE}System-prune docker${COLOR_RESET}"
+ echo
+ docker system prune --force --volumes
+ echo
+}
-prepare_tests_to_run
+function print_available_space_in_host() {
+ echo "${COLOR_BLUE}Print available space${COLOR_RESET}"
+ echo
+ df --human
+}
+function print_available_memory_in_host() {
+ echo
+ echo "${COLOR_BLUE}Print available memory${COLOR_RESET}"
+ echo
+ free --human
+}
-for TEST_TYPE in ${TEST_TYPES}
-do
- start_end::group_start "Running tests ${TEST_TYPE}"
+function get_available_memory_in_docker() {
+ MEMORY_AVAILABLE_FOR_DOCKER=$(docker run --entrypoint /bin/bash \
Review comment:
Ah yeah. I added it already in #14908 but yeah. I can add it here
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org