Skip to content
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

Generation number doesn't seem correctly set on cached builtin resources. #2935

Open
davidfestal opened this issue Mar 30, 2023 · 8 comments · May be fixed by kcp-dev/kubernetes#132
Open

Generation number doesn't seem correctly set on cached builtin resources. #2935

davidfestal opened this issue Mar 30, 2023 · 8 comments · May be fixed by kcp-dev/kubernetes#132
Assignees
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@davidfestal
Copy link
Member

davidfestal commented Mar 30, 2023

When completing the replication_test.go e2e cache test with replication scenarios of rbac resources (CR / CRB objects), the generation is not equal when comparing original and cached objects.

I added a TODO in the completed test:

// TODO(davidfestal): find out why the generation is not the same especially for rbacv1. Is it a characteristic of all
// internal KCP resources (which are not backed by CRDs) ?
if b.gvr.Group == rbacv1.SchemeGroupVersion.Group {
unstructured.RemoveNestedField(originalResource.Object, "metadata", "generation")
unstructured.RemoveNestedField(cachedResource.Object, "metadata", "generation")
}
unstructured.RemoveNestedField(cachedResource.Object, "metadata", "annotations", genericapirequest.AnnotationKey)
if cachedStatus, ok := cachedResource.Object["status"]; ok && cachedStatus == nil || (cachedStatus != nil && len(cachedStatus.(map[string]interface{})) == 0) {
// TODO: worth investigating:

Maybe the work done for CRD-backed resources in this PR should also be done for built-in resources that support replication ?

@embik
Copy link
Member

embik commented Aug 10, 2023

@p0lyn0mial do you happen to remember if this issue is still up to date and/or valid?

@p0lyn0mial
Copy link
Contributor

@p0lyn0mial do you happen to remember if this issue is still up to date and/or valid?

I think so, we wanted to fix it with kcp-dev/kubernetes#132

@p0lyn0mial
Copy link
Contributor

and the test still (https://github.com/kcp-dev/kcp/blob/main/test/e2e/reconciler/cache/replication_test.go#L683) seems to be removing the "generation" field before comparison.

@kcp-ci-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
After a furter 30 days, they will turn rotten.
Mark the issue as fresh with /remove-lifecycle stale.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@kcp-ci-bot kcp-ci-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 16, 2024
@embik
Copy link
Member

embik commented Apr 17, 2024

/remove-lifecycle stale

@kcp-ci-bot kcp-ci-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 17, 2024
@kcp-ci-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
After a furter 30 days, they will turn rotten.
Mark the issue as fresh with /remove-lifecycle stale.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@kcp-ci-bot kcp-ci-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 16, 2024
@embik
Copy link
Member

embik commented Jul 16, 2024

/remove-lifecycle stale

@kcp-ci-bot kcp-ci-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 16, 2024
@kcp-ci-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
After a furter 30 days, they will turn rotten.
Mark the issue as fresh with /remove-lifecycle stale.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@kcp-ci-bot kcp-ci-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
Status: Backlog
4 participants