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

Use ruff_fix_validity to catch regressions in CI not detected by unit tests #4972

Open
22 of 24 tasks
addisoncrump opened this issue Jun 8, 2023 · 5 comments
Open
22 of 24 tasks

Comments

@addisoncrump
Copy link
Contributor

addisoncrump commented Jun 8, 2023

The fuzzers added in #4822 can be used to catch regressions for which there exists no unit tests (see: #4863 as an example of this; caught by ruff_fix_validity within ~30 seconds). PRs should include a short fuzz run (5-10m) before merging. Failure cases can then be added to the unit test suite.

Before that happens, the following issues (discovered by fuzzing currently and will cause this CI step to fail) should be resolved:

This change should include the following:

  • Caching of the fuzzer corpus, fuzz/corpus/ruff_fix_validity (~20MB)
  • Initialisation of the fuzzer corpus if not present (I will provide an initial corpus)
  • Execution of timeout 10m cargo fuzz run -s none ruff_fix_validity -- -timeout=5 || [[ $? -eq 124 ]] after the fuzz build step

In the future, when parser idempotency is more stable or new fuzzers exist (such as for formatting), this should be included as well.

@addisoncrump
Copy link
Contributor Author

I am happy to craft these changes. 🙂 I just want to make sure that this implementation is sane for the maintainers.

@T-256
Copy link
Contributor

T-256 commented Jun 12, 2024

@addisoncrump
Copy link
Contributor Author

The list here is now very old. There are likely new bugs caught by this beyond what is tracked; the issue is about making sure that the fuzzer is not enabled constantly unnecessarily.

@T-256
Copy link
Contributor

T-256 commented Jun 13, 2024

Correct, sorry for misreading discription.

PRs should include a short fuzz run (5-10m) before merging. Failure cases can then be added to the unit test suite.

I think it's better to use cron jobs workflow instead.

@addisoncrump
Copy link
Contributor Author

As in, a scheduled workflow? Makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants