temporalio / helm-charts

Temporal Helm charts
MIT License
299 stars 329 forks source link

Overwrite the schema during initialization step #377

Closed mindaugasrukas closed 1 year ago

mindaugasrukas commented 1 year ago

What was changed

Added a flag to overwrite schema during the schema initialization step.

$ temporal-cassandra-tool setup-schema -h
NAME:
   temporal-cassandra-tool setup-schema - setup initial version of cassandra schema

USAGE:
   temporal-cassandra-tool setup-schema [command options] [arguments...]

OPTIONS:
   --version value, -v value      initial version of the schema, cannot be used with disable-versioning
   --schema-file value, -f value  path to the .cql schema file; if un-specified, will just setup versioning tables
   --disable-versioning, -d       disable setup of schema versioning
   --overwrite, -o                drop all existing tables before setting up new schema

Why?

Sometimes the schema-update step fails due to incorrectly setup-schema results. I guess the job is being restarted in the middle of the process, leaving the DB in the wrong state and not allowing it to proceed with the schema-update process.

Checklist

  1. Closes No

  2. How was this tested: CICD

  3. Any docs updates needed? No

mindaugasrukas commented 1 year ago

It's intentional to fail.