Configuring resources when moving apps between instances (using GH protected apps)


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.



Hey @jconroy thanks for raising this issue. We’re looking into it and will rely here with more info / questions soon.

@alex any news on this?

This type of workflow (Recommended workflow) doesn't currently work as apps are linked to resources by their ID and not their name

On instance 1, I have my resource named resource-abc with ID 88b3a9fc-6019-4d57-b8bc-5d9279f403d5

On instance 2, I have my resource named resource-abc with ID 7af7037b-f2b7-4281-bcf7-88d9b6c90eeb

Error on my app of instance-2 :

Could not find 88b3a9fc-6019-4d57-b8bc-5d9279f403d5. This error might occur if the resource was deleted or you do not have access to it.

I've found a workaround after @victoria's comment on this issue

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.

Would be nice to point this out in the doc...

Hi @philippe-boyd-maxa :wave: 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:

1 Like

Ah... well that's convenient, didn't think/know that would retrigger Retool's migration mechanism.



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?