I used to export an app as a json file on my dev environment and then import json on production environment, which works well.
However, now this flow is not working, because resource uuid is not same. It still works if I create a new app from scratch, but update an existing app from json doesn't work any more.
Hi there! I'm glad the export import flow is working.
Resources will need to exist in both environments with exactly the same name for them to connect to imported apps.
And as a quick, general note, this doesn't work well if you import from inside an app, so definitely try to import from the home page instead!
Hi @victoria ,
this issue could be linked to this one where apps are linked with resource IDs and not name.
Ah, it certainly could be!
I took a look at that thread and dug around our old conversations to see if I could find any additional context, and found this solution that was discussed with the user (not sure how relevant it is to your specific setup, however):
The solution there was to make a trivial change to the affected apps in dev on a new branch, merge into the main branch, and let Protected App sync propagate the changes to the higher environments.
The reason being is that we made a change a while ago to resource references and making an edit on these applications will trigger the migrations needed for the resources to be referenced correctly. You should be able to see a resourceName field being added to the query inside of the git diff view after making the change in dev.
Are you able to give this a shot and see if it fixed your resource references? If not, happy to take a closer look and determine what might be causing this issue.
Here are also a few links to relevant docs:
Let me know how it all goes or if you have any other questions!
Thanks for your comment, I've been able to figure it out as stated in my answer on this post
That is super good to know, thank you for sharing in both this thread and the other! I, and other users running into a similar issue, truly appreciate you taking the time! 🙏
thanks for your reply. I understand that it is not a bug but a feature. However, I do want to import from inside an app because i want to update it.
I don't use git sync because I don't want to sync all my apps between the two enviroments. So I prefer manual export from dev and import to production environment.
Hey @tRYxzrXq! Could you clarify a little more about the "feature"/bug you're running into? Are you unable to import any of your apps?
I have two instances of retool. One for dev and one for production.
If I develop a new app at dev, export as json, import to production, no problem.
However, When I made some changes to this app after some days (at dev), export as json, I cannot import the updated version to production.
🤔 that's not good! What do you mean when you say you can't import? Are you getting any errors? And this is when you create a new app > Import from JSON, is that correct?