Skip to content

Commit

Permalink
Merge pull request #2863 from owid/dod-lightning-deploys
Browse files Browse the repository at this point in the history
🐛 Don't trigger lightning updates if dod document is updated
  • Loading branch information
ikesau authored Nov 1, 2023
2 parents c33b656 + 70e21f6 commit 70cfd1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions adminSiteClient/gdocsDeploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
omit,
} from "@ourworldindata/utils"
import { GDOC_DIFF_OMITTABLE_PROPERTIES } from "./GdocsDiff.js"
import { GDOCS_DETAILS_ON_DEMAND_ID } from "../settings/clientSettings.js"

export const checkFullDeployFallback = (
prevGdoc: OwidGdocInterface,
Expand Down Expand Up @@ -103,6 +104,7 @@ export const checkIsLightningUpdate = (
const nextOmitted = omit({ ...nextGdoc }, keysToOmit)

return (
prevGdoc.id !== GDOCS_DETAILS_ON_DEMAND_ID &&
hasChanges &&
prevGdoc.published &&
nextGdoc.published &&
Expand Down
3 changes: 3 additions & 0 deletions settings/clientSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@ export const IMAGE_HOSTING_BUCKET_SUBFOLDER_PATH: string =
// Fast-track settings, by default points to staging version. You need Tailscale to access it.
export const FASTTRACK_URL: string =
process.env.FASTTRACK_URL ?? "http://owid-analytics:8083/"

export const GDOCS_DETAILS_ON_DEMAND_ID: string =
process.env.GDOCS_DETAILS_ON_DEMAND_ID ?? ""

0 comments on commit 70cfd1b

Please sign in to comment.