-
Notifications
You must be signed in to change notification settings - Fork 551
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
Fix autohealing policy update logic. #4264
base: master
Are you sure you want to change the base?
Conversation
Awesome thanks! Do you think some tests can be added, or would you like me to just merge as-is. |
Thanks for asking! Looking into this made me realize that I need to update the instance group creation path as well as the update path, now that clusterfuzz/src/clusterfuzz/_internal/cron/manage_vms.py Lines 308 to 312 in d5d4865
We do have tests for config parsing: clusterfuzz/src/clusterfuzz/_internal/tests/core/google_cloud_utils/compute_engine_projects_test.py Lines 24 to 28 in d5d4865
But they do not cover auto-healing policies: clusterfuzz/configs/test/gce/clusters.yaml Lines 16 to 30 in d5d4865
I can fix that. Now, there exists a Sadly I could not get it to run on my machine.
Both ran 0 tests. It seems like it covers applying the auto-healing policy: clusterfuzz/src/clusterfuzz/_internal/tests/core/infra/cron/manage_vms_test.py Lines 30 to 39 in 677920b
Which is then checked later: clusterfuzz/src/clusterfuzz/_internal/tests/core/infra/cron/manage_vms_test.py Lines 710 to 716 in 677920b
Overall the tests are for OSS-Fuzz code, which relies I think I should indeed add tests for the non-OSS-Fuzz case, but I'll need some help figuring out how to run the tests and it will take me a while to get to doing it. |
OK I suppose this is fine to merge now. |
Will do as soon as I stabilize the cronjob metrics |
Please don't merge this yet!
|
There are two logic fixes:
camelCase
, notsnake_case
.It is only an error to supply a single field in the config, but we may legitimately find a single field needs updating.
Also moved config validation to loading time. It would likely be best to explode if the auto-healing policy in the config has a single field set, instead of ignoring it with a warning, but this preserves behavior for now.