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

Function with infinite loop keeps on spewing logs even after hot reloading a change of code that deletes it #4087

Closed
ShaiBer opened this issue Sep 5, 2023 · 4 comments
Assignees
Labels
🐛 bug Something isn't working 🕹️ simulator Related to the `sim` compilation target

Comments

@ShaiBer
Copy link
Contributor

ShaiBer commented Sep 5, 2023

I tried this:

Wrote this code:

bring cloud;
bring util;

new cloud.Function(inflight () => {
  while true {
    log("Weeeeee");
    util.sleep(1s);
  }
});

Then invoked the function and saw the logs starting to appear.

Then I deleted the function, so my code is this:

bring cloud;
bring util;

This happened:

After the console hot reloaded the new code, the Function was removed from the map view, but the "Weeee" logs kept appearing every second

I expected this:

The logs to stop coming in

Is there a workaround?

No response

Component

SDK

Wing Version

No response

Node.js Version

No response

Platform(s)

No response

Anything else?

I was doing this test in the playground.

Also, if I changed the sleep time to 1ms the playground crashed after a short time..

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.
@ShaiBer ShaiBer added the 🐛 bug Something isn't working label Sep 5, 2023
@monadabot monadabot added this to Wing Sep 5, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New - not properly defined in Wing Sep 5, 2023
@ShaiBer ShaiBer changed the title Function with infinite loops keeps on spewing logs even after hot reloading a change of code that deletes it Function with infinite loop keeps on spewing logs even after hot reloading a change of code that deletes it Sep 5, 2023
@staycoolcall911 staycoolcall911 moved this from 🆕 New - not properly defined to 🤝 Backlog - handoff to owners in Wing Sep 6, 2023
Copy link

github-actions bot commented Nov 6, 2023

Hi,

This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days.
Feel free to re-open this issue when there's an update or relevant information to be added.
Thanks!

@github-actions github-actions bot added the Stale label Nov 6, 2023
@staycoolcall911 staycoolcall911 moved this from 🤝 Backlog - handoff to owners to 🆕 New - not properly defined in Wing Nov 6, 2023
@skyrpex
Copy link
Contributor

skyrpex commented Nov 8, 2023

I think this belongs to the simulator.

@Chriscbr

@Chriscbr Chriscbr added 🕹️ simulator Related to the `sim` compilation target and removed 🛫 console Console labels Nov 8, 2023
@staycoolcall911 staycoolcall911 moved this from 🆕 New - not properly defined to 🤝 Backlog - handoff to owners in Wing Jan 1, 2024
Copy link

Hi,

This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days.
Feel free to re-open this issue when there's an update or relevant information to be added.
Thanks!

@github-actions github-actions bot added the Stale label Feb 26, 2024
@Chriscbr Chriscbr added this to the Winglang Stable Release milestone Feb 29, 2024
@Chriscbr Chriscbr self-assigned this Apr 5, 2024
@Chriscbr
Copy link
Contributor

Chriscbr commented Apr 5, 2024

This bug has since been fixed (the inflight code now runs in an external process which can be killed - see #5554)

@Chriscbr Chriscbr closed this as completed Apr 5, 2024
@github-project-automation github-project-automation bot moved this from 🤝 Backlog - handoff to owners to ✅ Done in Wing Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🕹️ simulator Related to the `sim` compilation target
Projects
Archived in project
Development

No branches or pull requests

4 participants