Scripts missing from flow after update
I've just updated for the first time in a while and now when I try to add a workspace script to a flow I can only see two (of 5) folders.
The rest of my folders and their contents are still visible in the workspace home, and the scripts that had been added to the flow before I updated are still there. When I open any of the "missing" python scripts I'm also asked to save or discard changes despite making no alterations.
52 Replies
Were the scripts in there draft only maybe ?
That's never been an issue before.
we changed that behavior
which is why i'm asking
Okay, good to know. it's not just that the scripts are missing though, the entire folder is completely gone from the flow editor. Including scripts that aren't drafts.
what do you mean by folders are missing
and are you sure there are scripts with not just draft_only missing from there
if yes, could you share some screen of home menu and the list of the flow's script picker please
Under "use pre-made action script" no scripts from that folder showed up, and the entire folder itself was missing from the selection.
I did just get it to return by deploying a script.
ok most likely there were only draft only scripts in there prior
it's all working as intended
it doesn't show folders with no relevant scripts in them
Nope, many were non-draft
can you share a screen of that
I think what happened is it lost track of the fact some scripts had been previously deployed.
it doesn't work like that
Probably because I haven't updated in long enough
Let me put together that screenshot
Okay I feel dirty doing it this way but I don't have discord on my work machine for obvious reasons.
What you're seeing is folder X with a non-draft script. That folder, and it's scripts, don't show up in the flow editor.
@Hugo thoughts?
My guess is I jumped too many versions in a single update and what's happening is the new system doesn't realise that "send error email" script is deployed.
no it doesn't work like that
can you try creating a new script in the folder?
Fair enough. Also is there a change log I should have been following so this change wouldn't have caught me by surprise?
https://github.com/windmill-labs/windmill/releases
but only draft only items should be hidden
I just made a new script in that folder and deployed it. The test script and folder are now visible but not the non-test script that's previously deployed.
is that script labelled as an Error Handler Kind ?
There's multiple deployed scripts in that folder
the one that you're saying is not showiing
it probably is
None of them are showing
could you answer the question pl
the script kind is here on the bottom right
Ruben you're focusing on the fact that one script that was at the top of a hasty phone screenshot was the wrong type and missing that I've got dozens of scripts that are deployed and not showing up
I can take another picture of an entire folder of deployed scripts where only the two or three I've "deployed" post update are visible. It would just take longer to redact the confidential information.
Doing a migration has no impact on your existing scripts, it doesn't work like that, could you please give us all the information so that, if there is a bug, we can root cause it as fast as possible
that would include showing us the details of a script that should be showing and is not shown
so of the right kind and non draft-only
I don't know what to tell you then because I'm looking at an entire folder where every single script is deployed and only the three I've re-deployed since talking to you appear in the flow editor. They're all action scripts.
@rubenf i think they have draft only set to true but no drafts so we don't see the badge
in what situation can that arise @Hugo ?
@D3SL can you look in the network tab if draft_only is set to true on those invisible scripts?
alternatively, run this in your db and replace path with the right one:
Where would I find the "network" tab? I might be having an "if it was a snake" moment here but I don't recall ever seeing anything labeled that
I mean in the browser developer inspector
OH I was looking in your UI
On the workspace scripts page inspect element has no instances of "draft_only"
Please run this in your db:
Will do
Okay took me a minute to get connected. All but three scripts are set to draft only, three have NULL values for that
alright not good, what version were you on before? Have you ever manually executed SQL commands on the database?
btw you can fix your problem by redeploying all the scripts
Never touched the DB and I'm not sure what version I was on before. My previous docker image was created on 2024-06-08 so possibly 1.342.0.
mmm then hard to say what caused the issue, can you try creating a script, saving a draft but not deploying it then returning to the home page and checking that it displays the "draft only" badge?
I've just made a fine looking script (the automatic name was too perfect) and it does indeed show "draft only"
alright 👍 i guess your scripts were in a buggy state, were they deployed a long time ago?
Some as recently as right before I updated, but with your release schedule jumping from 1.342.0 to 1.355.2 could be considered "a long time" in terms of changing code base.
no that's not a long time
The only other thing I can think of is that I gave local development a shot briefly but found it more cumbersome than drafting a script, dropping it into a flow, and then iterating it right there in the flow's pop out editor. I did run into the occasional glitch when I mixed using the dedicated script editor in one tab while having the flow open in another tab and not hard-refreshing the page.
There a way to bulk redeploy everything?
Might be unwarranted but I'm assuming just setting the whole column to null in the scripts table would break things.
it wouldn't
Fantastic, thanks. Is there any kind of historic or diagnostic data I can provide that would help? Export from the DB or anything?
if you can find out how those scripts were created that would be most helpful
doing draft + deploy, does not result in the draft_only field being set to true
so we're scratching our head how could that ever happen
A combination of creating them in the browser editor and then inserting them into a flow, with lots of editing them inside the flow, and a bunch were also made locally then pushed.
It's probably not this but what would happen if I added draft scripts to a flow and deployed the flow but never the scripts, could that result in the "draft" tag being removed from the UI in the workspace home but the script still being set as "draft_only"?
the issue is to a save workspace script from inside the flow builder when the script is draft only, thanks for the additional info!