windmill-labs / windmill

Open-source developer platform to power your entire infra and turn scripts into webhooks, workflows and UIs. Fastest workflow engine (13x vs Airflow). Open-source alternative to Retool and Temporal.
https://windmill.dev
Other
10.06k stars 484 forks source link

Previously stable code suddenly stopped working, only in full flows #4144

Closed hershagarwal closed 1 month ago

hershagarwal commented 3 months ago

I have a script that gets an authorization code from a website after logging in. It's used in several workflows, and has been working perfectly for a while. However, starting on Friday, it suddenly stopped, with the below error message.

If I test the step independently, it still works. However, when it runs as part of a flow (testing or deployed), it results in the below message. Seems like something changed on Windmill's side to cause this.

ExecutionErr: ExitCode: 1, last log lines:

14245 | } 14246 | } 14247 | class CDPClientAdapter extends BidiMapper.EventEmitter { ^ TypeError: undefined is not an object (evaluating 'BidiMapper.EventEmitter') at /tmp/bun/main.js:14247:42 note: missing sourcemaps for /tmp/bun/main.js note: consider bundling with '--sourcemap' to get unminified traces

Bun v1.1.18 (Linux arm64)

hershagarwal commented 3 months ago

The script is located at f/Procare/procare_auth called Procare Authorization Code. It's being used in Daily Time Card and Hourly Procare Alerts

rubenfiszel commented 3 months ago

Are you on the cloud ? If yes, what workspace ?

hershagarwal commented 3 months ago

Yes, on the cloud, the workspace is "allaroundchildren". Same error also occurring on "aac_procarereporting" workspace.

On Sun, Jul 28, 2024 at 12:57 PM, Ruben Fiszel @.***> wrote:

Are you on the cloud ? If yes, what workspace ?

— Reply to this email directly, view it on GitHub https://github.com/windmill-labs/windmill/issues/4144#issuecomment-2254580050, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQPCW6MW3W2IGG75CRKBFSLZOUPINAVCNFSM6AAAAABLS6HQE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGU4DAMBVGA . You are receiving this because you authored the thread.Message ID: @.***>

rubenfiszel commented 3 months ago

We added a new method to optimize runtime performance that pre-bundle the scripts.

It seems that those scripts in particular could not be bundled with bun 1.1.18 but can in 1.1.21 which we lastly deployed. To make sure your scripts get re-bundled, force it by making a slight change to the script (such as adding a comment) and then redeploy

Also as an escape hatch, one can add //nobundling but it seems not necessary here.

hershagarwal commented 3 months ago

Ahh gotcha ok.

I had actually tried something similar where I created a new script, and pasted the code, but actually ran into the same error. I would have though creating that new script would have fixed the issue, but it didn't.

However, I edited the code like you suggested and it appears to be working, so I think we're good.

Thanks! Hersh

On Sun, Jul 28, 2024 at 1:33 PM, Ruben Fiszel @.***> wrote:

We added a new method to optimize runtime performance that pre-bundle the scripts.

It seems that those scripts in particular could not be bundled with bun 1.1.18 but can in 1.1.21 which we lastly deployed. To make sure your scripts get re-bundled, force it by making a slight change to the script (such as adding a comment) and then redeploy

Also as an escape hatch, one can add //nobundling but it seems not necessary here.

— Reply to this email directly, view it on GitHub https://github.com/windmill-labs/windmill/issues/4144#issuecomment-2254589788, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQPCW6OY2WS3BA3OM6AKZGTZOUTPRAVCNFSM6AAAAABLS6HQE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGU4DSNZYHA . You are receiving this because you authored the thread.Message ID: @.***>