-
Notifications
You must be signed in to change notification settings - Fork 53
Relationship between Release and Config / Build is the wrong way around #798
Comments
@helgi I see your point about strange behavior after deleting a |
We delete |
Sorry, #785 has the intentional mess up story that triggers this |
I think the third option seems the cleanest and most reasonable. If I understand correctly, every time a config value changes or a build changes we create a new release object. This is actually a pretty reasonable thing in my opinion. If you were doing releases manually and you needed to change config values that would more than likely result in a new release. |
…nstead of latest config for the app This helps mitigate deis#798 for day to day use (quick fix) as the previous config is no longer pulled from the top of the application config stack and instead pulls the latest release config. Doing that will prevent the logic from re-using a potentially broken Config object. When a Release object is deleted an Config object can be orphaned but still available.
…nstead of latest config for the app This helps mitigate deis#798 for day to day use (quick fix) as the previous config is no longer pulled from the top of the application config stack and instead pulls the latest release config. Doing that will prevent the logic from re-using a potentially broken Config object. When a Release object is deleted an Config object can be orphaned but still available.
…nstead of latest config for the app This helps mitigate deis#798 for day to day use (quick fix) as the previous config is no longer pulled from the top of the application config stack and instead pulls the latest release config. Doing that will prevent the logic from re-using a potentially broken Config object. When a Release object is deleted an Config object can be orphaned but still available.
…nstead of latest config for the app This helps mitigate deis#798 for day to day use (quick fix) as the previous config is no longer pulled from the top of the application config stack and instead pulls the latest release config. Doing that will prevent the logic from re-using a potentially broken Config object. When a Release object is deleted an Config object can be orphaned but still available.
…nstead of latest config for the app This helps mitigate deis#798 for day to day use (quick fix) as the previous config is no longer pulled from the top of the application config stack and instead pulls the latest release config. Doing that will prevent the logic from re-using a potentially broken Config object. When a Release object is deleted an Config object can be orphaned but still available.
…nstead of latest config for the app This helps mitigate deis#798 for day to day use (quick fix) as the previous config is no longer pulled from the top of the application config stack and instead pulls the latest release config. Doing that will prevent the logic from re-using a potentially broken Config object. When a Release object is deleted an Config object can be orphaned but still available.
This issue was moved to teamhephy/controller#64 |
docs(gke/boot): Add info on obtaining credentials
#792 has uncovered some inconsistencies in our data model on
Release
.Problem
Currently things are set up so that
Release
is the child object ofConfig
andBuild
via ForeignKey with CASCADE delete set.Each
Config
andBuild
object can be re-used across multipleRelease
objects, if nothing changes on the respective object. Such as: User A does 50 releases but they are only config changes, then the build object will always stay the same.In many parts of the code when doing
deploy
and that fails we only delete theRelease
object, thinking the ForeignKey relationship is going to take care of it but that doesn't happen sinceRelease
is a child object, not a parent.Why is this a problem?
If only the
Release
object is remove then theConfig
object stays behind. When creating new releases it seems we are doing things like selecting thelatest
Config
from theApp
or something... If the latestConfig
object is poisoned in a way that is hard to fix then.Basically the User ends up in a situation where it becomes pretty hard / impossible to recover from
Experiment
I did a quick experiment and used the DB directly after creating a few releases with combinations of config and build changes - First I tried deleting a release by hand, no config / build objects went away, and then I went and deleted a config object attached to 2 releases and both releases went away.
Potential solutions
I reviewed a few solutions and how they would affect us
Config
andBuild
objects can't be created withoutRelease
latest()
usages and try to reconcile thingsapp_id
making Release the only connection, turning a Release into a ledger of sortsRelease
as an artefact but will make the DB biggerThe text was updated successfully, but these errors were encountered: