Skip to content

fix: project update during a restart starts the process twice - #580

Open
soupdiver wants to merge 1 commit into
F1bonacc1:mainfrom
soupdiver:fix/restart-reload-duplicate-loop-main
Open

soupdiver wants to merge 1 commit into
F1bonacc1:mainfrom
soupdiver:fix/restart-reload-duplicate-loop-main

Conversation

@soupdiver

@soupdiver soupdiver commented Nov 1, 2026 •

Copy link
Copy Markdown

While working on different projects I recognnized an annoying pattern. Sometimes my devenv shell would rebuild after a code change and then the process manager would get confused all over the place. I thought it's my local steup but it turns out that there is an issue when changes come in too quickly

If a process is replaced by a project update (e.g. POST /project/configuration) while it is restarting, the update starts a new > instance and the restart starts another one when its backoff ends. The second overwrites the first in runningProcesses, so > the first keeps running but can no longer be listed or stopped, and it outlives process-compose.

Removing or replacing a process now counts as a stop request, so the pending restart is dropped. As a fallback, > addRunningProcess stops a still-running instance that it replaces.

If a process is replaced by a project update (e.g. POST /project/configuration)
while it is restarting, the update starts a new instance and the restart starts
another one when its backoff ends. The second overwrites the first in
runningProcesses, so the first keeps running but can no longer be listed or
stopped, and it outlives process-compose.

Removing or replacing a process now counts as a stop request, so the pending
restart is dropped. As a fallback, addRunningProcess stops a still-running
instance that it replaces.
@sonarqubecloud

sonarqubecloud Bot commented Nov 1, 2026

Copy link
Copy Markdown

@soupdiver

Copy link
Copy Markdown
Author

Sounds related to #570

This branch has not been deployed

No deployments
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.

1 participant