I encountered a nasty bug causing owidbot to post "No charts for review," even when there were actual charts for review. The issue was that scan-chart-diff iterates over all staging servers, but get_staging_creation_time was using a cached value from the key staging_creation_time. This resulted in staging_creation_time being fetched for only the first staging server and reused for the others.
This PR resolves the issue by clearing the cache with st.session_state.clear() before processing each staging server and by using a unique key for caching staging_creation_time based on the engine in use.
I encountered a nasty bug causing
owidbot
to post "No charts for review," even when there were actual charts for review. The issue was thatscan-chart-diff
iterates over all staging servers, butget_staging_creation_time
was using a cached value from the keystaging_creation_time
. This resulted instaging_creation_time
being fetched for only the first staging server and reused for the others.This PR resolves the issue by clearing the cache with
st.session_state.clear()
before processing each staging server and by using a unique key for cachingstaging_creation_time
based on the engine in use.