r-devel / translations-dashboard

Dashboard to monitor status of translations in R
https://contributor.r-project.org/translations-dashboard
8 stars 6 forks source link

Main dashboard: only update CSV and HTML when translations change #46

Open hturner opened 1 day ago

hturner commented 1 day ago

The GitHub action Creation of CSV (csv.yml) runs the translations_status.R script that creates the CSV files message_status.csv and metadata.csv. It is scheduled to run every day.

Most days there are no changes in the translations, however if there has been any new commit to the r-devel Subversion repo (and hence, a new commit to the r-svn GitHub mirror of this repository) the entire CSV file changes because the commit ID and date are added to the data.

The GitHub action Main Dashboard Refresh (main_dashboard.yml) re-renders the main dashboard index.Rmd every day, regardless of whether the source data (message_status.csv and metadata.csv) are updated or not.

Therefore large commits are being made on a daily basis that make no real change, bloating the repository as well as using unnecessary compute resources.

We should fix this by:

Another alternative would be to skip updating the HTML if there is no change to the data, but I think it is helpful to have the "last updated" date updated, even when the data hasn't changed, as it shows the data has been checked for changes. Otherwise, if the date is from several days ago you don't know if it's because there have been no updates or because the dashboard is failing to build.

hturner commented 1 day ago

Another fix to add to the list: