Versioning and anvil-uplink

Hi all,

Versioning is fairly new to me and i was tasked to make changes to an online anvil-app which is using a uplink. I my case i wanted to create a dev branch to keep the live app up and running while doing my tests with the new code.

I was a bit uncertain if versioning and a private published link with a “separate” anvil-uplink was going to solve this. So i created a simple test project to try it out and all seems to work fine!
So i am happy to share my knowledge with this if anyone is faced with the same problem.

Master branch - button that calls a “server-uplink-method”, called get_data

Settings for the published master branch, including server-uplink key

Code for anvil-uplink using jupyter - the key points/matches the key in the published master branch

Trying out the app - when pushing the button “master uplink” to the left will print “hello from your machine, master client!” in the server-uplink-method get_data and also return [1,2,3,4] to the ui

Dev branch is created - added another button called dev-uplink that still calls the same method name get_data

Added another environment called PRIVATE DEV BRANCH (important to change the branch in App version), including server-uplink key (not the same as master uplink key)

Code for anvil-uplink - the key points/matches the key in the published private dev branch. Note that the method name get_data is still the same but now we are returning [9,8,7,6] instead

Trying out the app using the private link - when pushing either buttons to the left we will only trigger the uplink which was created for dev branch. Meaning get_data will return [9,8,7,6] to the ui.
I also want to mention that the master uplink was running inside another python script while doing this test and no calls was sent to this uplink from dev branch, which is correct.

Hope someone finds this useful :slight_smile:

3 Likes