-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Porch: creation time for package revisions continuously updates #3992
Comments
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. |
…tamp - wired CreationTimestamp in from underlying PackageRev CR when getting a PackageRevision together from Git - as mentioned as an option in old comment kptdev/kpt#3992 (comment) - and same in OCI implementation for consistency's sake - previous implementation got CreationTimestamp from 'updated' attribute which is got from the creation timestamp of the latest commit to the branch in Git, and so kept changing - underlying PackageRev CR is a Kubernetes object and has a static creationTimestamp - wired PackageRev details/ObjectMeta data into PackageRevision returned from update-package-resources flow - was previously just empty values with a zero timestamp - which broke a test once the creationTimestamp fix was applied nephio-project/nephio#630
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
The text was updated successfully, but these errors were encountered: