opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

[service/internal] Allow components to transition from PermanentError to Stopping

Open mwear opened this issue 1 year ago • 4 comments

Description

In #10058 I mentioned:

There is a tangentially related issue with PermanentErrors and the underlying finite state machine that governs transitions between statuses. Currently, a PermanentError is a final state. That is, once a component enters this state, no further transitions are allowed. In light of the work I did on the alternative health check extension, I believe we should allow a transition from PermanentError to Stopping to consistently prioritize lifecycle events for components. This transition also make sense from a practical perspective. A component in a PermanentError state is one that has been started and is running, although in a likely degraded state. The collector will call shutdown on the component (when the collector is shutting down) and we should allow the status to reflect that.

This PR makes the suggested change and updates the documentation to reflect that. As this is an internal change, I have not included a changelog. Also note, we can close #10058 after this as we've already removed status aggregation from core during the recent component status refactor.

Link to tracking issue

Fixes #10058

Testing

units

Documentation

Updated docs/component-status.md and associated diagram.

mwear avatar Aug 23 '24 17:08 mwear

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.43%. Comparing base (4782ad0) to head (a965a63). Report is 80 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10958   +/-   ##
=======================================
  Coverage   91.43%   91.43%           
=======================================
  Files         447      447           
  Lines       23743    23745    +2     
=======================================
+ Hits        21710    21712    +2     
  Misses       1657     1657           
  Partials      376      376           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 23 '24 17:08 codecov[bot]

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Sep 10 '24 03:09 github-actions[bot]

Pinging since the stalebot is engaging.

mwear avatar Sep 10 '24 20:09 mwear

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Oct 19 '24 03:10 github-actions[bot]

Closed as inactive. Feel free to reopen if this PR is still being worked on.

github-actions[bot] avatar Nov 06 '24 03:11 github-actions[bot]

Is there any chance this can be reopened? It was approved, but never merged.

mwear avatar Nov 20 '24 17:11 mwear