-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add a check for deltas before saving #291
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This is probably still useful to have, but it is not fixing the problem yet. What I have found is that when the package variant controller saves the Kptfile to package revision resources, the Kptfile keys (name, description, etc.) and the condition keys (type, message, etc.) are in one order, while when the specializer does it they are in a different order. Both do sort the condition arrays themselves; the issue is the field names come out in different orders. Suspiciously, they use different versions of kyaml (13.9 in porch, 14.2 in nephio), which is what serializes that. Though I didn't immediately spot differences that would cause this. I am trying to see if I can build a version of porch-controllers with the newer kyaml, and also with some additional instrumentation. I think there are some fixes to the way existing revisions are processed that may also contribute. |
Ugh. Building porch-controllers with an updated kyaml is a nightmare, it descends into updating k8s API, kustomize api, controller-runtime, etc. I will just add my instrumentation. Right now, what this means is that we have to manually approve the NF packages and other packages that go through specialization. Auto-approve won't do it. But we can work around that. |
This is the method that seems to re-order the conditions: Not 100% sure but checking now. |
I will have a look. We did add something to sort conditions since the tests validations need something otherwise they fail as we check the expected result. |
Here is where we sort conditions. // SortConditions returns a kptfile with sorted conditions
} |
/hold Still testing this, but may not be needed given #295 - may still also be helpful, but if not needed we may want to defer it. |
@johnbelamaric: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Hi @johnbelamaric , is this still relevant/needed? |
The auto-approval controller was not kicking in, because the PackageRevision creation timestamp kept updating. Which is odd, and probably a bug in Porch. But, we want this anyway. It will avoid saving the package revision resources if there is no delta. This should prevent the forever growing task list, hopefully.
Still testing - one concern is that if we are refreshing claims, we may be stuffing away a timestamp which means this would never find matching hashes.