Skip to content

Add lifecycle_type backfill clock job#5196

Open
philippthun wants to merge 1 commit into
cloudfoundry:mainfrom
sap-contributions:lifecycle-type-backfill
Open

Add lifecycle_type backfill clock job#5196
philippthun wants to merge 1 commit into
cloudfoundry:mainfrom
sap-contributions:lifecycle-type-backfill

Conversation

@philippthun

Copy link
Copy Markdown
Member

A one-off clock job that backfills the lifecycle_type column on apps, droplets, and builds for rows that pre-date the column's introduction. Once all installations have run it long enough to drain those rows, this job will be removed.

The job processes up to 1000 (BATCH_SIZE) * 10 (BATCHES_PER_RUN) rows per table in short transactions, idempotent and bounded. It is defensive against missing columns: schema(:table) is checked on each invocation, so it would be safe to be shipped together with the migration that introduces the column.

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

A one-off clock job that backfills the lifecycle_type column on apps,
droplets, and builds for rows that pre-date the column's introduction.
Once all installations have run it long enough to drain those rows, this
job will be removed.

The job processes up to 1000 (BATCH_SIZE) * 10 (BATCHES_PER_RUN) rows
per table in short transactions, idempotent and bounded. It is defensive
against missing columns: schema(:table) is checked on each invocation,
so it would be safe to be shipped together with the migration that
introduces the column.
@philippthun philippthun force-pushed the lifecycle-type-backfill branch from 088537d to a16ae37 Compare June 16, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant