refactor: Adapt HTML report generator to fusion doctor schema v2.0 - #47
Merged
Conversation
Align nf-canary with the key renames from the fusion doctor v2.0 schema: category→severity, cpu_cores→vcpus, memory_gb→memory_capacity_gb, disk_gb→disk_capacity_gb, cores_available→physical_cores+vcpus. - Remove hardcoded heuristics (_CHECK_LABELS, _ACRONYMS, smart_title, _REQUIREMENT_KEYS, _ACTUAL_KEYS) from generate_fusion_report.py; use check_catalog labels and value_key/requirement_key instead - Move extract_actual, extract_reference, humanize_check from Jinja2 filters to globals so they accept multiple arguments in templates - Use check_summary.warnings/criticals for status computation - Update all profile params and YAML keys to match v2.0 names - Update example JSONs to schema v2.0 with catalog and new field names - Update tests for new function signatures and v2.0 fixtures Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Update test fixtures to use lowercase catalog labels matching real output: "FUSE device", "disk capacity", "bucket read-write access", "open files limit". Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
…a v2.0 Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
- Filter out checks with status=skip in prepare_template_context - Exclude skipped count from total_checks in the overview donut chart - Untrack example JSON files (managed outside git) - Pass through catalog labels as-is (capitalization handled upstream) Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
The function handles strings too, not just numbers. Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
Show catalog descriptions as dark tooltips on hover over check names in all three sections (system, storage, object storage). Pure CSS implementation — no icons, no JS. Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
- Show Yes/No for sub-check results instead of raw messages - Display errors in a separate row with red background - Short errors shown inline, long errors with expand/collapse toggle - Skip sub-checks with status=skip - Add check_description helper for catalog tooltips Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
- Fix bug where a later report's criticals:0 could overwrite an earlier critical failure detection - Deduplicate all_checks list construction in prepare_template_context - Hoist _SEVERITY_ORDER constant and markupsafe imports to module level - Cache repeated check_description/sc_catalog calls in template loops Signed-off-by: Alberto Miranda <alberto.miranda@seqera.io>
alberto-miranda
marked this pull request as ready for review
March 16, 2026 16:40
fusion doctor schema v2.0
Contributor
Author
|
@adamrtalbot Minor changes to benefit from new schema, no refactoring towards dataclasses/Pydantic yet |
jonmarti
approved these changes
Mar 16, 2026
jonmarti
left a comment
There was a problem hiding this comment.
LGTM, but could you add some screenshot/s?
Contributor
Author
there's no major aesthetic changes from #42, so the screenshots there still apply. |
jordeu
approved these changes
Mar 17, 2026
adamrtalbot
approved these changes
Mar 19, 2026
Collaborator
|
@alberto-miranda feel free to merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR refactors the HTML report generator to adapt it to the
fusion doctorv2.0 JSON schema. The v2.0 extends the schema with information that the HTML reporter previously had to guess, which simplifies/removes most of the internal heuristics we were using for displaying information.Changes
_CHECK_LABELS,_ACRONYMS,smart_title,_REQUIREMENT_KEYS,_ACTUAL_KEYS) fromgenerate_fusion_report.py; usecheck_cataloglabels andvalue_key/requirement_keyfrom schema insteadextract_actual,extract_reference,humanize_checkfrom Jinja2 filters to globals so they accept multiple arguments in templatescheck_summary.warnings/criticalsfor status computationcategory→severity,cpu_cores→vcpus,memory_gb_min→memory_capacity_gb_min,disk_gb_min→disk_capacity_gb_min,cores_available→physical_cores+vcpusTest plan
python -m pytest tests/test_generate_fusion_report.py -v— 77 tests passfusion doctor --format jsonv2.0 output