Skip to content

V5.y.z/house keeping#55

Open
gimlichael wants to merge 6 commits into
mainfrom
v5.y.z/house-keeping
Open

V5.y.z/house keeping#55
gimlichael wants to merge 6 commits into
mainfrom
v5.y.z/house-keeping

Conversation

@gimlichael
Copy link
Copy Markdown
Member

This pull request focuses on consolidating the internal AssemblyContext reflection utility into the upstream Cuemon.Reflection package and tightening the CI pipeline structure. It also updates dependencies and improves the workflow for running tests, especially for macOS. The most important changes are summarized below.

Reflection Utility Consolidation

  • Removed the AssemblyContext class from Savvyio.Core (Savvyio.Reflection namespace) and updated all usages to reference Cuemon.Reflection.AssemblyContext.GetCurrentDomainAssemblies() instead of the removed CurrentDomainAssemblies property. This affects SavvyioOptionsExtensions and both MessageConverter classes in the Newtonsoft.Json and Text.Json extensions. [1] [2] [3] [4] [5] [6] [7] [8] [9]

CI Pipeline Improvements

  • Added a run_mac_tests boolean input to the workflow dispatch event, allowing macOS tests to be run on demand rather than by default, and updated the initialization logic to set the run-mac-tests output accordingly. [1] [2]
  • Modified the test_mac job to run only if run-mac-tests is true and made it depend explicitly on the init job.
  • Introduced a new test_qualitygate job that centralizes the evaluation of all test results (Linux, Windows, macOS, integration, RabbitMQ, NATS) using helper functions to require success or allow skips for disabled jobs.
  • Updated downstream jobs (sonarcloud, codecov, codeql, deploy) to depend on the new test_qualitygate job instead of referencing every individual test job, ensuring a cleaner and more maintainable workflow.

Dependency Updates

  • Bumped the LocalStack Docker image version from 4.14.0 to 2026.05.0 in both Dockerfile.localstack and docker-compose.yml. [1] [2]

Documentation

  • Added a new section to the CHANGELOG.md detailing the removal of the internal AssemblyContext, the migration instructions, CI pipeline changes, and dependency updates.

aicia-bot and others added 6 commits May 26, 2026 23:50
Consolidate reflection utilities into upstream Cuemon.Reflection package. The AssemblyContext class and its comprehensive test suite are removed from Savvyio.Core; callers must migrate to Cuemon.Reflection.AssemblyContext and update CurrentDomainAssemblies (property) to GetCurrentDomainAssemblies() (method).
Replace internal Savvyio.Reflection.AssemblyContext with external Cuemon.Reflection.AssemblyContext across all call sites. Updates SavvyioOptionsExtensions and both MessageConverter implementations (Newtonsoft.Json and Text.Json) to call GetCurrentDomainAssemblies() method instead of the removed CurrentDomainAssemblies property.
Add optional run_mac_tests workflow dispatch input (default false) to control macOS test matrix execution and reduce CI costs. Introduce new test_qualitygate job that centralizes test result evaluation using require_success and require_success_or_skip helper functions. Refactor sonarcloud, codecov, codeql, and deploy jobs to depend on test_qualitygate instead of enumerating individual test jobs, simplifying workflow dependencies and improving maintainability.
Update LocalStack container image from 4.14.0 to 2026.05.0 in both Dockerfile.localstack and docker-compose.yml for access to latest AWS service emulation features and security updates.
Document breaking AssemblyContext removal, refactoring of call sites to use Cuemon.Reflection, CI pipeline improvements with optional macOS testing and centralized quality gate job, and LocalStack Docker image version bump. Add migration guidance for consumers affected by the breaking change.
@gimlichael gimlichael self-assigned this May 26, 2026
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 26, 2026

Greptile Summary

