Skip to main content

Crate doris

Crate doris 

Source

Modulesยง

cache ๐Ÿ”’
The step cache: a step whose key is already stored is not run again.
clean ๐Ÿ”’
Working directories: what is left of a stepโ€™s after it ends, and removing what was kept.
compat ๐Ÿ”’
Compatibility layers: a doris project made from another toolโ€™s config files, for a repo that has none of its own.
config ๐Ÿ”’
Config files: plain data checked against serde types.
cores ๐Ÿ”’
A FuseSoC core index: which core depends on which, read from the .core files under the projectโ€™s cores_root, without running FuseSoC.
enforce ๐Ÿ”’
Enforcing what a step holds from the resource pools.
exec ๐Ÿ”’
Local executor: schedules the step graphs of a runโ€™s jobs together, within a step limit and the resource pools, runs each stepโ€™s services and command as process groups, and measures what each step took.
flows ๐Ÿ”’
Flows own the shape of the work: which steps exist and how they connect.
gc ๐Ÿ”’
Cache garbage collection: runs write GC roots, roots keep cache entries alive, and collection deletes every entry no root reaches. See the bookโ€™s โ€œCache garbage collectionโ€ chapter.
group ๐Ÿ”’
Composite steps: child steps grouped under one name.
lock ๐Ÿ”’
flock locks: the cacheโ€™s, and each jobโ€™s working directoryโ€™s.
measurements ๐Ÿ”’
The measurement store: what each step that ran a process used, kept across runs and machines, and what it suggests each step should hold.
metrics ๐Ÿ”’
What the scheduler measured of a run: the runโ€™s metrics file, and the summary doris run ends with. Each jobโ€™s result file has its own stepsโ€™ measurements too (see flows::StepMetrics).
plugin ๐Ÿ”’
Tool plugins: WebAssembly components, each of which knows one tool.
repo ๐Ÿ”’
Repository discovery: find the project file, then the design files and flow config files it points at.
report ๐Ÿ”’
HTML reports: the parts every flowโ€™s report shares. A report page is one self-contained file with its style inline, made only from result files. Only the metrics page has scripts, and what it loads is written beside it (see the bookโ€™s โ€œResults and reportingโ€ chapter).
select ๐Ÿ”’
Choosing jobs: the attributes each planned job has, the KEY=GLOB filters that match them, and the designs and job IDs a command line names.
serve ๐Ÿ”’
The report server: doris report view. It serves the reports over HTTP on the loopback interface and makes every page when it is asked for, from the result files in the scratch directory and the results kept in GC roots. Nothing is written, so a page always has this dorisโ€™s layout, however old the run.
settings ๐Ÿ”’
Settings: how and where a run happens on this machine, never what it makes. They are read in layers, each overriding the one before key by key: built-in defaults, /etc/doris/settings.*, the userโ€™s $XDG_CONFIG_HOME/doris/settings.*, the checkoutโ€™s untracked .doris/settings.*, a --settings FILE, -j, then each --set. The system and user files can put a ceiling on some keys under limits.
status ๐Ÿ”’
The live status of a run: how many steps of each name are in each phase, as a table with a progress bar for each name. On a terminal the table stays at the bottom of the output and is redrawn as steps move on.
step ๐Ÿ”’
The step model: what a flow plans and the executor runs.
tools ๐Ÿ”’
Tools and the capabilities they provide.
tops ๐Ÿ”’
Tops and their contexts: which top each design is run in the context of.
tree ๐Ÿ”’
Hashing and copying files and directory trees.
ui ๐Ÿ”’
Output for people. Paths under the repo root are shown relative to it, which is shorter and reads the same wherever doris is run from. Paths outside the root are shown as they are. Files written for tools, such as result files, keep absolute paths.

Structsยง

CheckArgs ๐Ÿ”’
Choose ๐Ÿ”’
Which jobs a command covers: the flow, designs and job IDs, and filters on the jobsโ€™ attributes (see select).
Chosen ๐Ÿ”’
What a selection chose.
CleanArgs ๐Ÿ”’
Cli ๐Ÿ”’
DesignTree ๐Ÿ”’
doris flows --tree: each design, with a branch for each flow it doris flows --tree: designs nested under the designs that depend on them, each with a branch per flow it configures.
FlowsArgs ๐Ÿ”’
GcArgs ๐Ÿ”’
IdTrie ๐Ÿ”’
Job IDs split at / and @, each part a level, in the order the jobs were planned. A jobโ€™s steps hang off its last part.
Node ๐Ÿ”’
A line of a tree before it is drawn: its label, the note shown with -v, and its children.
PlanArgs ๐Ÿ”’
ReportArgs ๐Ÿ”’
ResourcesArgs ๐Ÿ”’
RunArgs ๐Ÿ”’
Selection ๐Ÿ”’
Which jobs, and which of their steps, a command covers.

Enumsยง

Cmd ๐Ÿ”’
Exit ๐Ÿ”’
dorisโ€™s exit codes, by the names the bookโ€™s โ€œExit codesโ€ gives them. A script sees only the number, so a code never changes its meaning.
Flow ๐Ÿ”’
GcCmd ๐Ÿ”’
MeasurementsCmd ๐Ÿ”’
ReportCmd ๐Ÿ”’

Functionsยง

