Skip to content

Commit

Permalink
Fixes too high parallelism in CI (apache#7947)
Browse files Browse the repository at this point in the history
(cherry picked from commit 33a2372)
  • Loading branch information
potiuk authored and kaxil committed Mar 30, 2020
1 parent 3076f7a commit 43b024c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions scripts/ci/in_container/entrypoint_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,15 @@ fi
# shellcheck source=scripts/ci/in_container/configure_environment.sh
. "${MY_DIR}/configure_environment.sh"

if [[ ${CI:=} == "true" && ${RUN_TESTS} == "true" ]] ; then
echo
echo " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo " Setting default parallellism to 4 because we can run out of memory during tests on CI"
echo " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo
export AIRFLOW__CORE__PARALELLISM=4
fi

set +u
# If we do not want to run tests, we simply drop into bash
if [[ "${RUN_TESTS}" == "false" ]]; then
Expand Down
7 changes: 5 additions & 2 deletions tests/jobs/test_backfill_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def test_backfill_multi_dates(self):

end_date = DEFAULT_DATE + datetime.timedelta(days=1)

executor = MockExecutor()
executor = MockExecutor(parallelism=16)
job = BackfillJob(
dag=dag,
start_date=DEFAULT_DATE,
Expand Down Expand Up @@ -710,7 +710,7 @@ def test_backfill_ordered_concurrent_execute(self):

dag.clear()

executor = MockExecutor()
executor = MockExecutor(parallelism=16)
job = BackfillJob(dag=dag,
executor=executor,
start_date=DEFAULT_DATE,
Expand Down Expand Up @@ -1443,7 +1443,10 @@ def test_backfill_run_backwards(self):
dag = self.dagbag.get_dag("test_start_date_scheduling")
dag.clear()

executor = MockExecutor(parallelism=16)

job = BackfillJob(
executor=executor,
dag=dag,
start_date=DEFAULT_DATE,
end_date=DEFAULT_DATE + datetime.timedelta(days=1),
Expand Down

0 comments on commit 43b024c

Please sign in to comment.