From 84f3fabc2f482040a4f35e31127ae54289845e84 Mon Sep 17 00:00:00 2001 From: Aleksandr Malyshev Date: Mon, 16 Sep 2024 09:27:58 +0300 Subject: [PATCH] [PLAT-15322] Make sure build files have fresh last_modified date to make sure Play Framework assets caching works as expected Summary: Play Framework sets ETag header for caching based on static resource last modified date. Currently, last modified date for our assets is always set at Jan 1, 2010 - which makes YBA UI to break after YBA upgrades. The reason is that browser is trying to use old index.html pagem which links to missing js files (js file names are generated somehow by UI build and is changing). This diff sets the environment variable, which sets file modification dates inside the build to a fresh timestamp. This will make sure browser downloads all the resources once after YBA upgrade and continue caching these after.. Test Plan: Built YBA package with yb_release. Made sure web asset files have the right last_modified date. Reviewers: nsingh, sanketh, rmadhavan Reviewed By: rmadhavan Subscribers: yugaware Differential Revision: https://phorge.dev.yugabyte.com/D38063 --- managed/yb_release | 1 + 1 file changed, 1 insertion(+) diff --git a/managed/yb_release b/managed/yb_release index 44c0dada8fc6..995473380a2d 100755 --- a/managed/yb_release +++ b/managed/yb_release @@ -14,6 +14,7 @@ fi set -euo pipefail export DEVOPS_HOME="${BASH_SOURCE%/*}"/devops +export SOURCE_DATE_EPOCH="$(date +%s)" . "$DEVOPS_HOME/bin/"/common.sh