Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] @datagen_overrides seed is sticky when it shouldn't be #10108

Closed
abellina opened this issue Dec 28, 2023 · 0 comments · Fixed by #10109
Closed

[BUG] @datagen_overrides seed is sticky when it shouldn't be #10108

abellina opened this issue Dec 28, 2023 · 0 comments · Fixed by #10109
Assignees
Labels
bug Something isn't working test Only impacts tests

Comments

@abellina
Copy link
Collaborator

This bug has been there since the introduction of @datagen_overrides. Because of the global state in conftest.py the seed has to be reset each time a test instance is configured to an initial value, otherwise we keep the old datagen seed. The bug is that currently this seed isn't being reset to the initial value, so if you had a test with @datagen_overrides that preceded your test that didn't override, you'd still get this overwritten value.

To make matters worse, DATAGEN_SEED_OVERRIDE=X would still show. This is because this has to be rendered ahead of time in order to allow for tests that are divided into multiple python processes (xdist). So it followed a different path, showing the incorrect seed.

I found this while working on #10089 by adding a print statement in conftest.py:get_datagen_seed. This function is called from datagen.py to get the seed. I found this was returning the wrong value.

@abellina abellina added bug Something isn't working ? - Needs Triage Need team to review and classify test Only impacts tests labels Dec 28, 2023
@abellina abellina self-assigned this Dec 28, 2023
@abellina abellina removed the ? - Needs Triage Need team to review and classify label Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test Only impacts tests
Projects
None yet
1 participant