This document provides an overview of the PARIS recovery framework, its code structure, and key concepts.
PARIS is a tool used for recovering and deploying ChromeOS devices. It is a plan-based system, where each plan is a series of actions that are executed in a specific order. Each action can have conditions that determine whether it should be run, and dependencies on other actions.
The main components of the PARIS framework are located in the go.chromium.org/infra/cros/recovery directory. Here are some of the key subdirectories:
config: This directory contains the configuration for the recovery plans. The config_cros_deploy.go file defines the crosDeployPlan, which is the main plan for deploying ChromeOS devices.internal/execs: This directory contains the executable functions that are run by the actions in the recovery plans. The execs.go file defines the Register function, which is used to register new exec functions. The dut/attributes_execs.go file contains execs related to DUT attributes, such as checking the DUT's pool.tlw: This directory contains the top-level wrapper for the recovery framework. It defines the data structures that are used to represent DUTs and other resources.crosDeployPlan in config/config_cros_deploy.go is an example of a plan.execs.Register function.Based on what we've learned, here is a step-by-step guide on how to add a new check to the PARIS framework:
dut_not_in_pool exec.deployActions function in config/config_cros_deploy.go. The new action should have a descriptive name, a documentation string, the name of the exec function to use, and any necessary arguments.Is not in mp_firmware_testing pool action as a condition to the Verify boot in recovery mode action.make trees to regenerate the configuration tree. This will ensure that your changes are picked up by the framework.make test to run the test suite. This will ensure that your changes haven't introduced any regressions.