Lifecycle type#5065
Draft
philippthun wants to merge 3 commits intocloudfoundry:mainfrom
Draft
Conversation
a2b3ec0 to
e107534
Compare
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
e107534 to
ecf03f8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
mainbranchI have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests