Hi @victoria, I'm sadly actively looking to replace Retool right now because of this requirement but if this feature arrives soon enough and with the requirements that I need I will be able to keep using Retool.
I would really appreciate some visibility into what this feature is going to look like.
My needs:
I want to be able to define what environments exist (in my case: "dev", "staging", "prod", but I need to be able to define more if the need arises)
I want to be able to define environment variables for each environment
I want my resources to take their URLs from the environment variables according to the current env
I want to be able to "promote" changes in my Apps through different environments. For example, if I make a change to "dev" I want to be able to click a button (or better yet, use an API endpoint) to deploy that change to "staging" and later on do the same to "prod".
Hi @ypeled and @eric-every! Thank you both for sharing. I have good news! We've released this feature as a Beta feature (for now) and admins can enable it for their orgs
Navigate to Settings > Beta (or go to your-subdomain.retool.com/settings/beta)
Enable the "Multiple Environments" toggle
Please do let me know if you have any questions or feedback, and thank you to everyone in this thread for your +1s, additional context and extended patience.
@victoria
First impressions:
Amazing. This is what I was looking for. This was a deal breaker for us and I was close to migrating away from Retool, but this feature came just in time.
I have some questions about this feature (and 1 bug report - I can't delete an environment even though no resource is using it), but I'll save them for another ticket.
@victoria and whole ReTool Team , thank you so much for this feature ! We've been waiting for this for over 2 years. And finally yesterday we could drop 14 instances of ReTool leaving just one!
Few remarks:
[cosmetic] Once created 10th environment I've started getting complaint about unique color constraint - suppose it relates to limit of predefined colors. But actually is this uniqueness needed?
[nice to have] please allow to change „production” environment name
[nice to have] please show env description on the list when changing env in top top-left menu
[bug] I can’t change environment from any app page (environment list is not visible in top left menu) - it is possible to see env picker in Edit mode though. Current workaround is to switch to "Default Workspace" option is visible and go back to previous page.
[bug] I don't see env list in the menu when entering main page first time. Must firstly switch between workspaces.
It would be really great to change environment programmatically in a JS script with something like retoolContext.setEnvironment(name) - which would reload all queries
[user experience] When I was filling resources config for many environments (currently we have 15) and many times I've overridden accidentally "production"/default env - It would be great to have additional prompt asking to confirm the change in selected env? Maybe even you could use more visible color for highlighted env
If you need I can record a short video demonstrating mentioned bugs.
Thank you so much for taking the time to share that, @frakti this kind of feedback is so valuable. I passed that feedback along directly to the team that worked on this and will let you know if they need anything further from you!
it would be great to have current environment description exposed in retoolContext so we can use it in the page
Instead of (or next to?) retoolContext.setEnvironment(name) I've mentioned in previous post, maybe it would be even easier to introduce setting custom environment directly in a query advanced settings
If that field would be parametrized that's gonna be a killer feature for us!
Hi @frakti! An engineer is looking into this and we just wanted to clarify a couple things with you
"I can’t change environment from any app page (environment list is not visible in top left menu) - it is possible to see env picker in Edit mode though. Current workaround is to switch to "Default Workspace" option is visible and go back to previous page."
Are you referring to viewing an app in the preview mode? In that case, provided there are more than 1 enabled environments, there will be an environment picker in the navbar. Are you seeing different behavior?
I think we can ignore first issue - after we migrated to custom headers we now see environment picker on every App as expected. So this issue was related to previous design where navigation bar was at the top.
Regarding second issue:
"I don't see env list in the menu when entering main page first time. Must firstly switch between workspaces."
What does the main page refer to here? The homepage? Would you want to be able to toggle environments from the main page?
Yes, the homepage, when I login to retool or refresh page for root path / I see in top nav bar:
Then when go to any App and switch back to Default Workspace (from bottom nav menu). On home page nav bar I see:
Keep in mind we are using on-premise solution.
But since first issue is fixed it's not crucial for us to have this picker here.
Now that multiple environments are possible is the workaround you posted last year still necessary if you want each environment to run the same query but use a different resource? I would like to run the same app but be able to toggle between viewing production and staging data.
if (select1.value == "production") {
prodQuery.trigger()
} else if (select1.value == "staging") {
stagingQuery.trigger()
} else if (select1.value == "dev") {
devQuery.trigger()
}
Correct For the multiple environments feature, it allows you to set up different credentials for staging, test, dev, prod, etc. environments for the same resource. If you want to switch between different resources, you could still use the workaround!