Skip to content

feat: add log deployments and changes pattern (#2696) - #3606

Open
arnabnandy7 wants to merge 2 commits into
iluwatar:masterfrom
arnabnandy7:feature/logDeploymentsAndChanges
Open

feat: add log deployments and changes pattern (#2696)#3606
arnabnandy7 wants to merge 2 commits into
iluwatar:masterfrom
arnabnandy7:feature/logDeploymentsAndChanges

Conversation

@arnabnandy7

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds the Microservices Log Deployments and Changes pattern with centralized event history, automatic deployment and change outcome logging, a console timeline, and configurable alert filtering.

Includes documentation, a class diagram, and a manual CI workflow demonstrating simulated deployments and changes. Follows the existing log-aggregation module structure.

Validated with Java 21: all 5 tests pass, and Spotless formatting checks pass.

Fixes #2696

Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown

PR Summary

Implements a Microservices Log Deployments and Changes pattern, including a central log store, an execution wrapper that records outcomes, a monitor to render a console timeline and produce alerts, plus a demo App and test-suite. Adds a GitHub Actions workflow and documentation to illustrate integration and testing under Java 21.

Changes

File Summary
.github/workflows/log-deployments-and-changes.yml Introduces a GitHub Actions workflow to build and run the log deployments and changes demo module on Java 21, capturing simulated deployment events as an artifact.
microservices-log-deployments-and-changes/README.md Provides pattern overview, class diagram, Java example usage, and CI guidance for running tests and the demo app.
microservices-log-deployments-and-changes/pom.xml Defines the Maven module, dependencies (SLF4J, Logback, JUnit), and build plugin to package an executable JAR.
microservices-log-deployments-and-changes/src/main/java/com/iluwatar/logdeploymentsandchanges/App.java Demo application that runs a simulated deployment/change pipeline for two services, prints a timeline, and emits failure alerts.
microservices-log-deployments-and-changes/src/main/java/com/iluwatar/logdeploymentsandchanges/CentralLogStore.java In-memory central store collecting ChangeEvent history in insertion order with immutable snapshots.
microservices-log-deployments-and-changes/src/main/java/com/iluwatar/logdeploymentsandchanges/ChangeEvent.java Immutable data class describing a ChangeEvent, including timestamp, service, version, environment, actor, type, description and success flag.
microservices-log-deployments-and-changes/src/main/java/com/iluwatar/logdeploymentsandchanges/ChangeType.java Enumeration of operation kinds: DEPLOYMENT, CONFIGURATION, ENDPOINT, PROTOCOL.
microservices-log-deployments-and-changes/src/main/java/com/iluwatar/logdeploymentsandchanges/DeploymentPipeline.java Facade that executes operations, records ChangeEvent outcomes to the CentralLogStore, and preserves exceptions for callers.
microservices-log-deployments-and-changes/src/main/java/com/iluwatar/logdeploymentsandchanges/LogMonitor.java Provides timeline rendering and alert filtering by delegating to the CentralLogStore.
microservices-log-deployments-and-changes/src/test/java/com/iluwatar/logdeploymentsandchanges/AppTest.java Test validating that App.main prints a complete timeline and includes failure alerts.
microservices-log-deployments-and-changes/src/test/java/com/iluwatar/logdeploymentsandchanges/CentralLogStoreTest.java Tests history preservation, immutability of snapshots, and null handling when storing events.
microservices-log-deployments-and-changes/src/test/java/com/iluwatar/logdeploymentsandchanges/DeploymentPipelineTest.java Tests that all ChangeTypes are logged with metadata; verifies correct failure propagation.
microservices-log-deployments-and-changes/src/test/java/com/iluwatar/logdeploymentsandchanges/LogMonitorTest.java Tests empty and integrated scenarios for timeline rendering and production alerting.
pom.xml Root pom updated to include new module microservices-log-deployments-and-changes.

autogenerated by presubmit.ai

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚨 Pull request needs attention.

Review Summary

Commits Considered (1)
  • 9b61c6a: feat: add log deployments and changes pattern (#2696)

Signed-off-by: Arnab Nandy arnab_nandy7@yahoo.com

Files Processed (13)
  • .github/workflows/log-deployments-and-changes.yml (1 hunk)
  • microservices-log-deployments-and-changes/README.md (1 hunk)
  • microservices-log-deployments-and-changes/pom.xml (1 hunk)
  • microservices-log-deployments-and-changes/src/main/java/com/iluwatar/logdeploymentsandchanges/App.java (1 hunk)
  • microservices-log-deployments-and-changes/src/main/java/com/iluwatar/logdeploymentsandchanges/CentralLogStore.java (1 hunk)
  • microservices-log-deployments-and-changes/src/main/java/com/iluwatar/logdeploymentsandchanges/ChangeEvent.java (1 hunk)
  • microservices-log-deployments-and-changes/src/main/java/com/iluwatar/logdeploymentsandchanges/ChangeType.java (1 hunk)
  • microservices-log-deployments-and-changes/src/main/java/com/iluwatar/logdeploymentsandchanges/DeploymentPipeline.java (1 hunk)
  • microservices-log-deployments-and-changes/src/main/java/com/iluwatar/logdeploymentsandchanges/LogMonitor.java (1 hunk)
  • microservices-log-deployments-and-changes/src/test/java/com/iluwatar/logdeploymentsandchanges/CentralLogStoreTest.java (1 hunk)
  • microservices-log-deployments-and-changes/src/test/java/com/iluwatar/logdeploymentsandchanges/DeploymentPipelineTest.java (1 hunk)
  • microservices-log-deployments-and-changes/src/test/java/com/iluwatar/logdeploymentsandchanges/LogMonitorTest.java (1 hunk)
  • pom.xml (1 hunk)
Actionable Comments (3)
  • microservices-log-deployments-and-changes/src/test/java/com/iluwatar/logdeploymentsandchanges/DeploymentPipelineTest.java [98-98]

    possible bug: "Invalid List API usage in test"

  • microservices-log-deployments-and-changes/src/test/java/com/iluwatar/logdeploymentsandchanges/LogMonitorTest.java [78-78]

    possible bug: "Invalid List API usage in test"

  • microservices-log-deployments-and-changes/pom.xml [50-50]

    best_practice: "Missing JUnit API dependency"

Skipped Comments (0)

Comment thread microservices-log-deployments-and-changes/pom.xml
@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.82%. Comparing base (41625d8) to head (e7d5738).

Files with missing lines Patch % Lines
...ava/com/iluwatar/logdeploymentsandchanges/App.java 81.81% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3606      +/-   ##
============================================
+ Coverage     83.79%   83.82%   +0.02%     
- Complexity     4277     4297      +20     
============================================
  Files          1121     1127       +6     
  Lines         15144    15204      +60     
  Branches        723      724       +1     
============================================
+ Hits          12690    12744      +54     
- Misses         2159     2164       +5     
- Partials        295      296       +1     

☔ View full report in Codecov by Harness.
📢 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.

Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

Review Summary

Commits Considered (1)
  • e7d5738: test: cover deployment demo timeline and failure alerts (#2696)

Signed-off-by: Arnab Nandy arnab_nandy7@yahoo.com

Files Processed (1)
  • microservices-log-deployments-and-changes/src/test/java/com/iluwatar/logdeploymentsandchanges/AppTest.java (1 hunk)
Actionable Comments (0)
Skipped Comments (3)
  • microservices-log-deployments-and-changes/src/test/java/com/iluwatar/logdeploymentsandchanges/AppTest.java [61-61]

    maintainability: "Deterministic actor for timeline expectations"

  • microservices-log-deployments-and-changes/src/test/java/com/iluwatar/logdeploymentsandchanges/AppTest.java [56-56]

    best_practice: "Robustness of timeline detection"

  • microservices-log-deployments-and-changes/src/test/java/com/iluwatar/logdeploymentsandchanges/AppTest.java [89-93]

    maintainability: "Fragile assertion of warning messages"

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.

Microservice pattern: Log deployments and changes

1 participant