Skip to content

fix: log ERROR ActivityLog when reporting Health.down#7125

Merged
johnBgood merged 1 commit into
mainfrom
jrq-fix-activity-log-level-when-health-change
May 5, 2026
Merged

fix: log ERROR ActivityLog when reporting Health.down#7125
johnBgood merged 1 commit into
mainfrom
jrq-fix-activity-log-level-when-health-change

Conversation

@johnBgood
Copy link
Copy Markdown
Collaborator

Description

This pull request enhances the way health status changes are logged in the inbound connector context by introducing severity levels to activity logs. It also adds comprehensive tests to ensure the correct severity is set based on the health status.

Activity log severity improvements:

  • The reportHealth method in InboundConnectorContextImpl now logs health status changes with a severity level: INFO for UP status and ERROR for other statuses.

Testing enhancements:

  • Added tests in InboundConnectorContextImplTest to verify that the correct severity (INFO or ERROR) is set in the activity log when reporting health status changes.
  • Imported necessary classes (ActivityLogTag, Health, Severity) in the test file to support the new tests.

Checklist

  • Backport labels are added if these code changes should be backported. No backport label is added to the latest
    release, as this branch will be rebased onto main before the next release. Example backport labels:
    • backport stable/8.8: for changes that should be included in the next 8.8.x release.
    • or backport release-8.8.7: for changes that should be included in the specific release 8.8.7, and this
      release has already been created. The release branch will be merged back into stable/8.8 later, so the change
      will be included in future 8.8.x releases as well.
  • Tests/Integration tests for the changes have been added if applicable.
  • If the change requires a documentation update, it has been added to the appropriate section in the documentation.

@johnBgood johnBgood self-assigned this May 4, 2026
Copilot AI review requested due to automatic review settings May 4, 2026 14:35
@johnBgood johnBgood requested a review from a team as a code owner May 4, 2026 14:35
@johnBgood johnBgood requested a review from ztefanie May 4, 2026 14:35
Copy link
Copy Markdown
Contributor

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 adjusts inbound connector health-change activity logging so that health transitions are categorized with an explicit severity: INFO when the connector reports Health.up(), and ERROR for any other health status. It also extends the existing unit test suite to verify the new severity behavior.

Changes:

  • Set Activity.severity to INFO for Health.Status.UP, otherwise ERROR, when InboundConnectorContextImpl.reportHealth(...) logs a health change.
  • Add unit tests ensuring the correct severity is written to the activity log for both Health.up() and Health.down().

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
connector-runtime/connector-runtime-core/src/main/java/io/camunda/connector/runtime/core/inbound/InboundConnectorContextImpl.java Assigns severity based on health status when emitting the HEALTH activity entry.
connector-runtime/connector-runtime-core/src/test/java/io/camunda/connector/runtime/core/inbound/InboundConnectorContextImplTest.java Adds assertions that reportHealth(...) logs INFO for UP and ERROR for DOWN.

@johnBgood johnBgood added this pull request to the merge queue May 5, 2026
Merged via the queue into main with commit 9cc8822 May 5, 2026
51 of 54 checks passed
@johnBgood johnBgood deleted the jrq-fix-activity-log-level-when-health-change branch May 5, 2026 07:57
@team-connectors-int-automation
Copy link
Copy Markdown
Contributor

Successfully created backport PR for stable/8.8:

@team-connectors-int-automation
Copy link
Copy Markdown
Contributor

Successfully created backport PR for stable/8.9:

johnBgood added a commit that referenced this pull request May 5, 2026
(cherry picked from commit 9cc8822)

Co-authored-by: Jonathan Roques <jonathan.roques@camunda.com>
johnBgood added a commit that referenced this pull request May 5, 2026
(cherry picked from commit 9cc8822)

Co-authored-by: Jonathan Roques <jonathan.roques@camunda.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

🎉 This pull request has been included in release 8.9.3!

Thank you for your contribution! 🚀

@github-actions github-actions Bot added the version:8.9.3 Released in version 8.9.3 label May 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This pull request has been included in release 8.8.12!

Thank you for your contribution! 🚀

@github-actions github-actions Bot added the version:8.8.12 Released in version 8.8.12 label May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport stable/8.8 backport stable/8.9 version:8.8.12 Released in version 8.8.12 version:8.9.3 Released in version 8.9.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants