-
Notifications
You must be signed in to change notification settings - Fork 629
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
add a commit hook which compare tests in Nightly and all non-ignored tests #2736
Comments
This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. |
Shouldn't we just add this to CI? @ailisp what is the status of this issue? |
@bowenwang1996 I believe this is still nice to have. Yeah it should be part of CI, perhaps some kind of bot, so that if you add an expensive test or a test under pytest dir, a script should check complete_nayduck_set.txt and remind if it's not added |
Just to confirm that I understand what this issue is about. On high level the request is to list all |
@mina86 yes |
On high level, this simply lists all pytest/tests/**/*.py files and checks whether they are listed somewhere in nightly/*.txt files. The end goal is to have this as a required check before a commit is accepted so that no pytest’s are forgotten. Currently though, there are 18 files which the script complains about. The output of the script is: Found 18 pytest files (i.e. Python files in pytest/tests directory) which are not included in any of the nightly/*.txt files: - pytest/tests/adversarial/gc_rollback.py - pytest/tests/delete_remote_nodes.py - pytest/tests/sanity/concurrent_function_calls.py - pytest/tests/sanity/proxy_example.py - pytest/tests/sanity/restart.py - pytest/tests/sanity/rpc_finality.py - pytest/tests/sanity/rpc_tx_submission.py - pytest/tests/sanity/state_migration.py - pytest/tests/stress/hundred_nodes/100_node_block_production.py - pytest/tests/stress/hundred_nodes/block_chunks.py - pytest/tests/stress/hundred_nodes/collect_logs.py - pytest/tests/stress/hundred_nodes/create_gcloud_image.py - pytest/tests/stress/hundred_nodes/create_prometheus_targets.py - pytest/tests/stress/hundred_nodes/node_rotation.py - pytest/tests/stress/hundred_nodes/start_100_nodes.py - pytest/tests/stress/hundred_nodes/watch_fork.py - pytest/tests/stress/network_stress.py - pytest/tests/stress/saturate_routing_table.py Add the tests to one of the lists in nightly/*.txt files. For example as: pytest adversarial/gc_rollback.py If the test is temporarily disabled, add it to one of the files with an appropriate TODO comment. For example: # TODO(near#1234): Enable the test again once <some condition> # pytest adversarial/gc_rollback.py Note that the TODO comment must reference a GitHub issue (i.e. must contain a #<number> string). If the file is not a test but a helper library, consider moving it out of the pytest/tests directory to pytest/lib or add it to HELPER_SCRIPTS list at the top of scripts/check_pytests.py file. Before this check is incorporated in checks pipeline, the above needs to be resolved. Issue: near#2736
On high level, this simply lists all pytest/tests/**/*.py files and checks whether they are listed somewhere in nightly/*.txt files. The end goal is to have this as a required check before a commit is accepted so that no pytest’s are forgotten. Currently though, there are 10 files which the script complains about. The output of the script is: Found 10 pytest files (i.e. Python files in pytest/tests directory) which are not included in any of the nightly/*.txt files: - pytest/tests/adversarial/gc_rollback.py - pytest/tests/delete_remote_nodes.py - pytest/tests/sanity/concurrent_function_calls.py - pytest/tests/sanity/proxy_example.py - pytest/tests/sanity/restart.py - pytest/tests/sanity/rpc_finality.py - pytest/tests/sanity/rpc_tx_submission.py - pytest/tests/sanity/state_migration.py - pytest/tests/stress/network_stress.py - pytest/tests/stress/saturate_routing_table.py Add the tests to one of the lists in nightly/*.txt files. For example as: pytest sanity/rpc_tx_submission.py If the test is temporarily disabled, add it to one of the files with an appropriate TODO comment. For example: # TODO(near#1234): Enable the test again once <some condition> # pytest sanity/rpc_tx_submission.py Note that the TODO comment must reference a GitHub issue (i.e. must contain a #<number> string). If the file is not a test but a helper library, consider moving it out of the pytest/tests directory to pytest/lib or add it to HELPER_SCRIPTS list at the top of scripts/check_pytests.py file. Before this check is incorporated in checks pipeline, the above needs to be resolved. Issue: near#2736
On high level, this simply lists all pytest/tests/**/*.py files and checks whether they are listed somewhere in nightly/*.txt files. The end goal is to have this as a required check before a commit is accepted so that no pytest’s are forgotten. Currently though, there are 10 files which the script complains about. The output of the script is: Found 9 pytest files (i.e. Python files in pytest/tests directory) which are not included in any of the nightly/*.txt files: - pytest/tests/adversarial/gc_rollback.py - pytest/tests/sanity/concurrent_function_calls.py - pytest/tests/sanity/proxy_example.py - pytest/tests/sanity/restart.py - pytest/tests/sanity/rpc_finality.py - pytest/tests/sanity/rpc_tx_submission.py - pytest/tests/sanity/state_migration.py - pytest/tests/stress/network_stress.py - pytest/tests/stress/saturate_routing_table.py Add the tests to one of the lists in nightly/*.txt files. For example as: pytest sanity/rpc_tx_submission.py If the test is temporarily disabled, add it to one of the files with an appropriate TODO comment. For example: # TODO(near#1234): Enable the test again once <some condition> # pytest sanity/rpc_tx_submission.py Note that the TODO comment must reference a GitHub issue (i.e. must contain a #<number> string). If the file is not a test but a helper library, consider moving it out of the pytest/tests directory to pytest/lib or add it to HELPER_SCRIPTS list at the top of scripts/check_pytests.py file. Before this check is incorporated in checks pipeline, the above needs to be resolved. Issue: near#2736
On high level, this simply lists all pytest/tests/**/*.py files and checks whether they are listed somewhere in nightly/*.txt files. The end goal is to have this as a required check before a commit is accepted so that no pytest’s are forgotten. Currently though, there are 10 files which the script complains about. The output of the script is: Found 9 pytest files (i.e. Python files in pytest/tests directory) which are not included in any of the nightly/*.txt files: - pytest/tests/adversarial/gc_rollback.py - pytest/tests/sanity/concurrent_function_calls.py - pytest/tests/sanity/proxy_example.py - pytest/tests/sanity/restart.py - pytest/tests/sanity/rpc_finality.py - pytest/tests/sanity/rpc_tx_submission.py - pytest/tests/sanity/state_migration.py - pytest/tests/stress/network_stress.py - pytest/tests/stress/saturate_routing_table.py Add the tests to one of the lists in nightly/*.txt files. For example as: pytest sanity/rpc_tx_submission.py If the test is temporarily disabled, add it to one of the files with an appropriate TODO comment. For example: # TODO(near#1234): Enable the test again once <some condition> # pytest sanity/rpc_tx_submission.py Note that the TODO comment must reference a GitHub issue (i.e. must contain a #<number> string). If the file is not a test but a helper library, consider moving it out of the pytest/tests directory to pytest/lib or add it to HELPER_SCRIPTS list at the top of scripts/check_pytests.py file. Before this check is incorporated in checks pipeline, the above needs to be resolved. Issue: near#2736
On high level, this simply lists all `pytest/tests/**/*.py` files and checks whether they are listed somewhere in `nightly/*.txt` files. The end goal is to have this as a required check before a commit is accepted so that no pytest’s are forgotten. Currently though, there are 9 files which the script complains about. The output of the script is: Found 9 pytest files (i.e. Python files in pytest/tests directory) which are not included in any of the nightly/*.txt files: - pytest/tests/adversarial/gc_rollback.py - pytest/tests/sanity/concurrent_function_calls.py - pytest/tests/sanity/proxy_example.py - pytest/tests/sanity/restart.py - pytest/tests/sanity/rpc_finality.py - pytest/tests/sanity/rpc_tx_submission.py - pytest/tests/sanity/state_migration.py - pytest/tests/stress/network_stress.py - pytest/tests/stress/saturate_routing_table.py Add the tests to one of the lists in nightly/*.txt files. For example as: pytest sanity/rpc_tx_submission.py If the test is temporarily disabled, add it to one of the files with an appropriate TODO comment. For example: # TODO(#1234): Enable the test again once <some condition> # pytest sanity/rpc_tx_submission.py Note that the TODO comment must reference a GitHub issue (i.e. must contain a #<number> string). If the file is not a test but a helper library, consider moving it out of the pytest/tests directory to pytest/lib or add it to HELPER_SCRIPTS list at the top of scripts/check_pytests.py file. Before this check is incorporated in checks pipeline, the above needs to be resolved. Issue: #2736
Add the scripts/check_pytest.py to the ‘sanity checks’ pre-commit tests to make sure that all pytest tests are enabled in one of the nightly/*.txt files. Because at the moment there are nine files which do not meet that criteria, add them to nightly/complete_nayduck_set.txt with a comment documenting the state. Issue: near#4552 Fixes: near#2736
) Add the scripts/check_pytest.py to the ‘sanity checks’ pre-commit tests to make sure that all pytest tests are enabled in one of the nightly/*.txt files. Because at the moment there are nine files which do not meet that criteria, add them to nightly/complete_nayduck_set.txt with a comment documenting the state. Issue: #4552 Fixes: #2736
nightly/nayduck.py script supports a `./<path>` syntax for including another file when reading contents of particular file. (This is akin to shell’s `source` command or C’s `#include` directive). Sadly, neither scripts/check_pytests.py nor scripts/check_nightly.py support that syntax. Fix this by making the nayduck.py script easier to import as a library and use it in the aforementioned scripts. While at it, do minor cleanups to scripts/check_nightly.py script and move nightly.py to scripts directory. Issue: near#2736 Issue: near#4552
#4590) nightly/nayduck.py script supports a `./<path>` syntax for including another file when reading contents of particular file. (This is akin to shell’s `source` command or C’s `#include` directive). Sadly, neither scripts/check_pytests.py nor scripts/check_nightly.py support that syntax. Fix this by making the nayduck.py script easier to import as a library and use it in the aforementioned scripts. While at it, do minor cleanups to scripts/check_nightly.py script and move nightly.py to scripts directory. Issue: #2736 Issue: #4552
to make sure no expensive test is forgotten
The text was updated successfully, but these errors were encountered: