Porch: creation time for package revisions continuously updates
johnbelamaric opened this issue · 4 comments
Expected behavior
Creation time never changes.
Actual behavior
It changes every time the package is updated.
Information
https://github.com/GoogleContainerTools/kpt/blob/main/porch/pkg/git/package.go#L160
Was this done intentionally? What would happen if we fix it?
I have an auto-approve controller, but it won't touch the package revision until it has "aged" appropriately (that in and of itself is a workaround for concurrency issues). This can make it take a long time, even if there are no "real" updates happening still.
OCI looks like it doesn't have this behavior: https://github.com/GoogleContainerTools/kpt/blob/main/porch/pkg/oci/oci.go#L420
This is not intentional behavior, so I don't think there should be any problems with fixing it. We would just need to decide what would be the source for determining the creation date. We could probably do this by walking the commits pertaining to a package, but that could be somewhat expensive. Another option that sounds simpler is to just wire through the CreationTimestamp from the underlying CR we use to store metadata about PackageRevisions.
Cool, thanks. With #3993 I think the chaos of continuous updates is abating, so it may not be as much of an issue. But still should be fixed.