Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 19, 2025

PR #239 downgraded WolverineFx from 5.9.0 to 5.8.0 due to suspected E2E test failures from changed log formats. Investigation reveals the existing log filtering in ExecutableRunner.cs already handles 5.9.0 correctly.

Changes

Key Finding

WolverineFx 5.9.0 introduces:

[07:06:06 INF] Exporting Open Telemetry metrics from Wolverine with name Wolverine:Morphir.Tooling, version 5.9.0.0

Already filtered by existing pattern:

line.Contains("Open Telemetry metrics", StringComparison.OrdinalIgnoreCase)

Test Coverage

Added 8 unit tests covering:

  • WolverineFx 5.8.0/5.9.0 log patterns (filtered)
  • Command output and errors (not filtered)
  • JSON output with "Errors" field (not filtered)
  • Info-prefixed infrastructure logs (filtered)
  • Serilog-formatted log messages [HH:mm:ss LEVEL] (filtered)
  • Non-Serilog bracketed content (not filtered)

All 20 implemented tests pass (8 unit tests + 12 E2E BDD tests). 21 AOT tests appropriately skipped with @ignore tags from main.

Integration with Main

The merge with main brought in Serilog regex filtering that complements our existing pattern-based filtering. Both changes work together seamlessly:

  • Our change: Made IsInfrastructureLogMessage internal for testability
  • Main's change: Added regex pattern ^\[\d{2}:\d{2}:\d{2}\s+(INF|WRN|DBG)\] for Serilog logs

No conflicts or test failures after merge.

Original prompt

This section details on the original issue you should resolve

<issue_title>Upgrade WolverineFx to 5.9.0 and Update E2E Test Log Filtering</issue_title>
<issue_description>Priority: High
Type: Technical Debt / Bug Fix
Part of Epic: #208 (Deployment Architecture Refactor)
Depends On: #211 (Phase 3 - Build Testing Infrastructure)

Background

In PR #239, we temporarily downgraded WolverineFx from 5.9.0 to 5.8.0 to fix E2E test failures that were blocking deployment (deployment run finos/morphir-dotnet#20360658509). The root cause was identified as WolverineFx 5.9.0 changing log message formats that the ExecutableRunner's infrastructure log filtering logic couldn't handle properly.

This is a temporary fix to unblock deployments. This issue tracks the proper investigation and upgrade back to WolverineFx 5.9.0.

Problem