This PR consolidates the internal Savvyio.Reflection.AssemblyContext class into the upstream Cuemon.Reflection package and restructures the CI pipeline around a new centralised test_qualitygate job.

  • Reflection migration: AssemblyContext.cs and its test file are deleted; three call sites (SavvyioOptionsExtensions, both MessageConverter classes) switch to Cuemon.Reflection.AssemblyContext.GetCurrentDomainAssemblies(). All usages are guarded by Lazy<>, so the call pattern is unchanged.
  • CI quality gate: A new test_qualitygate job (with if: always()) replaces the previous pattern of enumerating every test job in each downstream needs list. It uses require_success for unconditional jobs (Linux, Windows, RabbitMQ, NATS) and require_success_or_skip for opt-in jobs (macOS, integration), correctly reflecting each job's conditional guard. Downstream jobs (sonarcloud, codecov, codeql, deploy) now depend on test_qualitygate instead of individual test jobs.
  • LocalStack bump: Docker image updated from 4.14.0 to 2026.05.0 (calendar versioning), a substantial upstream delta for the SNS/SQS integration tests.

Confidence Score: 4/5

Safe to merge once the integration test suite confirms the LocalStack 2026.05.0 image behaves correctly with the existing SNS/SQS tests.

The code changes are a clean mechanical migration — the old Savvyio.Reflection.AssemblyContext is deleted and every call site moves to the upstream API with no logic changes. The CI restructuring is well-reasoned: test_qualitygate correctly separates unconditional jobs from opt-in ones, and all downstream jobs now depend on it cleanly. The only area that warrants a second look is the LocalStack image jump from 4.14.0 to 2026.05.0; if the integration tests pass against the new image, the change is fully validated.

.github/workflows/ci-pipeline.yml (quality gate logic) and Dockerfile.localstack / docker-compose.yml (LocalStack version bump).

Important Files Changed

Filename Overview
.github/workflows/ci-pipeline.yml Introduces opt-in macOS test dispatch input, adds test_qualitygate job with require_success/require_success_or_skip helper functions, and consolidates downstream job dependencies — logic is sound for all known trigger/fork scenarios.
Dockerfile.localstack Bumps LocalStack image from 4.14.0 to 2026.05.0 (calendar-versioned), a substantial API surface change that integration tests should validate.
docker-compose.yml Mirrors LocalStack image bump to 2026.05.0, same risk profile as Dockerfile.localstack.
src/Savvyio.Core/Reflection/AssemblyContext.cs Class deleted — functionality consolidated into Cuemon.Reflection.AssemblyContext; all call sites have been updated.
src/Savvyio.Extensions.Dispatchers/SavvyioOptionsExtensions.cs Switches using Savvyio.Reflection to using Cuemon.Reflection and replaces the CurrentDomainAssemblies property access with GetCurrentDomainAssemblies() — straightforward migration, no logic change.
src/Savvyio.Extensions.Newtonsoft.Json/Converters/MessageConverter.cs Updates CloudEventTypes lazy initialiser to call Cuemon.Reflection.AssemblyContext.GetCurrentDomainAssemblies(); behaviour unchanged since it is still wrapped in Lazy<>.
src/Savvyio.Extensions.Text.Json/Converters/MessageConverter.cs Same migration as the Newtonsoft.Json converter — CloudEventTypes lazy initialiser updated to Cuemon.Reflection.AssemblyContext.GetCurrentDomainAssemblies().
test/Savvyio.Core.Tests/Reflection/AssemblyContextTest.cs Test file removed alongside the deleted Savvyio.Reflection.AssemblyContext class — correct housekeeping.
CHANGELOG.md New [Unreleased] section accurately documents all changes in this PR including migration instructions for removed AssemblyContext.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    init[init\ncalculate variables] --> build
    init --> test_mac_cond{run-mac-tests\n== true?}
    build --> test_linux
    build --> test_windows
    build --> test_mac_cond
    build --> integration_test_cond{run-privileged-jobs\n== true?}
    build --> integration_test_rabbitmq
    build --> integration_test_nats
    prepare_test --> test_linux
    prepare_test --> test_windows
    test_mac_cond -->|yes| test_mac
    test_mac_cond -->|no, skipped| QG
    integration_test_cond -->|yes| integration_test
    integration_test_cond -->|no, skipped| QG
    test_linux --> QG
    test_windows --> QG
    test_mac --> QG
    integration_test --> QG
    integration_test_rabbitmq --> QG
    integration_test_nats --> QG
    init --> QG
    QG["test_qualitygate\nif: always()\nrequire_success: linux, windows, rabbitmq, nats\nrequire_success_or_skip: mac, integration"]
    QG -->|success| sonarcloud
    QG -->|success| codecov
    QG -->|success| codeql
    QG -->|failure| BLOCKED([pipeline blocked])
    sonarcloud --> deploy
    codecov --> deploy
    codeql --> deploy
    build --> pack --> deploy