by_flow ๐Ÿ”’
The jobs of each flow, in the order of Flow::ALL.
check ๐Ÿ”’
For each flow, list each precheck of its jobs: every program they run by name, and every condition a step declares. What passed is listed with how it is met, and what failed with why and the steps that need it. Exits 1 if any failed.
choose_jobs ๐Ÿ”’
Plan every job of the flows a selection names, and choose from them by its designs, job IDs and filters (see select).
clean_kept ๐Ÿ”’
Remove the working directories that were kept whole, or with --dry-run list them and the space they use.
columns ๐Ÿ”’
Lays out rows as columns two spaces apart. The last column is not padded, so no line has trailing spaces.
command ๐Ÿ”’
config_path ๐Ÿ”’
A flow config file as doris flows -v shows it: relative to the design fileโ€™s directory, which it is always under.
configures ๐Ÿ”’
default_limits ๐Ÿ”’
What a run may use at once, before any --set: the machineโ€™s own pools are as large as the machine, and the disk pool is the space free in the scratch directory. A commercial toolโ€™s pool is one licence per CPU thread, up to 16. Any other pool is not limited until it is given a size.
design_flows ๐Ÿ”’
Each flow, and the config file a design has for it, if any. New flows are added here, and doris flows gains a column and a tree branch.
design_tags ๐Ÿ”’
A designโ€™s tags as doris flows shows them: the design fileโ€™s, then each flow configโ€™s as FLOW:TAG, since only that flowโ€™s jobs have them.
draw ๐Ÿ”’
Appends node and its children as rows: the label drawn with its branch, and with verbose, the note. last is whether the node is its parentโ€™s last child; None for a root.
flow_dir ๐Ÿ”’
Where a flowโ€™s jobs, and its reports, are.
flows_table ๐Ÿ”’
doris flows: one row per design and one column per flow, holding yes or -, or with verbose, the design file and config file paths.
gc ๐Ÿ”’
job_flow ๐Ÿ”’
The flow a job is of.
keep_measurements ๐Ÿ”’
Add a runโ€™s measurements to the store at dir: a record of each step that ran a process. A run that ran none adds nothing.
last_failed ๐Ÿ”’
The IDs of the jobs of the last run in this checkout that did not pass, of flow if one is given, and how long ago the run started. A job with no result, which did not finish, did not pass. Runs are found by the GC roots they leave in the cache.
leaf ๐Ÿ”’
limits ๐Ÿ”’
What a run may use at once: the defaults, with the step limit and the pool sizes the settings give.
main ๐Ÿ”’
measurement_dir ๐Ÿ”’
The store, or an error that says it is off.
measurements_cmd ๐Ÿ”’
part_holds ๐Ÿ”’
What one part of a step holds, and the tool it runs, for plan.
plan ๐Ÿ”’
The jobs a selection chooses.
plan_all ๐Ÿ”’
Every job of every flow, for every design that configures it, as a plain doris run FLOW would plan them.
print_collection ๐Ÿ”’
One line on what a collection did, and a warning if it wasnโ€™t enough.
print_kept ๐Ÿ”’
The roots old enough to drop that keep_latest kept, each with what it is the newest root of, and how to drop them anyway.
print_left_out ๐Ÿ”’
doris plan --explain: each job planned and left out, and why. The jobs no design or job named matches are only counted: they are every other job of the flows, and --explain is for the filters.
print_plan ๐Ÿ”’
Print a jobโ€™s steps, and whether each would run or come from the cache.
print_plan_tree ๐Ÿ”’
Print the jobs as a tree of their IDs, FLOW/[TOP/]DESIGN@TOOL, with each jobโ€™s steps under it as a tree of what runs after what, and whether each step would run or come from the cache. Ends with a count of jobs and steps.
print_settings ๐Ÿ”’
doris settings: every setting, its value, and where it came from. Pools no layer sizes are the machineโ€™s, and are listed as such.
real_main ๐Ÿ”’
Errors before the repo root is known are printed by main as they are. After that, everything printed goes through Ui.
report ๐Ÿ”’
requirements ๐Ÿ”’
rerun ๐Ÿ”’
Which steps --rerun and --no-cache run whether they are cached or not. A name no selected job has a step of is an error.
resources ๐Ÿ”’
doris resources: what each step of each flow config should hold, from the measurements of this repoโ€™s runs.
revision ๐Ÿ”’
branch @ commit for a root, with * if the tree was dirty.
run ๐Ÿ”’
step_totals ๐Ÿ”’
For each step of jobs with services, what it holds in all, as rows of doris resources: its threads and memory now, the sum of its partsโ€™, and with the values in taken, by key and pool, put in the config. Jobs whose parts run other tools may hold other totals: each different total has rows of its own, naming the jobs by their tools.
step_tree ๐Ÿ”’
A jobโ€™s steps as a tree: each step under the step it runs after. A step that runs after several, none of which run after another, is put under the last of them and its note names the others.
validate ๐Ÿ”’
Report every problem found loading the config, not just the first. Exits Failed if there are errors; warnings alone donโ€™t fail, unless --strict makes them errors.
view_reports ๐Ÿ”’
Serve the reports. In a checkout, the home page has its latest results and its runs; anywhere else, the runs of every repo in the cache.
width ๐Ÿ”’
The columns text takes on a terminal: its characters, less any ANSI colour codes.
write_reports ๐Ÿ”’
Write a flowโ€™s reports from its result files, and say where they are.

Type Aliasesยง

FlowJobs ๐Ÿ”’
A flow and the jobs planned for it.