Skip to content

Comments

fix(status-bar): invalid status reported when stopping LocalStack externally#39

Merged
skyrpex merged 2 commits intomainfrom
fix-invalid-status-reported-when-stopping-localstack-externally
Sep 8, 2025
Merged

fix(status-bar): invalid status reported when stopping LocalStack externally#39
skyrpex merged 2 commits intomainfrom
fix-invalid-status-reported-when-stopping-localstack-externally

Conversation

@skyrpex
Copy link
Collaborator

@skyrpex skyrpex commented Sep 8, 2025

Fix status bar incorrectly reporting LocalStack as starting when stopping in certain scenarios

if (healthCheck === true) {
return "running";
} else {
if (previousStatus === "running" || previousStatus === "stopping") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

if previousStatus is stopping, shouldn't we return starting?

Copy link
Collaborator Author

@skyrpex skyrpex Sep 8, 2025

Choose a reason for hiding this comment

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

It's a good question and I guess it deserves an explanatory comment in-code.

Without the || previousStatus === "stopping" check, we get a wrong behavior:

  • When stopping LS externally, we would first go from "running" to "stopping", which is correct.
  • But the next health check will go from "stopping" to "starting", which is wrong.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That was tricky, and the explanation is very clear 🙌🏼

…ernally

Fix status bar incorrectly reporting LocalStack as starting when stopping in certain scenarios
@skyrpex skyrpex force-pushed the fix-invalid-status-reported-when-stopping-localstack-externally branch from 6003ff2 to d601de2 Compare September 8, 2025 12:56
@skyrpex skyrpex merged commit 1d06af7 into main Sep 8, 2025
3 checks passed
@skyrpex skyrpex deleted the fix-invalid-status-reported-when-stopping-localstack-externally branch September 8, 2025 13:01
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.

2 participants