Skip to content

Releases: reconcilerio/runtime

v0.23.0

19 Feb 19:57
d4697d5
Compare
Choose a tag to compare

Highlights

Nested Reconciler validation

Reconcilers/SubReconcilers/AdmissionWebhookAdapters are now validated, with the validation extending into nested SubReconcilers for tests. This will provide meaningful fast failures for test cases that embed invalid reconcilers.

In order to participate custom types need to implement validation.Validator interface. Calling into the Validate() method on nested types should be guarded by checking validation.IsRecursive.

	if validation.IsRecursive(ctx) {
		if v, ok := r.Reconciler.(validation.Validator); ok {
			if err := v.Validate(ctx); err != nil {
				return fmt.Errorf("Advice %q must have a valid Reconciler: %w", r.Name, err)
			}
		}
	}

full source

ChildReconciler/ChildSetReconciler error handling

The ChildReconciler can now define the set of error conditions that will be passed to ChildReconciler#ReflectChildStatusOnParent at ChildReconciler#ReflectedChildErrorReasons. By default the set of passed errors are:

Custom diffing for types in tests

ExpectConfig and test cases that embed it are able to define a custom Differ that is used to compare the side effects of the test expected and actual values. By default this is implemented using go-cmp. Users who wish to use a different diff implementation, or provide custom cmp.Options may implement the Differ interface and assign it to the particular config or test case.

Breaking Changes and Deprecations

  • ResourceManager was deprecated in v0.22.0 and is removed in favor of ObjectManager for a generic type, or UpdatingObjectManager.

  • AggregateReconciler.{HarmonizeImmutableFields, MergeBeforeUpdate, Sanitize} were deprecated in v0.22.0 and are removed in favor of AggregateReconciler.AggregateObjectManager.

  • ChildReconciler.{Finalizer, HarmonizeImmutableFields, MergeBeforeUpdate, Sanitize, SetResourceManager} were deprecated in v0.22.0 and are removed in favor of ChildReconciler.ChildObjectManager.

  • ChildSetReconciler.{HarmonizeImmutableFields, MergeBeforeUpdate, Sanitize} were deprecated in v0.22.0 and are removed in favor of ChildSetReconciler.ChildObjectManager.

  • AdmissionWebhookAdapter#Build is newly deprecated in favor of AdmissionWebhookAdapter#BuildWithContext.

  • AdmissionWebhookTestSuite#Run, AdmissionWebhookTests#Run, and AdmissionWebhookTestCase#Run are newly deprecated in favor of #RunWithContext.

What's Changed

New Contributors

Full Changelog: v0.22.0...v0.23.0

v0.22.0

01 Oct 12:52
72b6e1c
Compare
Choose a tag to compare

Highlights

Stashers

A Stasher provides a convenient way to stash typed values. Create a NewStasher using the type of the value being stashed and a unique stash key. All operations through a stasher, including retrieval are type safe with options for handling missing values on retrieval.

ObjectManager

The previous ResourceManager is split into an interface (ObjectManager) and implementation (UpdatingObjectManager).

The AggregateReconciler, ChildReconciler, and ChildSetReconciler are updated to use the interface allowing new strategies to be plugged-in.

Breaking Changes

There are no breaking changes in this release, but a number of existing APIs have been deprecated. Migration to the suggested APIs is encouraged as the deprecated APIs will be removed in a future release.

  • ResourceManager is deprecated in favor of ObjectManager for a generic type, or UpdatingObjectManager.
  • AggregateReconciler.{HarmonizeImmutableFields, MergeBeforeUpdate, Sanitize} are deprecated in favor of AggregateReconciler.AggregateObjectManager.
  • ChildReconciler.{Finalizer, HarmonizeImmutableFields, MergeBeforeUpdate, Sanitize, SetResourceManager} are deprecated in favor of ChildReconciler.ChildObjectManager.
  • ChildSetReconciler.{HarmonizeImmutableFields, MergeBeforeUpdate, Sanitize} are deprecated in favor of ChildSetReconciler.ChildObjectManager.

What's Changed

Full Changelog: v0.21.1...v0.22.0

v0.21.1

15 Aug 14:01
5c96b7e
Compare
Choose a tag to compare

What's Changed

  • Apply defaults to objects implementing CustomDefaulter by @scothis in #540

Full Changelog: v0.21.0...v0.21.1

v0.21.0

15 Aug 11:33
20db0da
Compare
Choose a tag to compare

Breaking changes

Highlights

What's Changed

New Contributors

Full Changelog: v0.20.0...v0.21.0

v0.20.0

13 Mar 20:07
5ce1c94
Compare
Choose a tag to compare

First release after forking from github.com/vmware-labs/reconciler-runtime. Users will need to update their go imports to remove all references to github.com/vmware-labs/reconciler-runtime/....

Before:

import "github.com/vmware-labs/reconciler-runtime/reconcilers"

After:

import "reconciler.io/runtime/reconcilers"

There are no other API changes since v0.19.0

What's Changed

  • Migrate to reconciler.io/runtime by @scothis in #1

Full Changelog: v0.19.0...v0.20.0