-
Notifications
You must be signed in to change notification settings - Fork 29
[CI] issue: HPCINFRA-3592 Add document generation and validation #395
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
Conversation
31c9650 to
3382787
Compare
|
Currently execution of After adding below patch it seems that there is an issue in the code @AlexanderGrissik @galnoam @tomerdbz
generate_docs.py patch |
|
The usage of additionalProperties is unclear. It is false for all the schema. Waiting for @tomerdbz to evaluate and fix . |
|
you have to say in a schema whether you accept additional properties per namespace. and no one will yell on this - i_love_grissik simply will be ignored. anyway - there's a bug here in the python - I'll apply the patch - it's a good idea to have extended error info and fix it. on it :) |
3382787 to
b42960e
Compare
dpressle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i need to see with this new step
450c217 to
8690f2d
Compare
|
rebased code on |
|
bot:retest |
74f5c03 to
8690f2d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Greptile Summary
This PR adds automated documentation generation validation to the CI pipeline. It introduces a new do_documentation_test boolean parameter (default: true) in the Jenkins job configuration and a corresponding "Documentation Test" step in the matrix pipeline that executes generate_docs.py and generate_mappings.py. The test runs in a containerized ubuntu22.04 environment without requiring physical agents, following the same pattern as other static analysis steps. The implementation ensures that PRs cannot break the project's auto-generated documentation (configuration mappings, etc.) by catching generation failures early in the CI process. The change integrates cleanly with the existing Autotools-based build system and declarative YAML pipeline architecture described in the .ci/ directory structure.
Important Files Changed
| Filename | Score | Overview |
|---|---|---|
| .ci/opensource_jjb.yaml | 5/5 | Added do_documentation_test boolean parameter with default true to control documentation validation in CI |
| .ci/matrix_job.yaml | 4/5 | Added documentation_test container definition and "Documentation Test" step that runs Python doc generation scripts |
Confidence score: 4/5
- This PR is safe to merge with minimal risk of breaking production functionality
- Score reflects straightforward CI additions following established patterns, but deducted one point because: (1) no artifact archiving may complicate debugging failed documentation generation, (2) older Docker tag (20250219) versus other ubuntu22.04 images could cause subtle dependency issues, and (3) no explicit error-handling verification for the Python scripts
- Pay close attention to
.ci/matrix_job.yamlto ensure the documentation test step fails appropriately when generation breaks
Sequence Diagram
sequenceDiagram
participant User
participant GitHub
participant Jenkins
participant Docker
participant Kubernetes
participant Build
participant Tests
participant Artifacts
User->>GitHub: Create/Update PR
GitHub->>Jenkins: Trigger pipeline (bot:retest)
Jenkins->>Jenkins: Load matrix_job.yaml config
Jenkins->>Jenkins: Parse job parameters (do_documentation_test, etc.)
Jenkins->>Docker: Build/pull Docker images
Docker-->>Jenkins: Images ready
Jenkins->>Kubernetes: Create privileged pod
Kubernetes-->>Jenkins: Pod ready
Jenkins->>Build: Execute Setup step
Jenkins->>Build: Install DOCA host
Jenkins->>Build: Run Copyrights check
Jenkins->>Build: Execute Autogen
Jenkins->>Build: Execute Build step
alt Build fails
Build->>Artifacts: Collect failure artifacts
Artifacts-->>Jenkins: Archive arch-*.tar.gz
end
Jenkins->>Tests: Execute Style check
Jenkins->>Tests: Execute Compiler check
Jenkins->>Tests: Execute Coverity
Jenkins->>Tests: Execute Cppcheck
Jenkins->>Tests: Execute Csbuild
Jenkins->>Tests: Execute Unit Tests
Jenkins->>Tests: Execute Gtest
Jenkins->>Tests: Execute Valgrind
Jenkins->>Tests: Execute Documentation Test
Tests->>Tests: Run "python3 generate_docs.py"
Tests->>Tests: Run "python3 src/core/config/generate_mappings.py"
alt Test fails
Tests->>Artifacts: Collect failure artifacts
Artifacts-->>Jenkins: Archive logs and reports
end
Jenkins->>Artifacts: Collect all artifacts
Artifacts->>Artifacts: Compress artifacts with .ci/artifacts.sh
Artifacts-->>Jenkins: Archive jenkins/**/arch-*.tar.gz
Jenkins->>Tests: Execute Blackduck scan
Jenkins->>Jenkins: Pipeline stop
Jenkins->>GitHub: Update PR status
GitHub->>User: Display test results
2 files reviewed, no comments
|
bot:retest |
|
@galnoam |
Make sure that documentation auto generation wasn't impacted by PR changes Create documentation testing procedure Issue: HPCINFRA-3592 Signed-off-by: Michael Braverman <[email protected]>
8690f2d to
9a3bcb0
Compare
|
Squashed the commits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Greptile Summary
Added CI integration to validate documentation generation isn't broken by code changes. The PR introduces a new documentation test step that runs two Python scripts (generate_docs.py and generate_mappings.py) to verify auto-generated documentation can be successfully created.
Key Changes:
- New
documentation_testDocker container using Ubuntu 22.04 build stage - New "Documentation Test" CI step that executes both documentation generation scripts
- New
do_documentation_testboolean parameter (default: true) to control test execution - Follows existing CI patterns (containerSelector, agentSelector, enable flag)
Confidence Score: 5/5
- This PR is safe to merge with minimal risk
- The changes are well-structured CI additions that follow established patterns in the codebase. Both scripts exist, use only standard library imports (json, re, sys, pathlib, typing), and the required schema file is present. The Docker target 'build' exists in the Dockerfile. The implementation mirrors existing test steps like Unit Tests.
- No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| .ci/matrix_job.yaml | 5/5 | Adds documentation_test container and Documentation Test step to verify auto-generated docs |
| .ci/opensource_jjb.yaml | 5/5 | Adds do_documentation_test boolean parameter with default true to enable/disable documentation tests |
Sequence Diagram
sequenceDiagram
participant PR as Pull Request
participant Jenkins as Jenkins CI
participant Docker as Docker Container
participant GenDocs as generate_docs.py
participant GenMap as generate_mappings.py
participant Schema as xlio_config_schema.json
participant README as README
PR->>Jenkins: Trigger CI pipeline
Jenkins->>Jenkins: Check do_documentation_test flag
alt do_documentation_test == true
Jenkins->>Docker: Start documentation_test container (ubuntu22.04:build)
Docker->>GenDocs: Execute python3 generate_docs.py
GenDocs->>Schema: Read configuration schema
Schema-->>GenDocs: Return schema data
GenDocs->>GenDocs: Parse properties and generate docs
GenDocs->>README: Update Configuration Values section
README-->>GenDocs: Success/Failure
Docker->>GenMap: Execute python3 generate_mappings.py
GenMap->>Schema: Read configuration schema
Schema-->>GenMap: Return schema data
GenMap->>GenMap: Extract env var mappings
GenMap->>GenMap: Generate mappings.py
GenMap-->>Docker: Success/Failure
Docker-->>Jenkins: Test result
Jenkins-->>PR: Report documentation test status
else do_documentation_test == false
Jenkins->>Jenkins: Skip documentation test
end
2 files reviewed, no comments
|
@MrBr-github, waiting for CI |
Issue: HPCINFRA-3592
What
Make sure that documentation auto generation wasn't impacted by PR changes
How ?
Create documentation testing procedure
Change type
What kind of change does this PR introduce?
Check list