Skip to content

Add error logs #96

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

Merged

Conversation

dhaiducek
Copy link
Member

Some E2E tests had controller-runtime errors without any of our error logs prior to them. Hopefully these new log messages will make what's going on a bit clearer. Relevant error:

2023-03-21T22:25:05.174Z	error	controller.policy-propagator	controller/controller.go:317	Reconciler error	{"reconciler group": "policy.open-cluster-management.io", "reconciler kind": "Policy", "name": "cm-policy-prune-all", "namespace": "policy-test", "error": "Operation cannot be fulfilled on policies.policy.open-cluster-management.io \"cm-policy-prune-all\": the object has been modified; please apply your changes to the latest version and try again"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:317
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227

gparvin
gparvin previously approved these changes Mar 22, 2023
Copy link
Member

@gparvin gparvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Signed-off-by: Dale Haiducek <[email protected]>
@dhaiducek
Copy link
Member Author

I put one of the error logs in the wrong spot, but it's been moved now. I didn't notice it was returning err even when it was nil. 🙂

I also added a commit to refetch the policy to minimize the "object has been updated" errors. I'll look in the test results to see whether it was effective.

@dhaiducek
Copy link
Member Author

/hold

@dhaiducek dhaiducek force-pushed the refetch branch 2 times, most recently from 74740c3 to ed0dfd0 Compare March 23, 2023 14:37
Signed-off-by: Dale Haiducek <[email protected]>
@dhaiducek
Copy link
Member Author

This PR is ready for review...again. I added some refetches and did some minor refactoring as followup to the new error messages.

@openshift-ci openshift-ci bot added the lgtm label Mar 27, 2023
@openshift-ci
Copy link

openshift-ci bot commented Mar 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhaiducek, gparvin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dhaiducek
Copy link
Member Author

/unhold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants