Skip to content

Lifecycle type#5065

Draft
philippthun wants to merge 3 commits intocloudfoundry:mainfrom
sap-contributions:lifecycle-type
Draft

Lifecycle type#5065
philippthun wants to merge 3 commits intocloudfoundry:mainfrom
sap-contributions:lifecycle-type

Conversation

@philippthun
Copy link
Copy Markdown
Member

Thanks for contributing to cloud_controller_ng. To speed up the process of reviewing your pull request please provide us with:

  • A short explanation of the proposed change:

  • An explanation of the use cases your change solves

  • Links to any other associated PRs

  • 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

Kpack is dead code - the API validator rejects lifecycle_type 'kpack',
no LifecycleProvider support exists, and the infrastructure was never
completed. This removes the model, associations, blueprints, and tests.

DB migrations for kpack_lifecycle_data table are intentionally retained
for a future cleanup.
Migration specs roll back the schema before running, so model classes
may reference columns that don't exist yet. Using raw Sequel operations
ensures specs are independent of the current model code, as documented
in spec/migrations/Readme.md.

- Add Migration/NoModelInSpecs cop that flags any method call on a
  *Model constant receiver in spec/migrations/
- Replace model .make calls with raw db[:table].insert in four
  migration specs: sidecars, revision_sidecars, sidecar_process_types,
  and revision_process_commands
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
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.

1 participant