Skip to content

Fix flaky test_ffill_bfill - #12378

Merged
crusaderky merged 2 commits into
dask:mainfrom
crusaderky:flaky-ffill
May 7, 2026
Merged

crusaderky merged 2 commits into
dask:mainfrom
crusaderky:flaky-ffill

Conversation

@crusaderky

@crusaderky crusaderky commented May 7, 2026 •

Copy link
Copy Markdown
Collaborator

test_ffill_bfill randomly fails with

E ValueError: All NaN partition encountered in fillna. Try using df.repartition to increase the partition size, or specify limit in fillna.

This is because the test randomly generates the data with an unfixed seed,
which in turn can occasionally generate a partition full of NaNs,
which in turn hits a design choice of dask.dataframe.Series.ffill where you have to explicitly set limit to enable reading from earlier partitions.

(the alternative was to have output partition n statically gain a dependency to input partitions [0, n-1], which is very bad for performance and this is why it's off by default).

@crusaderky crusaderky added dataframe tests Unit tests and/or continuous integration p3 Affects a small number of users or is largely cosmetic labels May 7, 2026
@crusaderky
crusaderky merged commit b05bd69 into dask:main May 7, 2026
24 of 25 checks passed
@crusaderky
crusaderky deleted the flaky-ffill branch May 7, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dataframe p3 Affects a small number of users or is largely cosmetic tests Unit tests and/or continuous integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant