Apply database schema updates automatically in every deployment
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start with sql/changelog.xml, sql/updates/, and sql/texera_ddl.sql, then trace how local development, single-node deployment, Kubernetes, and CI initialize the database. The issue identifies the migration-tool choice, Kubernetes execution point, and baseline for databases without history as open decisions. Done means every deployment runs one migration step before services start, and CI detects when applying updates to the last release schema does not match texera_ddl.sql.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Task Summary
The resource unification in #9395 changes tables that every deployment already holds, one step at a time, so each step has to reach an existing database by itself. Today it does not. A schema change is written twice, as a numbered file in sql/updates/ listed in sql/changelog.xml and as an edit to sql/texera_ddl.sql, but only local development applies the numbered files on its own. Single-node and Kubernetes load texera_ddl.sql when the database is first created and never again, so upgrading an existing deployment means applying each new update by hand. CI loads only texera_ddl.sql, so nothing checks that the two copies agree.
Local development already follows a sound rule: a new database starts from texera_ddl.sql and records every update as applied, and an existing database applies the updates it lacks, in order. This task makes that rule the one migration step of every deployment, and checks it in CI.
Before
flowchart TB
ddl["sql/texera_ddl.sql<br/>the whole schema, edited by hand"]
upd["sql/updates/23.sql … 52.sql<br/>listed in sql/changelog.xml"]
ld["Local development<br/>applies pending updates"]
sn["Single-node<br/>updates by hand"]
k8s["Kubernetes<br/>updates by hand"]
ci["CI<br/>never runs an update"]
ddl -- "new database" --> ld
ddl -- "new database" --> sn
ddl -- "new database" --> k8s
ddl -- "every job" --> ci
upd --> ld
After
flowchart TB
ddl["sql/texera_ddl.sql<br/>for a new database"]
upd["sql/updates/NN.sql<br/>one ordered chain"]
step["One migration step<br/>runs before the services start"]
ld["Local development"]
sn["Single-node"]
k8s["Kubernetes"]
ci["CI<br/>also checks: last release's schema<br/>+ new updates = texera_ddl.sql"]
ddl --> step
upd --> step
step --> ld
step --> sn
step --> k8s
step --> ci
Scope
- One migration step. Single-node, Kubernetes, local development and CI run the same step before the services start, so an upgrade needs no SQL by hand.
- A check in CI. The updates, applied to the schema of the last release, must give the same schema as
texera_ddl.sql, so a pull request that changes one without the other fails. - One documented rule. The contributor guide says in one place what to write for a schema change.
This task changes no table. Removing the unused scripts 01 to 22 is #7702.
Discussion Points
- The tool. Liquibase already defines the chain in
sql/changelog.xml, and local databases already carry itsdatabasechangelogtable. Flyway, or the plain psql loop that local development runs today, are the alternatives. - Where the step runs on Kubernetes. A Helm hook job runs once per upgrade. An init container runs at every start of a service, and needs a lock so that two replicas do not migrate at once.
- Deployments with no history. A single-node or Kubernetes database has never recorded which updates it holds. The first run needs a baseline, either stated by the deployer or detected from the schema.
Done when an existing single-node or Kubernetes deployment upgrades to a release with a new update without anyone running SQL by hand, and CI fails when an update and texera_ddl.sql disagree.
Related: #4400, #6194.
Task Type
- Refactor / Cleanup
- DevOps / Deployment / CI
- Testing / QA
- Documentation
- Performance
- Other
- Lenguaje dominante
- Scala
- Estrellas
- 333
- Forks
- 202
- Merge medio
- 3 d 11 h
- PR fusionados (30 d)
- 185
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/texera
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
addOperator returns an error but still adds the operatorPosiblemente ocupada @sunny-kavixo la tomó hace 5 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/texera#9121 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Failed tool calls are marked as succeeded (isError is always false)Posiblemente ocupada @oliarmak-web la tomó hace 14 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
apache/texera#9120 · 8 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
apache/texera#8682 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/texera
Issues similares
-
? - Needs Triage bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
NVIDIA/cudf-spark#16937 ·
Los mantenedores suelen responder en 1 día
-
LFST not-issued-store count truncation can incorrectly clear strictShouldWaitPosiblemente ocupada @weidingliu la tomó hoy. Abiertomodule: memory type: bug/reported
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
OpenXiangShan/XiangShan#6974 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 3 días
-
bug indigo
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
PurpleKingdomGames/indigoengine#300 · 1 comentario ·
-
JavaReservoirSampleOperator returns the whole input when the dataset size is unknownPosiblemente ocupada @sasmith-14 la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/wayang#884 · 3 comentarios ·
Los mantenedores suelen responder en 2 días
-
AI Generated CI/CD ⚒️ Flaky-tests 🐦 python 🐍
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
valkey-io/valkey-glide#7722 ·
Los mantenedores suelen responder en 1 día