Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add baking script for archival bakes #4502

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

marcelgerber
Copy link
Member

@marcelgerber marcelgerber commented Jan 29, 2025

This implements milestone 1 of #4434: correctly referencing assets in an archival bake.

It:

  • content-hashes
    • JS & CSS assets
    • dods.json files
    • Data & metadata files
  • puts them into staticAssetMap and runtimeAssetMap, respectively
  • makes sure these are both propagated to the correct function calls

To run this locally, run the following:

yarn buildViteSite # builds JS & CSS into dist/ folder
VITE_PREVIEW=true npx tsx --tsconfig tsconfig.tsx.json ./baker/buildLocalArchivalBake.ts # build the latest archival build into archive/ dir
# VITE_PREVIEW is needed for now to correctly reference JS assets
npx serve archive/ # serves on localhost:3000

You can then navigate to localhost:3000, find the latest timestamp, and navigate to its /grapher/life-expectancy file beneath it.

@owidbot
Copy link
Contributor

owidbot commented Jan 29, 2025

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-archival-baker

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2025-01-29 15:52:13 UTC
Execution time: 1.23 seconds

@marcelgerber marcelgerber requested a review from rakyi February 4, 2025 17:34
@marcelgerber marcelgerber marked this pull request as ready for review February 4, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants