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 · 10 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 · 10 comments · May be fixed by kcp-dev/kubernetes#132
Assignees

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?

@embik embik moved this from New to Backlog in kcp Aug 10, 2023
@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
@kcp-ci-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

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

/lifecycle rotten

@kcp-ci-bot kcp-ci-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Nov 13, 2024
@embik
Copy link
Member

embik commented Nov 14, 2024

/remove-lifecycle rotten

I haven't looked at this but I assume it's still relevant.

@kcp-ci-bot kcp-ci-bot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
4 participants