Sanket Lakhani
Sanket Lakhani•9mo ago

Facing error when migrating windmill from our prod instance to staging one

I am trying to migrate production windmill environment to staging windmill environment. I have ran command "wmill sync pull" on prod workspace to pull everything from prod windmill, then switched workspace to staging one and ran "wmill sync push" but it throws error "Sql error: error returned from database: new row violates row-level security policy for table "folder" Server failed. Bad Request: Sql error: error returned from database: new row violates row-level security policy for table "folder"" Can someone guide me what's I can do to get through this. I have confirmed on prod windmill everything is stored in the folders, nothing specific to user. thanks in advance
No description
10 Replies
rubenf
rubenf•9mo ago
what version are you on ? Are you using an admin token ?
Sanket Lakhani
Sanket Lakhani•9mo ago
I am on v1.272.0 No I have authenticated from browser for all the workspaces Hello there, can someone please give some directions on this problem. Thanks in advance.
rubenf
rubenf•9mo ago
Use an admin token to do the sync. There are ways to not require it but they would require our guidance to be done well at the moment.
Sanket Lakhani
Sanket Lakhani•9mo ago
Thanks @rubenf but unfortunetly that didn't worked. I started from the scratch, added both (staging and prod) workspace using the token I generated from user > account settings > create token. Here's the sequence of commands I ran
1. wmill workspace add prod-workspace prod https://windmill.prod.ourdomain.com/ (authenticated with token)
2. wmill sync pull
3. wmill workspace add stage-workspace stage https://windmill.stage.ourdomain.com/ (authenticated with token)
4. wmill sync push --workspace stage-workspace --token <stage workspace token>
1. wmill workspace add prod-workspace prod https://windmill.prod.ourdomain.com/ (authenticated with token)
2. wmill sync pull
3. wmill workspace add stage-workspace stage https://windmill.stage.ourdomain.com/ (authenticated with token)
4. wmill sync push --workspace stage-workspace --token <stage workspace token>
ended up having the same error am I doing anything wrong here ?
No description
rubenf
rubenf•9mo ago
are you an admin in both workspaces ?
Sanket Lakhani
Sanket Lakhani•9mo ago
Oh, May be not. it shows super_admin: false here. I ended up deleting these three folders from the windmill directory (looked into it, saw it holds some initial configuration). And it worked like a charm 😅
No description
No description
rubenf
rubenf•9mo ago
now you folders have no more permissions which might be not what you want
Sanket Lakhani
Sanket Lakhani•9mo ago
Ok so basically I need to be superadmin of the workspace in order to move over everything ?
rubenf
rubenf•9mo ago
no, those errors are legit, they're saying you are pushing folders with permissions that wouldn't allow you to be a writer on them anymore but in the absence of that, if you want to not be limited by permissions you need to be an admin on the target workspace for a production setup and more precise support, you can always inquiry about the EE support
Sanket Lakhani
Sanket Lakhani•9mo ago
Ok that make sense, I will try changing my access level to admin. Thank you @rubenf