When WolverineFx was upgraded from 5.8.0 to 5.9.0 (PR #236), 20 E2E tests failed in the deployment workflow. The tests are in tests/Morphir.E2E.Tests/ and validate CLI command execution through the ExecutableRunner infrastructure.

The ExecutableRunner (located at tests/Morphir.E2E.Tests/Infrastructure/ExecutableRunner.cs) filters infrastructure log messages to prevent them from contaminating test assertions. The filtering logic in the IsInfrastructureLogMessage method is based on string patterns that match WolverineFx 5.8.0 log output formats.

Tasks

Investigation Phase

  • Install WolverineFx 5.9.0 in a test branch
  • Run E2E tests and capture actual log output
  • Compare WolverineFx 5.9.0 log formats with 5.8.0
  • Identify specific log message patterns that changed
  • Document all log format changes in issue comments

Implementation Phase

  • Update IsInfrastructureLogMessage in ExecutableRunner.cs to handle 5.9.0 patterns
  • Add unit tests for log filtering with both 5.8.0 and 5.9.0 log formats
  • Upgrade WolverineFx to 5.9.0 in Directory.Packages.props
  • Run full E2E test suite locally and verify all tests pass
  • Run deployment workflow in CI and verify E2E tests pass

Validation Phase

  • All E2E tests passing with WolverineFx 5.9.0
  • No test output contamination from infrastructure logs
  • Deployment workflow succeeds end-to-end
  • Add regression tests to prevent future log filtering issues

Files to Modify

  1. tests/Morphir.E2E.Tests/Infrastructure/ExecutableRunner.cs

    • Update IsInfrastructureLogMessage method with new log patterns
    • Consider making the filtering more robust/flexible
  2. Directory.Packages.props

    • Change WolverineFx version from 5.8.0 to 5.9.0
  3. tests/Morphir.E2E.Tests/ (potentially)

    • Add unit tests for log filtering if they don't exist
    • Update any E2E tests that make assumptions about log output

Expected Log Patterns to Handle

Based on existing filtering in ExecutableRunner.cs, ensure these patterns still work:

  • Wolverine extension scanning messages
  • Application startup/shutdown messages
  • Hosting environment messages
  • Open Telemetry metrics messages
  • Code generation mode messages
  • Assembly searching messages

And identify any new patterns introduced in 5.9.0.

Definition of Done

  • WolverineFx upgraded to version 5.9.0
  • All E2E tests passing locally
  • All E2E tests passing in CI (deployment workflow)
  • Log filtering unit tests added
  • No infrastructure log contamination in test output
  • Deployment workflow completes successfully
  • Code review completed
  • PR merged

Testing Strategy

  1. Local Testing

    ./build.sh Compile
    ./build.sh PublishSingleFile --rid linux-x64
    ./build.sh TestE2E --executable-type trimmed
  2. CI Testing

    • Trigger deployment workflow manually
    • Verify all matrix builds pass (linux-x64, linux-arm64, osx-arm64, win-x64)
    • Confirm E2E tests pass on all platforms

References

Notes

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 19, 2025 07:14
- Upgrade WolverineFx from 5.8.0 to 5.9.0 in Directory.Packages.props
- Add ExecutableRunnerTests.cs with comprehensive unit tests for log filtering
- Tests verify that both WolverineFx 5.8.0 and 5.9.0 log patterns are filtered correctly
- Tests confirm that actual command output and error messages are NOT filtered
- All E2E tests pass with WolverineFx 5.9.0 (18 passed, 20 failed due to unimplemented AOT tests)

The existing log filtering logic in ExecutableRunner.cs already handles WolverineFx 5.9.0
log patterns correctly. The new "Exporting Open Telemetry metrics" message is filtered
by the existing "Open Telemetry metrics" pattern match.

Co-authored-by: DamianReeves <[email protected]>
- Make IsInfrastructureLogMessage internal (was private) for testability
- Remove duplicated logic in test file - tests now call ExecutableRunner.IsInfrastructureLogMessage directly
- Fix test method name: IsInfrastructureLogMessage_ShouldNotFilter_JsonOutputErrorsField (was incorrectly named Should Filter)
- All 18 E2E tests still pass after refactoring

Co-authored-by: DamianReeves <[email protected]>
Copilot AI changed the title [WIP] Upgrade WolverineFx to 5.9.0 and update E2E test log filtering Upgrade WolverineFx to 5.9.0 with log filtering unit tests Dec 19, 2025
Copilot AI requested a review from DamianReeves December 19, 2025 07:23
@DamianReeves
Copy link
Member

@copilot We have quite a bit of fixes merged to main since we started this work (issues have been updated to), we need to merge or rebase in man and be sure our fix is still relevant and correct

Copilot AI and others added 2 commits December 19, 2025 08:25
- Merged origin/main which includes:
  - PR #244: Serilog-formatted log message filtering (regex pattern)
  - PR #245: @ignore tags on unimplemented AOT tests
  - PR #247: Build/package validation tests enabled
- Added 2 new unit tests for Serilog log filtering:
  - IsInfrastructureLogMessage_ShouldFilter_SerilogFormattedLogs
  - IsInfrastructureLogMessage_ShouldNotFilter_NonSerilogBracketedContent
- All 20 implemented tests pass (8 unit tests + 12 E2E BDD tests)
- 21 AOT tests skipped as expected (@ignore tags from main)

The merge combined our change (internal visibility) with main's change
(Serilog regex filtering), and both features work together correctly.

Co-authored-by: DamianReeves <[email protected]>
Copy link
Contributor Author

Copilot AI commented Dec 19, 2025

@copilot We have quite a bit of fixes merged to main since we started this work (issues have been updated to), we need to merge or rebase in man and be sure our fix is still relevant and correct

Merged origin/main into this branch (commit e9a8ba7). The merge brought in:

Our changes (internal visibility for IsInfrastructureLogMessage) merged cleanly with main's changes (Serilog regex pattern). Added 2 new unit tests to cover the Serilog filtering patterns.

Test Results: All 20 implemented tests pass (8 unit tests + 12 E2E BDD tests), 21 AOT tests skipped as expected. The fix is still relevant and correct with main merged.

@DamianReeves DamianReeves marked this pull request as ready for review December 19, 2025 08:39
@DamianReeves DamianReeves merged commit 8af94fe into main Dec 19, 2025
16 checks passed
@DamianReeves DamianReeves deleted the copilot/upgrade-wolverinefx-to-5-9-0 branch December 19, 2025 08:40
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.

Upgrade WolverineFx to 5.9.0 and Update E2E Test Log Filtering

2 participants