Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis zombies in Wing Console #3492

Closed
skorfmann opened this issue Jul 17, 2023 · 3 comments · Fixed by #3806
Closed

Redis zombies in Wing Console #3492

skorfmann opened this issue Jul 17, 2023 · 3 comments · Fixed by #3806
Assignees
Labels
🐛 bug Something isn't working 🏎️ perf Related to performance 🎨 sdk SDK 🕹️ simulator Related to the `sim` compilation target

Comments

@skorfmann
Copy link
Contributor

I tried this:

bring cloud;
bring ex;
bring util;

let queue = new cloud.Queue();
let redis = new ex.Redis();

queue.setConsumer(inflight (message: str) => {
  redis.set("hello", message);
}, timeout: 3s);

test "Hello, world!" {
  queue.push("world!");

  let found = util.waitUntil((): bool => {
    log("Checking if redis key exists");
    redis.get("hello") != nil;
  });

  assert("world!" == "${redis.get("hello")}");
}

and run wing it in the same directory

This happened:

For each invocation of wing it, two redis containers are started. When stopping the the console, both redis containers are still running.

1st invocation

Screenshot 2023-07-17 at 13 41 51

2nd invocation

Screenshot 2023-07-17 at 13 42 53

I expected this:

All supporting processes / containers for the Wing console being stopped along with the console itself

Is there a workaround?

kill the docker containers manually

Component

Wing Console

Wing Version

0.24.31

Node.js Version

v18.16.0

Platform(s)

MacOS

Anything else?

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
@skorfmann skorfmann added the 🐛 bug Something isn't working label Jul 17, 2023
@Chriscbr Chriscbr added the 🕹️ simulator Related to the `sim` compilation target label Jul 17, 2023
@staycoolcall911
Copy link
Contributor

staycoolcall911 commented Jul 17, 2023

Just noticed I had 168 docker containers running on my machine 😄
Didn't affect my laptops performance much.
Let's prioritize that as p2.

@staycoolcall911 staycoolcall911 added the 🏎️ perf Related to performance label Jul 17, 2023
@ekeren
Copy link

ekeren commented Jul 30, 2023

moved to p1

@tsuf239 tsuf239 self-assigned this Aug 13, 2023
@mergify mergify bot closed this as completed in #3806 Aug 15, 2023
mergify bot pushed a commit that referenced this issue Aug 15, 2023
Fixes #3492 
* Happened because of un-handled SIGINT termination
* Prevented the simulator from being started twice (perhaps more work is needed- for stopping compilation from happening twice)
* Changed the error to a warning while cleaning resources- to be able to clean later resources if one fails

Here is the result:
https://www.loom.com/share/56bddc36c7724d3589a23aebf1141f7a

## Checklist

- [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted)
- [x] Description explains motivation and solution
- [ ] Tests added (always)
- [ ] Docs updated (only required for features)
- [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.25.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🏎️ perf Related to performance 🎨 sdk SDK 🕹️ simulator Related to the `sim` compilation target
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants