PrefectHQ
prefect
BlogDocsChangelog

Fix `set_working_directory` to return absolute path

#18932Merged
Comparing
claude/issue-18182-20250912-2137
(
114a558
) with
main
(
3baaf4f
)
CodSpeed Performance Gauge
0%
Untouched
2
Ignored
6

Benchmarks

Passed

bench_task_decorator
benches/bench_tasks.py
CodSpeed Performance Gauge
0%
457.5 µs456.3 µs
bench_import_prefect_flow
benches/bench_import.py
CodSpeed Performance Gauge
0%
1.4 s1.4 s

Ignored

bench_flow_call[options0]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
-4%
162.4 ms168.7 ms
bench_flow_call[options1]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+2%
107.7 ms105.8 ms
bench_import_prefect
benches/bench_import.py
Ignored
CodSpeed Performance Gauge
0%
2.7 ms2.7 ms
bench_task_submit
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
-18%
4.3 ms5.2 ms
bench_flow_decorator
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
-2%
3.9 ms4 ms
bench_task_call
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
+5%
169.9 ms162.2 ms

Commits

Click on a commit to change the comparison range
Base
main
3baaf4f
+0.01%
Fix set_working_directory to return absolute path When set_working_directory returns a relative path, the flow runner fails when trying to change to that directory again, as the working directory has already been changed. This fix makes the function return the absolute path instead, resolving issue #18182. Co-authored-by: Alex Streed <desertaxle@users.noreply.github.com>
a99b1e5
28 days ago
by github-actions[bot]
-0.06%
Add tests for set_working_directory absolute path behavior Added two tests to verify that set_working_directory always returns an absolute path: - Test with relative path input - Test with absolute path input Both tests verify the function returns the absolute path and correctly changes the working directory. Co-authored-by: Alex Streed <desertaxle@users.noreply.github.com>
88c95bb
28 days ago
by github-actions[bot]
+0.21%
Improve set_working_directory test implementation - Use tmpchdir context manager for cleaner directory handling - Remove unnecessary deferred import statements - Add proper Path type hints to tmp_path parameters - Simplify cleanup logic Co-authored-by: nate nowack <zzstoatzz@users.noreply.github.com>
114a558
28 days ago
by github-actions[bot]
© 2025 CodSpeed Technology
Home Terms Privacy Docs