We have 3 on premises instances of retool, which we are setting up using Github and the protected apps mechanism. We have moved our apps from another git repository across to github, and brought them into a development instance. I am however having problems getting the apps to recognise the resources configured on the new instance, despite them having (apparently) the correct resource names. On the original instance we had a resource called 'Production GIS1 (read)'. Our apps obviously use that name in their queries, and expect it to be there in the new instance. It was configured with that exact name, and in the instance's public.resources table in the underlying postgres DB showed that name in the 'displayName' field.
Unfortunately when I configured the resources on the new instance, including 'Production GIS1 (read)', the apps showed the message 'Could not find Production GIS1 (read). This error might occur if the resource was deleted.' :
Furthermore, the resource dropdown in the app shows those configured resources, but with an ' (postgres)' suffix on the name, that we did not configure:
Why is the query renamed in this way, such that named resources are then not found?
Furthermore, anytime a query has it's resource changed, the query text is lost and must be re-entered. Without a resolution for this, we would have to go in and reconfigure every query in every app that we have created, and rewrite every query's text. This would be a lot of work to say the least.
Is there a simple resolution to this, or a way to export resource configurations from one instance to another? I tried inserting the contents of the public.resources table to the new instance, but this did not seem to be picked up.
Before protecting your apps and syncing all your relevant Retool instances, make sure the app's resources exists in all Retool instances.
Once the resource resource-abc exists in all Retool instances (dev, staging, and prd, for example) then the github sync can be done successfully and Retool will be able to migrate your apps to the instance resources (even if the UUID is different).
The error I did was to git sync my apps, and after that, create the resources... Resources should exists before git syncing (or even importing) the app. Retool's "app migration" will then take care of the rest. Resources in all instances should have the same name of course.
Hi @philippe-boyd-maxa Thanks for the follow-ups and helpful insights β I'm happy to hear that you were able to successfully identify that workaround! As an alternative, I believe that you could also hit the Save and sync button within the Protected Applications Settings section of the Settings / Advanced page to rediscover the resources:
I'm having the same issue, but with Git Syncing. The production version didn't have all resources before git sync activation and now I don't know how to fix it :S
Does anyone know how to force the "app migration" with Git Syncing?
As of 2.110 there's actually much more robust support for protecting resources, you can check out the docs on it here! What version are you currently using?