mod bot_result¶
- module bot_result¶
What an EESSI bot build job’s FAILURE actually was.
The EESSI software-layer bot marks a job FAILURE when the job output (slurm-<id>.out`) holds any line matching
FATAL:,ERROR:`, ``FAILED:orrequired modules missing:, or lacksNo missing installationsor a <tarball> created! line (bot/check-build.shin EESSI/software-layer-scripts). The test step is marked FAILURE on anyERROR:line. Many of those jobs built and packaged everything. This module reads what a job left behind (the bot’s comment, the _bot_job<id>.result file, the job output) and says which of these it was:a real failure: a build or a check failed and installations remain missing, with the cause from
crate::campaign::classify_build_failure;ERROR-only noise:
ERROR:lines, butNo missing installationsand a tarball with contents;an empty tarball: nothing was built, so there is nothing to deploy;
infra: the job never ran the build properly (bot configuration, merge, scheduler, container, network, missing job output).
Anything else stays unclassified, for a human.
Functions
- fn classify_bot_inputs(inputs: &[BotInput]) -> Vec<BotJobResult>¶
Classify every job the inputs describe.
A comment holding several job tables, or a bot update with several commands, gives one job each. Inputs that name the same job id are one job: the comment or result file says what the bot checked, and the job output adds the lines that say why.
- fn classify_bot_job(inputs: &[BotInput]) -> BotJobResult¶
Classify the inputs as one job.
- fn run_bot_classify(request: &BotClassifyRequest) -> Result<BotClassifyReport>¶
Read the files and classify each job they describe.
Enums
- enum BotJobClass¶
Which of the four outcomes a bot job had.
- RealFailure¶
The build or a check failed; installations remain missing.
- ErrorOnly¶
ERROR:lines, but every installation is present and the tarball has contents.
- EmptyTarball¶
Nothing was built, so the tarball is empty.
- Infra¶
The job never ran the build properly.
- Success¶
The bot reported success and nothing contradicts it.
- Unclassified¶
The inputs match no known shape. Left for a human rather than guessed.
Implementations
- impl BotJobClass¶
Variables
- const ALL: [BotJobClass; 6]¶
Every class, in report order.
Functions
- fn as_str(self) -> &'static str¶
The name the text and JSON output use,
real-failure.
- enum BotSubClass¶
The sub-class of a real failure or of infra.
- Build(BuildFindingClass)¶
What
classify_build_failuremakes of the job output.
- Infra(InfraCause)¶
What kept the build from running.
Implementations
- impl BotSubClass¶
Functions
- fn as_str(self) -> String¶
The kebab-case name,
resourceorbot-config.
- enum InfraCause¶
Why a job never ran the build properly.
- BotConfig¶
The bot instance submitted no job for the command, or the job configuration is missing or names an unknown repository.
- Merge¶
The bot could not merge the pull request into its target branch.
- MissingOutput¶
The job output file is missing.
- Scheduler¶
The scheduler refused the job or lost its node.
- Container¶
The build container could not be created.
- Network¶
CernVM-FS or the network was unavailable.
- CompatLayer¶
A tool from the compatibility layer, not the build environment, ran.
Implementations
- impl InfraCause¶
Structs and Unions
- struct BotClassifyReport¶
What
stack bot-classifyprints.- stdout: String¶
Stdout, including the count line.
- jobs: Vec<BotJobResult>¶
One result per job.
Implementations
- impl BotClassifyReport¶
Functions
- fn counts(&self) -> BTreeMap<&'static str, usize>¶
Jobs per class, every class present.
- struct BotClassifyRequest¶
Arguments for
stack bot-classify.- files: Vec<PathBuf>¶
Saved bot comments, _bot_job<id>.result files, and job output files. Inputs that name the same job id are read as one job.
- struct BotInput¶
One input text: a saved bot comment, a _bot_job<id>.result file, or a job output file.
- name: String¶
Where the text came from. A file name such as
slurm-327885.outor_bot_job327885.resultgives the job id.
- text: String¶
The text.
- struct BotJobResult¶
The classification of one bot job.
- sources: Vec<String>¶
Inputs that describe this job.
- job_id: Option<String>¶
Slurm job id, when an input names it.
- instance: Option<String>¶
Bot instance,
eessi-bot-mc-aws.
- repository: Option<String>¶
Bot repository,
eessi.io-2025.06-software.
- target: Option<String>¶
CPU target the job built for,
x86_64/amd/zen2.
- class: BotJobClass¶
The outcome.
- sub_class: Option<BotSubClass>¶
The cause of a real failure or of infra. A real failure whose cause is not in the inputs is
unknown.
- reason: String¶
One sentence on why the job got its class.
- evidence: Vec<String>¶
The lines the class rests on.