Closed philippthun closed 1 week ago
DropletsController: check if droplet is in use (i.e. app's current droplet) and raise an ApiError (UnprocessableEntity)
DropletsController
ApiError
UnprocessableEntity
Prepare for the introduction of a foreign key from apps.droplet_guid to droplets.guid:
apps.droplet_guid
droplets.guid
DropletModel: handle ForeignKeyConstraintViolation and translate into ApiError (UnprocessableEntity)
DropletModel
ForeignKeyConstraintViolation
AppModel: handle ForeignKeyConstraintViolation and translate into ValidationFailed error
AppModel
ValidationFailed
DropletDelete: move destroy before other operations (deletion from blobstore, recording of event) so that an exception stops the control flow
DropletDelete
AppDelete: clear droplet_guid (i.e. current droplet relation) before deleting subresources (incl. droplets)
AppDelete
droplet_guid
AppAssignDroplet: handle ValidationFailed error and translate into already existing error
AppAssignDroplet
Adapt tests to also work with a foreign key
[x] I have reviewed the contributing guide
[x] I have viewed, signed, and submitted the Contributor License Agreement
[x] I have made this pull request to the main branch
main
[x] I have run all the unit tests using bundle exec rake
bundle exec rake
[ ] I have run CF Acceptance Tests
DropletsController
: check if droplet is in use (i.e. app's current droplet) and raise anApiError
(UnprocessableEntity
)Prepare for the introduction of a foreign key from
apps.droplet_guid
todroplets.guid
:DropletModel
: handleForeignKeyConstraintViolation
and translate intoApiError
(UnprocessableEntity
)AppModel
: handleForeignKeyConstraintViolation
and translate intoValidationFailed
errorDropletDelete
: move destroy before other operations (deletion from blobstore, recording of event) so that an exception stops the control flowAppDelete
: cleardroplet_guid
(i.e. current droplet relation) before deleting subresources (incl. droplets)AppAssignDroplet
: handleValidationFailed
error and translate into already existing errorAdapt tests to also work with a foreign key
[x] I have reviewed the contributing guide
[x] I have viewed, signed, and submitted the Contributor License Agreement
[x] I have made this pull request to the
main
branch[x] I have run all the unit tests using
bundle exec rake
[ ] I have run CF Acceptance Tests