You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Path to parquet files not being hashed breaks caching model on hosted sites if we were to follow the same default pattern for a typical vite static sites.
Parquet files do not have a hash in the path anymore (@csjh mentioned this PR), this causes issues with cloud/hosting caching
Vite auto-hashes .css and .js files which varies between builds. This allows us to set a long cache expiry time on these files. As long as the index.html files are not cached and everything else is, the user should see the latest when browsing.
However, if parquet file name/paths are no longer hashed then we can't apply the same pattern - which is consequential given how large parquet files can be.
Notes from discussion.
Problem
Parquet files do not have a hash in the path anymore, this causes issues with cloud caching
Vite auto-hashes .css and .js files
.parquet files are large enough that caching them is important
Caching them makes looking at sources more difficult locally
Removal of outdated source files becomes more complex
Solution
As part of the build process, when we copy sources over to build, we should hash the content and update the manifest.json
Should include tests to ensure that built output has hashing for parquet paths
Checks both the manifest.json and the parquet filepaths
Steps to Reproduce
Deploy a site with cache expiry set to 1 hour
Rebuild the evidence project
The parquet files could be outdated after the rebuild
Note, this pattern may restrict any "remote parquet" solutions in the future, whereby users bring their own or point to parquet files which are not built by Evidence.
This would be a common pattern for e.g. Iceberg tables
Describe the bug
Path to
parquet
files not being hashed breaks caching model on hosted sites if we were to follow the same default pattern for a typical vite static sites.Parquet files do not have a hash in the path anymore (@csjh mentioned this PR), this causes issues with cloud/hosting caching
Vite auto-hashes
.css
and.js
files which varies between builds. This allows us to set a long cache expiry time on these files. As long as theindex.html
files are not cached and everything else is, the user should see the latest when browsing.However, if
parquet
file name/paths are no longer hashed then we can't apply the same pattern - which is consequential given how large parquet files can be.Notes from discussion.
Problem
Parquet files do not have a hash in the path anymore, this causes issues with cloud caching
Vite auto-hashes
.css
and.js
files.parquet
files are large enough that caching them is importantSolution
As part of the build process, when we copy sources over to
build
, we should hash the content and update themanifest.json
Should include tests to ensure that built output has hashing for parquet paths
manifest.json
and the parquet filepathsSteps to Reproduce
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information, or Workarounds
No response
The text was updated successfully, but these errors were encountered: