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.
Description
Initial change:
We no longer need to use the digest to pull the image in case of
CodeModulesImage
, so now we just use the ref we get from the user, and use that string (base64 encoded) as the folder name.To make the change actually work:
I had to update the way we do things all around the new GORM implementation, so that we are utilising the data in the new database schema in a way that "make more sense".
OSMounts
have to be cleaned up, otherwise theTenantConfigs
can't be cleaned upTenantConfigs
(this is more of a cosmetic problem)CodeModule
foreign-key in anAppMount
has to be set to Null in case theAppMount
is deleted, so theCodeModule
can be deleted if its not used. (DeletedAppMounts
no longer use the relatedCodeModule
)CodeModule
is not cleaned-up soon ™️ then you will have a problem with theUNIQUE
constraint if the same version would be downloaded.UNIQUE
constraint. (mainly for theCodeModules
)VolumeMeta
that is actually not correct anymoreHow can this be tested?
Play around with the csi-driver, check that the
CodeModulesImage
works, check that there are no database errors in the logs.Check if the garbage-collection works, make sure its not too aggressive.
Sidenote: I still want to add more unit-tests, especially to the "Cleaner" parts, but its ready to be reviewed