Conversation
kalleep
reviewed
Jan 30, 2026
kalleep
reviewed
Feb 4, 2026
Contributor
kalleep
left a comment
There was a problem hiding this comment.
LGTM, thanks for walking me through this.
I think the comments are sufficient as is 👍
kalleep
approved these changes
Feb 4, 2026
grafana-alloybot bot
pushed a commit
that referenced
this pull request
Feb 4, 2026
…w ones (#5401) ### Brief description of Pull Request Adjust the ordering for component scheduling so that we give components time to shutdown before we start new components. If components take too long we will still move on but always wait for all components to shutdown during scheduling. ### Pull Request Details We have run in to issues with components which bind shared resources not being able to release those resources when the component is rescheduled due to a module rename / component rename. An example of this is the `loki.source.syslog` component which will bind 1 or more ports depending on the listener config. This causes issues with our current implementation where shutdown/startup order is not defined, 1. Old components are told to shutdown 2. As soon as all old components have been told to shutdown, new components are started 3. If the syslog component did not shutdown fast enough the new component will fail to bind ports 4. Failing to bind ports does not cause the syslog component to exit we just won't open the listener forcing a user to restart alloy to resolve the problem ### Issue(s) fixed by this Pull Request I need to look to see if there are issues which describe this sort of behavior ### Notes to the Reviewer This PR is intended to work with components which bind resources when Run. We have multiple components which bind resources when the is newly created before running. This causes a panic instead which will be resolved in a separate PR. I chose to leave an escape hatch on shutdown because our default component shutdown timeout is 10 minutes. This is incredibly long to leave a pipeline offline. Using the warning log window of 1 minute felt much safer. ### PR Checklist - [x] Tests updated (cherry picked from commit 0fb959d)
This was referenced Feb 4, 2026
Draft
kgeckhart
added a commit
that referenced
this pull request
Feb 12, 2026
…w ones [backport] (#5443) ## Backport of #5401 This PR backports #5401 to release/v1.13. ### Original PR Author @kgeckhart ### Description ### Brief description of Pull Request Adjust the ordering for component scheduling so that we give components time to shutdown before we start new components. If components take too long we will still move on but wait for all to shutdown during scheduling. ### Pull Request Details We have run in to issues with components which bind shared resources not being able to release those resources when the component is rescheduled due to a module rename / component rename. An example of this is the `loki.source.syslog` component which will bind 1 or more ports depending on the listener config. This causes issues with our current implementation where shutdown/startup order is not defined, 1. Old components are told to shutdown 2. As soon as all old components have been told to shutdown, new components are started 3. If the syslog component did not shutdown fast enough the new component will fail to bind ports 4. Failing to bind ports does not cause the syslog component to exit we just won't open the listener forcing a user to restart alloy to resolve the problem ### Issue(s) fixed by this Pull Request I need to look to see if there are issues which describe this sort of behavior ### Notes to the Reviewer This PR is intended to work with components which bind resources when Run. We have multiple components which bind resources when the is newly created before running. This causes a panic instead which will be resolved in a separate PR. I chose to leave an escape hatch on shutdown because our default component shutdown timeout is 10 minutes. This is incredibly long to leave a pipeline offline. Using the warning log window of 1 minute felt much safer. ### PR Checklist - [x] Tests updated --- *This backport was created automatically.* Co-authored-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief description of Pull Request
Adjust the ordering for component scheduling so that we give components time to shutdown before we start new components. If components take too long we will still move on but wait for all to shutdown during scheduling.
Pull Request Details
We have run in to issues with components which bind shared resources not being able to release those resources when the component is rescheduled due to a module rename / component rename. An example of this is the
loki.source.syslogcomponent which will bind 1 or more ports depending on the listener config. This causes issues with our current implementation where shutdown/startup order is not defined,Issue(s) fixed by this Pull Request
I need to look to see if there are issues which describe this sort of behavior
Notes to the Reviewer
This PR is intended to work with components which bind resources when Run. We have multiple components which bind resources when the is newly created before running. This causes a panic instead which will be resolved in a separate PR.
I chose to leave an escape hatch on shutdown because our default component shutdown timeout is 10 minutes. This is incredibly long to leave a pipeline offline. Using the warning log window of 1 minute felt much safer.
PR Checklist