Skip to content

Commit

Permalink
Fixes too high parallelism in CI (#7947)
Browse files Browse the repository at this point in the history
  • Loading branch information
potiuk committed Mar 28, 2020
1 parent 7239d9a commit 33a2372
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 @@ -193,6 +193,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 @@ -166,7 +166,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 @@ -714,7 +714,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 @@ -1410,7 +1410,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 33a2372

Please sign in to comment.