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

Update to Porch v0.0.27 #83

Merged
merged 2 commits into from
Oct 5, 2023
Merged

Conversation

johnbelamaric
Copy link
Member

@johnbelamaric johnbelamaric commented Sep 28, 2023

Porch v0.0.26 fixes a number of issues, including periodic crashes due to OOMKill.

The new version dramatically reduces the number of watch events sent. Previously, they were sent every minute or so, regardless of whether there was a change in a PackageRevision. It now only sends them when there is an actual change. If you have controller code that is watching PackageRevisions, and it does not use RequeueAfter in the reconciler return value when there is an error, this could cause functional problems for you.

If you look at the specific PR, you will see I needed to update the PackageVariant controller for this reason. Basically, if you need to "check later" due to an error that may be intermittent, then you need your controller to use Requeue or RequeueAfter.

If the error is something that will require a new PackageRevision ResourceVersion (ie, a new commit), then you do not need to requeue, because you will be notified of that change.

But if it's external to the package revision (say, a intermittent network issue, a missing RBAC role, etc.), that may be resolved without a new commit, then you need to be sure you tell the controller to requeue after some amount of time, to be sure you reconcile that resource version of the package revision again.

Fixes nephio-project/nephio#341

@johnbelamaric johnbelamaric changed the title Update to Porch v0.0.26 Update to Porch v0.0.27 Oct 4, 2023
@henderiw
Copy link
Contributor

henderiw commented Oct 5, 2023

Will the reconcile loop retriever when returning this error?

So far in the specialised we use sometimes 3 ways to return

  1. return ctrl.Result{}, errors.Wrap(err, msg) -> with error where immediate reconcile is expected
  2. return ctrl.Result{RequeueAfter: 10 * time.Second}, nil -> reconcile after timeout
  3. return ctrl.Result{}, nil -> no new reconcile is expected

@johnbelamaric
Copy link
Member Author

Yes that should work fine

@henderiw
Copy link
Contributor

henderiw commented Oct 5, 2023

ok I reviewed the specialiser code and it should be ready for this change.

/lgtm

@henderiw
Copy link
Contributor

henderiw commented Oct 5, 2023

/approve

@nephio-prow
Copy link
Contributor

nephio-prow bot commented Oct 5, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: henderiw

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

@nephio-prow nephio-prow bot added the approved label Oct 5, 2023
Signed-off-by: John Belamaric <[email protected]>
Signed-off-by: John Belamaric <[email protected]>
@johnbelamaric
Copy link
Member Author

Rebased. Can I get a new lgtm?

@electrocucaracha
Copy link
Member

/lgtm

@nephio-prow nephio-prow bot added the lgtm label Oct 5, 2023
@nephio-prow nephio-prow bot merged commit d40500f into nephio-project:main Oct 5, 2023
3 checks passed
@liamfallon
Copy link
Member

/approve

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.

Porch: Improve watch functionality
4 participants