Skip to content

Add lifecycle_type column to apps, droplets, and builds#5065

Merged
philippthun merged 1 commit into
cloudfoundry:mainfrom
sap-contributions:lifecycle-type
May 19, 2026
Merged

Add lifecycle_type column to apps, droplets, and builds#5065
philippthun merged 1 commit into
cloudfoundry:mainfrom
sap-contributions:lifecycle-type

Conversation

@philippthun
Copy link
Copy Markdown
Member

@philippthun philippthun commented Apr 28, 2026

Store lifecycle_type directly on the model instead of deriving it from associated lifecycle data records. This simplifies queries and makes the lifecycle type explicit.

  • Add lifecycle_type column to apps, droplets, and builds tables
  • Set lifecycle_type in create actions (AppCreate, DropletCreate)
  • Add before_create hooks to builds/droplets to inherit from app
  • Add model validation for lifecycle_type values
  • Assign lifecycle_data back to model in lifecycle classes to ensure the in-memory association is set (avoids Sequel caching issues)
  • Add lifecycle type validation to DropletCopy
  • Update blueprints to set lifecycle_type explicitly
  • Fix shared example updated_at filtering to use allow_manual_update and explicit update instead of update_on_create: false
  • Replace inline timestamp workarounds with shared example usage in apps, droplets, and revisions request specs
  • 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

@philippthun philippthun force-pushed the lifecycle-type branch 3 times, most recently from a2b3ec0 to e107534 Compare April 28, 2026 10:21
@philippthun philippthun changed the title Lifecycle type Add lifecycle_type column to apps, droplets, and builds May 18, 2026
@philippthun philippthun marked this pull request as ready for review May 18, 2026 10:49
Comment thread app/models/runtime/build_model.rb Outdated
Comment thread app/models/runtime/build_model.rb Outdated
Store lifecycle_type directly on the model instead of deriving it from
associated lifecycle data records. This simplifies queries and makes the
lifecycle type explicit.

- Add lifecycle_type column to apps, droplets, and builds tables
- Set lifecycle_type in create actions (AppCreate, DropletCreate)
- Add before_create hooks to builds/droplets to inherit from app
- Add model validation for lifecycle_type values
- Assign lifecycle_data back to model in lifecycle classes to ensure
  the in-memory association is set (avoids Sequel caching issues)
- Add lifecycle type validation to DropletCopy
- Update blueprints to set lifecycle_type explicitly
- Fix shared example updated_at filtering to use allow_manual_update
  and explicit update instead of update_on_create: false
- Replace inline timestamp workarounds with shared example usage in
  apps, droplets, and revisions request specs
@philippthun philippthun merged commit 6e6d356 into cloudfoundry:main May 19, 2026
16 checks passed
ari-wg-gitbot added a commit to cloudfoundry/capi-release that referenced this pull request May 19, 2026
Changes in cloud_controller_ng:

- Add lifecycle_type column to apps, droplets, and builds
    PR: cloudfoundry/cloud_controller_ng#5065
    Author: Philipp Thun <philipp.thun@sap.com>
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.

2 participants