mitodl / ocw-studio

Open Source Courseware authoring tool
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

separately track publish_date and build_date #2168

Open gumaerc opened 2 months ago

gumaerc commented 2 months ago

Description/Context

First, a bit of prior discussion on this topic for reference:

https://github.com/mitodl/hq/discussions/3169 https://github.com/mitodl/hq/issues/2862

Currently, the publish_date field on a Website object is updated at the end of a run of SitePipeline in Concourse. When the site has been successfully published, a webhook call is made back to ocw-studio that tells it to update the publish_date field for that site. The main issue with this is that the pipeline code is not exclusively triggered by user interaction. When there is a change to ocw-hugo-themes or ocw-hugo-projects a rebuild of the entire website is triggered, thus updating publish_date for every website. The issue with this is that courses that have not had any publish action by a content author have their publish_date updated, even though no actual content changes were made. This makes it impossible to determine if a course has actually had changes published to production, or if the site has simply been rebuilt using the existing content.

Plan/Design

Currently, we have draft_publish_date and live_publish_date fields on the Website model. We should: