Skip to content

Commit

Permalink
[PLAT-15322] Make sure build files have fresh last_modified date to m…
Browse files Browse the repository at this point in the history
…ake 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
  • Loading branch information
anmalysh-yb committed Sep 17, 2024
1 parent 0b37479 commit 84f3fab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions managed/yb_release
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 84f3fab

Please sign in to comment.