Cloud Operations Sandbox is an open source collection of tools that helps practitioners to learn O11y and R9y practices from Google and apply them using Cloud Operations suite of tools.
In this PR, we support both config-based and implementation-based SRE Recipe implementation.
Recipe Types
The config-based SRE Recipe makes it fast to iterate and add new SRE Recipes, as discussed in the internal design review. It also helps reduce redundant, and hacky code.
The implementation-based SRE Recipe is kept for backward compatibility and allows for complex implementation needs that config-based SRE Recipe cannot do.
Documentations are added for both, with support for hiding/disabling recipes.
Refactoring
Migrated all existing SRE Recipe implementation to config-based YAML recipes
Added one dummy implementation-based recipe for future reference.
Updated sandboxctl to support running both types of recipes, using the samesandboxctl syntax right now.
Refactored generic, reusable shell commands to a standalone utils file, instead of putting them as static methods in (conceptually irrelevant) recipe classes.
Future Work
I have native validation tests for config-based recipes themselves during runtime as of now. Since this PR is getting too large, I plan to have a dedicated PR for adding integration tests for config validations during e2e CI and release.
Many SRE Recipes (except the one added in #817) don't have integration tests either, so tests for SRE Recipes prob deserve a new PR and teamwork for the future anyways.
Manually verified all sandboxctl sre-recipes command and sandboxctl describe still work as intended.
In this PR, we support both config-based and implementation-based SRE Recipe implementation.
Recipe Types
Refactoring
sandboxctl
to support running both types of recipes, using the samesandboxctl
syntax right now.utils
file, instead of putting them as static methods in (conceptually irrelevant) recipe classes.Future Work
I have native validation tests for config-based recipes themselves during runtime as of now. Since this PR is getting too large, I plan to have a dedicated PR for adding integration tests for config validations during e2e CI and release.
Many SRE Recipes (except the one added in #817) don't have integration tests either, so tests for SRE Recipes prob deserve a new PR and teamwork for the future anyways.
Manually verified all
sandboxctl sre-recipes
command andsandboxctl describe
still work as intended.