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 2022/12/07 14:03:34 UTC
[GitHub] [airflow] ashb opened a new pull request, #28193: Replace freezegun with time-machine
ashb opened a new pull request, #28193:
URL: https://github.com/apache/airflow/pull/28193
The primary driver for this was a niggle that the durations output for
one test was reporting over 52 years:
> 1670340356.40s call tests/jobs/test_base_job.py::TestBaseJob::test_heartbeat
It turns out this was caused by freezegun, but time_machine fixes this.
It also might be a bit faster, but that isn't a noticeable difference for
us. (No runtime difference for the changed files, but it does make
collection quicker: from 10s to 8s)
--
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.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ashb commented on pull request #28193: Replace freezegun with time-machine
Posted by GitBox <gi...@apache.org>.
ashb commented on PR #28193:
URL: https://github.com/apache/airflow/pull/28193#issuecomment-1341179598
It's an odd one: This combo of tests fails locally:
`tests/task/task_runner/test_task_runner.py::TestGetTaskRunner::test_should_support_core_task_runner tests/sensors/test_external_task_sensor.py::TestExternalTaskSensor::test_external_task_sensor_failed_states_as_success`
```
@mock.patch("airflow.task.task_runner.base_task_runner.subprocess")
@mock.patch("airflow.task.task_runner._TASK_RUNNER_NAME", "StandardTaskRunner")
def test_should_support_core_task_runner(self, mock_subprocess):
ti = mock.MagicMock(map_index=-1, run_as_user=None)
ti.get_template_context.return_value = {"ti": ti}
ti.get_dagrun.return_value.get_log_template.return_value.filename = "blah"
local_task_job = mock.MagicMock(task_instance=ti)
task_runner = get_task_runner(local_task_job)
assert "StandardTaskRunner" == task_runner.__class__.__name__
```
I don't quite know _what_ in that test is leaking state either!
--
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.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ashb merged pull request #28193: Replace freezegun with time-machine
Posted by GitBox <gi...@apache.org>.
ashb merged PR #28193:
URL: https://github.com/apache/airflow/pull/28193
--
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.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on pull request #28193: Replace freezegun with time-machine
Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #28193:
URL: https://github.com/apache/airflow/pull/28193#issuecomment-1341124429
My guess is some `tick=False` missing ? The way it runs on CI is that it is "heavy" i.e. things per process run slower even if altogether they run faster, so 1-second time ticks might happen more frequently than when running single tests.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ashb commented on pull request #28193: Replace freezegun with time-machine
Posted by GitBox <gi...@apache.org>.
ashb commented on PR #28193:
URL: https://github.com/apache/airflow/pull/28193#issuecomment-1341227041
OH! Main is broken with that test!
--
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.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ashb commented on pull request #28193: Replace freezegun with time-machine
Posted by GitBox <gi...@apache.org>.
ashb commented on PR #28193:
URL: https://github.com/apache/airflow/pull/28193#issuecomment-1341081900
Ci no likey! Local was fine. Curious.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org