Skip to content

Add Tier2 Quarantine Status Dashboard Generator#1

Closed
rnetser wants to merge 24 commits into
mainfrom
quaratnine
Closed

Add Tier2 Quarantine Status Dashboard Generator#1
rnetser wants to merge 24 commits into
mainfrom
quaratnine

Conversation

@rnetser

@rnetser rnetser commented Jan 11, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a quarantine dashboard generator that scans both RedHatQE/openshift-virtualization-tests and RedHatQE/cnv-tests repositories to generate a comprehensive HTML dashboard showing quarantine statistics per version and team.

Changes Made

  • Add scripts/quarantine_stats/generate_dashboard.py - main dashboard generator script
  • Update pyproject.toml - add console script entry point quarantine-dashboard
  • Update .flake8 - configuration adjustments

Features

  • Multi-repository scanning: Scans both RedHatQE/openshift-virtualization-tests and RedHatQE/cnv-tests
  • Unified version summary table: Shows quarantine counts across all supported versions
  • Unified team breakdown table: Displays per-team statistics
  • Tabbed quarantined tests details: Interactive tabs for detailed test information
  • Flexible output: Generates HTML dashboard or JSON output

CLI Options

  • --keep-clones - Keep cloned repositories after processing
  • --json - Output JSON instead of HTML
  • --workdir - Specify working directory for clones
  • --output-dir - Specify output directory for dashboard
  • --github-token - GitHub token for API access

Usage

uv run quarantine-dashboard

Test Plan

  • Run uv run quarantine-dashboard and verify HTML output is generated
  • Run uv run quarantine-dashboard --json and verify JSON output
  • Verify dashboard displays correct statistics for all versions
  • Verify team breakdown shows accurate counts

Rewrite quarantine stats dashboard generator with support for:
- Multi-repo scanning (RedHatQE/openshift-virtualization-tests, RedHatQE/cnv-tests)
- Per-version quarantine statistics across all branches (main, cnv-X.Y)
- CLI table output with version and team breakdowns
- HTML dashboard with tabbed interface for quarantined test details
- JSON output option via --json flag
- Repo-specific team mappings and branch filtering

Also add Path and relative_to to flake8 fcn_exclude_functions.
- Combine both repos into single Version Summary table with Repository column
- Combine team breakdowns into unified table with all repo/version columns
- Add "compute" -> "virt" folder mapping for team grouping
- Remove unused format_repo_version_table() function (now format_unified_version_table)
- Add --workdir and --output-dir CLI arguments for flexibility
- Write JSON output to file instead of stdout
Address 9 review comments:
- Add ClassVar annotations to mutable class attributes (DEFAULT_EXCLUDED_FOLDERS, DEFAULT_FOLDER_MAPPINGS)
- Add return type annotations to __init__ methods (TestScanner, DashboardGenerator)
- Change bare Exception to specific types (SyntaxError, OSError, UnicodeDecodeError)
- Add error logging for branch restore failures in scan_branch
- Use timezone-aware datetime (timezone.utc) for timestamps
- Make boolean args keyword-only in run_multi_repo_mode
- Merge multiple startswith/endswith calls into tuple form
- cleanup_workdir: Remove ignore_errors=True and add proper error handling
  with logging and re-raise for visibility
- is_valid_branch: Change bool() wrapper to explicit 'is not None' check
- Replace print() with structured logging (simple_logger)
- Change to specific function imports instead of module imports
- Use tempfile.gettempdir() for WORKDIR instead of hardcoded path
- Fix FCN001 by adding keyword arguments to function calls
- Remove unused code (format_stats_table, _generate_team_rows)
- Remove "Breakdown by Team" section from dashboard
- Add container run example to help text
- Use SystemExit instead of exit() for proper exit handling
- Add logging for SyntaxError in file parsing
- Rename single-letter loop variable 'i' to 'line_idx'
- Rename single-letter lambda variable 't' to 'test'
Use pyhelper_utils.shell.run_command instead of subprocess.run
for git operations in generate_dashboard.py to follow repo standards.
- Fix variable shadowing: rename line to stripped_line in loop
- Replace single-letter 't' with descriptive names in lambdas
- Add HTML escaping for user-controlled strings (defense in depth)
- Extract duplicate path logic to get_display_path utility function
@github-actions github-actions Bot removed the sig-virt label Jan 14, 2026
Git outputs progress messages to stderr even on success.
run_command has verify_stderr=True by default, causing
successful git operations to be treated as failures.
- Add MAX_DECORATOR_SEARCH_LINES class constant for decorator search range
- Extract CSS/HTML from generate() into _render_css(), _render_header(), _render_footer() helpers
- Make generate() a thin orchestrator for better maintainability
float('4.10') equals 4.1, causing 4.10 < 4.9 in sorting.
Fixed by parsing version into integer tuple (major, minor) for
correct semantic version ordering.
@rnetser rnetser closed this Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant