Skip to content

🐛 Follow grapher's chart column renames for the ETL layer - #6765

Merged
pabloarosado merged 2 commits into
etl-chartsfrom
etl-charts-column-renames
Aug 26, 2026
Merged

🐛 Follow grapher's chart column renames for the ETL layer#6765
pabloarosado merged 2 commits into
etl-chartsfrom
etl-charts-column-renames

Conversation

@pabloarosado

@pabloarosado pabloarosado commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Written by Claude Fable 5 — @pabloarosado at the wheel.

Stacked on #6511 "Charts as first-class citizens in ETL, addressed by chart config UUID". One commit, no behaviour change.

owid/owid-grapher#6826 "ETL-authored chart configs, addressed by chart config UUID" renamed two columns of the charts table after the ETL branch was last refreshed:

  • charts.configIdETLcharts.patchConfigIdETL (an authored layer, like charts.patchConfigId and variables.patchConfigIdETL)
  • charts.catalogPathcharts.etlConfigCatalogPath (the step that owns the ETL layer; not an identifier)

Without this, the ETL branch cannot load a chart from a grapher running that PR: chart-diff fails with Unknown column 'charts.configIdETL' as soon as a chart is listed (observed on staging-site-chart-diff-layers).

This renames the ORM columns and every read of them in chart-diff, chart-sync and etl chart-config-id, and makes the probe that checks whether production already has the columns look for the new names.

Test plan

  • Unit tests for chart-diff, the grapher model and the chart-config-id CLI pass; make check clean.
  • Against a staging server running the grapher branch, chart-diff and chart-sync (dry run) were exercised end to end on the chick-culling chart: unrelated production edits are not listed, a rebuild or a staging admin edit is listed, a production edit after the staging server was created shows as a conflict, and an approval expires when production is edited afterwards.

🤖 Generated with Claude Code

pabloarosado and others added 2 commits August 26, 2026 19:47
owid/owid-grapher#6826 renamed charts.configIdETL to charts.patchConfigIdETL
(an authored layer, like charts.patchConfigId and variables.patchConfigIdETL)
and charts.catalogPath to charts.etlConfigCatalogPath (the step that owns the
ETL layer, not an identifier). Rename the ORM columns and every read of them
in chart-diff, chart-sync and the chart-config-id CLI, and check for the new
names when probing whether production has the columns yet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@owidbot

owidbot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs Docs Preview

Login: ssh owid@staging-site-etl-charts-column-renames

chart-diff: ✅ No charts for review.
data-diff: ✅ no differences

No differences found.

Automatically updated datasets matching excess_mortality|covid|fluid|flunet|country_profile|garden/ihme_gbd/2019/gbd_risk are not included. Run locally with etl diff REMOTE data/ --include <dataset> --verbose.

Edited: 2026-08-26 17:50:05 UTC
Execution time: 9.36 seconds

@pabloarosado
pabloarosado marked this pull request as ready for review August 26, 2026 18:06
@pabloarosado

Copy link
Copy Markdown
Contributor Author

@codex review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates ETL to follow the renamed Grapher chart columns, preserving chart diffing, synchronization, and config lookup compatibility.

Changes:

  • Renames ORM fields and all chart-related references.
  • Updates schema capability detection and tests.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
etl/grapher/model.py Maps the renamed Grapher columns.
apps/wizard/app_pages/chart_diff/chart_diff.py Uses renamed fields for matching and schema detection.
apps/chart_sync/cli.py Reads the renamed ETL catalog path.
apps/chart_config_id/cli.py Updates compatibility documentation.
tests/apps/wizard/app_pages/chart_diff/test_chart_diff.py Updates chart test fixtures.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: d5736c8ca9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pabloarosado
pabloarosado merged commit 5fb2e6b into etl-charts Aug 26, 2026
11 of 12 checks passed
@pabloarosado
pabloarosado deleted the etl-charts-column-renames branch August 26, 2026 18:12
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.

3 participants