App not updating from automatic commits from github actions?

I have an app from a repo that I set up github actions to check for new data and push a commit each day. Here is an example commit. The first automatic update I had didn’t seem to work because streamlit didn’t check for file changes from non-imported files, so I added an import that gets updated with the latest to show the timestamp of the last data update in hopes that that would cause streamlit to recognize a dependent import changed. That seemed like it worked for one automatic commit from github actions, but now the latest commit linked above isn’t showing updates in the app.

Any suggestions on how to resolve this would be great. I’d like to get to the point where I can have new data automatically added to the repo (this part is done already with github actions) and the streamlit app automatically update to use the new data (broken part right now).

The Streamlit app will reload when the GitHub repo changes.
It looks like your GitHub Action did not commit any changes, either because there was no new data or there were no changes or because the Action is not working properly. I would take a look at the Github Action.

It made a commit to main 2 days ago, so that isn’t correct.

To confirm, I pulled the updates locally and ran the app which is using the new data. The current streamlit app is not using the data from that commit.

Edit: To be clear, the streamlit hosted app is not using the latest commit from actions-user 2 days ago. Pulling that commit locally and running shows the app using the data from that commit.

Could you try replacing your use of st.cache with the new st.cache_data with an explicit ttl so that it doesn’t use the cached data forever?

1 Like

Ok I updated streamlit and started using the new st.cache_data, but that didn’t seem to resolve it either. What I found was that used imported “constants” from another module wouldn’t rerun when changes were made to the streamlit app. I think this may be a result of the way I use my own multi page class since it only runs one imported function of each app I wrote.

Once I updated my different page apps functions that get called to call the cached function directly, then it seemed to work as expected. I was able to see the TTL expire by printing out when the cache function ran after waiting longer than the TTL period.

Thanks for the suggestions which helped me diagnose what was going on. I expect it should fix future commits from github actions, but I will have to wait until the next one to confirm.

1 Like