Loading
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
.github/workflows/ci-pipeline.yml:319-320
**RabbitMQ/NATS jobs are always required but have no skip path**

`integration_test_rabbitmq` and `integration_test_nats` have no `if:` guard, so they always run on every trigger (including fork pull requests). `require_success` is therefore the right gate for them. However, if either job is ever given a conditional guard in the future, this call site would need to be upgraded to `require_success_or_skip` — unlike `integration_test`, there is no `_ENABLED` flag wired here. Worth keeping this asymmetry in mind if the RabbitMQ or NATS jobs are later made optional.

### Issue 2 of 2
Dockerfile.localstack:2
**Large LocalStack version jump may affect AWS service emulation**

The image moves from `4.14.0` to `2026.05.0`, which appears to be LocalStack's calendar versioning scheme and represents a very large upstream delta. The integration tests exercise `sns` and `sqs`; any breaking changes in request/response shapes, endpoint behaviour, or error codes would only surface at test time. If the integration test suite passes cleanly with this image, the bump is safe — just worth being aware of the scope of the change.

Reviews (1): Last reviewed commit: "♻️ update sonarcloud and codecov conditi..." | Re-trigger Greptile

Comment on lines +319 to +320
require_success "integration_test_rabbitmq" "$INTEGRATION_TEST_RABBITMQ_RESULT"
require_success "integration_test_nats" "$INTEGRATION_TEST_NATS_RESULT"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 RabbitMQ/NATS jobs are always required but have no skip path

integration_test_rabbitmq and integration_test_nats have no if: guard, so they always run on every trigger (including fork pull requests). require_success is therefore the right gate for them. However, if either job is ever given a conditional guard in the future, this call site would need to be upgraded to require_success_or_skip — unlike integration_test, there is no _ENABLED flag wired here. Worth keeping this asymmetry in mind if the RabbitMQ or NATS jobs are later made optional.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ci-pipeline.yml
Line: 319-320

Comment:
**RabbitMQ/NATS jobs are always required but have no skip path**

`integration_test_rabbitmq` and `integration_test_nats` have no `if:` guard, so they always run on every trigger (including fork pull requests). `require_success` is therefore the right gate for them. However, if either job is ever given a conditional guard in the future, this call site would need to be upgraded to `require_success_or_skip` — unlike `integration_test`, there is no `_ENABLED` flag wired here. Worth keeping this asymmetry in mind if the RabbitMQ or NATS jobs are later made optional.

How can I resolve this? If you propose a fix, please make it concise.

Comment thread Dockerfile.localstack
@@ -1,5 +1,5 @@
# Use the LocalStack base image
FROM localstack/localstack:4.14.0
FROM localstack/localstack:2026.05.0
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Large LocalStack version jump may affect AWS service emulation

The image moves from 4.14.0 to 2026.05.0, which appears to be LocalStack's calendar versioning scheme and represents a very large upstream delta. The integration tests exercise sns and sqs; any breaking changes in request/response shapes, endpoint behaviour, or error codes would only surface at test time. If the integration test suite passes cleanly with this image, the bump is safe — just worth being aware of the scope of the change.

Prompt To Fix With AI
This is a comment left during a code review.
Path: Dockerfile.localstack
Line: 2

Comment:
**Large LocalStack version jump may affect AWS service emulation**

The image moves from `4.14.0` to `2026.05.0`, which appears to be LocalStack's calendar versioning scheme and represents a very large upstream delta. The integration tests exercise `sns` and `sqs`; any breaking changes in request/response shapes, endpoint behaviour, or error codes would only surface at test time. If the integration test suite passes cleanly with this image, the bump is safe — just worth being aware of the scope of the change.

How can I resolve this? If you propose a fix, please make it concise.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.38%. Comparing base (7604909) to head (dd5f240).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #55      +/-   ##
==========================================
- Coverage   98.40%   98.38%   -0.03%     
==========================================
  Files         177      176       -1     
  Lines        3773     3726      -47     
  Branches      363      355       -8     
==========================================
- Hits         3713     3666      -47     
  Misses         58       58              
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link
Copy Markdown

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.

2 participants