Skip to content

BUILD-9020 Implement inline checks architecture#106

Merged
tomverin merged 2 commits intomasterfrom
feat/tom/9020
Sep 18, 2025
Merged

BUILD-9020 Implement inline checks architecture#106
tomverin merged 2 commits intomasterfrom
feat/tom/9020

Conversation

@tomverin
Copy link
Copy Markdown
Contributor

@tomverin tomverin commented Sep 16, 2025

This pull request introduces a hybrid architecture for the Releasability system, enabling both inline (local) and lambda-based (AWS) checks. It adds a new inline check framework, updates supporting infrastructure, and provides documentation and configuration for the new approach. The changes improve performance, reliability, and extensibility, while maintaining backward compatibility with existing lambda-based checks.

Hybrid Architecture Implementation:

  • Added a new inline check framework:

    • Introduced abstract base class InlineCheck and CheckContext for inline checks (src/releasability/inline_check.py).
    • Created a new check registry system to manage both inline and lambda-based checks (src/releasability/check_registry.py).
    • Implemented a sample inline check, CheckLicenses, as a placeholder (src/releasability/checks/check_licenses.py).
    • Added __init__.py to mark the inline checks package (src/releasability/checks/__init__.py).
  • Updated orchestration logic:

    • Modified ReleasabilityService and src/main.py to execute both inline and lambda checks, aggregate results, and expose a unified report (src/main.py).

Documentation and Configuration:

  • Added detailed architecture documentation and diagrams:

    • New ARCHITECTURE.md describing the hybrid system design and migration path.
    • New architecture-diagram.md with mermaid diagrams and timeline.
  • Updated workflow and configuration files:

    • Enhanced .github/workflows/build.yml to install dependencies, run tests, and prepare coverage for both main and releasability-status modules.
    • Updated sonar-project.properties to include both modules and coverage files, and to exclude test files from coverage.
    • Added a new output for CheckLicenses to action.yml.

Key changes by theme:

1. Hybrid Inline/Lambda Check Architecture

  • Introduced InlineCheck and CheckContext base classes for inline checks (src/releasability/inline_check.py).
  • Created CheckRegistry for unified management of both check types (src/releasability/check_registry.py).
  • Implemented a sample inline check, CheckLicenses (src/releasability/checks/check_licenses.py).
  • Updated main orchestration to execute and aggregate both inline and lambda check results (src/main.py).

2. Documentation and Diagrams

  • Added ARCHITECTURE.md with detailed hybrid system design, migration strategy, and error handling.
  • Added architecture-diagram.md with visual diagrams and execution timeline.

3. CI/CD and SonarCloud Integration

  • Enhanced workflow to install dependencies, run tests, and generate/prepare coverage for both main and releasability-status modules (.github/workflows/build.yml).
  • Updated SonarCloud configuration to include both codebases and coverage, and to exclude tests from coverage (sonar-project.properties).
  • Added output for the new CheckLicenses inline check to action.yml.

Tested here https://github.com/SonarSource/gh-action_releasability/actions/runs/17792947345/job/50573988184

@tomverin tomverin force-pushed the feat/tom/9020 branch 8 times, most recently from f9661e3 to f55ea0d Compare September 17, 2025 09:18
@tomverin tomverin marked this pull request as ready for review September 17, 2025 09:24
@tomverin tomverin requested a review from a team as a code owner September 17, 2025 09:24
Copilot AI review requested due to automatic review settings September 17, 2025 09:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a hybrid architecture for the Releasability system that supports both inline (local) and lambda-based (AWS) checks. The implementation adds a new inline check framework while maintaining backward compatibility with existing lambda-based checks.

  • Introduces inline check framework with abstract base class and registry system
  • Updates orchestration logic to execute both check types and aggregate results
  • Adds comprehensive documentation and CI/CD configuration updates

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/releasability/inline_check.py New abstract base class and context for inline checks
src/releasability/check_registry.py Registry system managing both inline and lambda checks
src/releasability/checks/check_licenses.py Sample inline check implementation
src/releasability/releasability_service.py Enhanced service with hybrid check execution
src/main.py Updated orchestration to handle both check types
tests/*.py Updated test mocks and new test files for inline framework
.github/workflows/build.yml Enhanced CI workflow for dual module testing
sonar-project.properties Updated SonarCloud configuration
ARCHITECTURE.md Comprehensive architecture documentation
architecture-diagram.md Visual diagrams and execution timeline
action.yml Added output for new CheckLicenses check

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@tomverin tomverin force-pushed the feat/tom/9020 branch 2 times, most recently from dd60e93 to 1647b54 Compare September 17, 2025 09:39
@tomverin tomverin force-pushed the feat/tom/9020 branch 2 times, most recently from b0b0dce to 63f6844 Compare September 18, 2025 07:55
@sonarqubecloud
Copy link
Copy Markdown

🤖 Pull Request summary

Refactors build workflow and adds hybrid inline/lambda releasability checks architecture.

• Consolidates build workflow to use single pytest commands with dual coverage reports
• Updates SonarCloud configuration to handle multi-module coverage analysis
• Implements hybrid check system supporting both immediate inline checks and existing lambda checks
• Adds CheckLicenses as first inline check with registry pattern for extensibility
• Updates main application to handle combined inline/lambda results via new service methods

Review Focus: The ReleasabilityService refactoring maintains backward compatibility while adding significant complexity. Pay close attention to the execution flow in start_releasability_checks() and ensure error handling works correctly when mixing synchronous inline checks with asynchronous lambda polling.

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
97.1% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@tomverin tomverin merged commit 4524cdb into master Sep 18, 2025
7 checks passed
@tomverin tomverin deleted the feat/tom/9020 branch September 18, 2025 09:10
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.

3 participants