- Added SkippedApplies and SkippedDeletes to the TaskContext
- Modified tasks to use the new skipped tracking, replacing usage
of failure tracking, where skipped is more accurate.
- Renamed some TaskContext methods for consistency
- Added ObjMetadataSetFromMap for use by TaskContext
- Added ObjectMetadataSet.Intersection for use by InvSetTask
- Cleaned up InvSetTask to be more readable with comments explaining
intended behavior, including handling of skips.
- Added apply and prune tests for skipped, failure, and abandoned
- Rename PruneOptions to Pruner (it does the work itself)
- Rename variables and internal methods for clarity/consistency
- Extract deleteObject method to improve readability
- Rename GetObject to getObject (only used internally and by test)
- Modify log messages for readability
- Add log support for prune tests
- Make log messages more consistent
If an object with the deletion prevention annotation is removed from the
inventory, the config.k8s.io/owning-inventory annotation should be
removed from the object, and the object should be removed from the
inventory.
- Destroyer context added, with cancel test.
- Fix Applier cancel test not using specified timeouts.
- Added a few logs to help with debugging test failures
- Add test for applier.Run context cancel/timeout
- Add AssertEqual & AssertNotEqual to wrap testutil.Equal matcher
- Move common test utils to common_test.go
- Use yaml artifacts, instead of Unstructured
- Use apply.Options as test input
- Use UnstructuredSet as test input
- Extract Applier construction with fake inputs to newTestApplier
- Extract nil inventory to its own test to simplify test inputs
to TestReadAndPrepareObjects
- Refactor usages to []Unstructured to use UnstructuredSet
- Add UnstructuredSet.Equal to handle set equality comparison
- Avoid updating tests to prove reverse compatibility
(except: Graph.SortObj, which returns a list of sets)
improve the performance
Running InventoryPolicyApplyFilter involves getting every object in the
current inventory from the live cluster, which can be expensive if the
inventory includes lots of objects.
If the inventory policy is `AdoptAll`, the current inventory can take
ownership of any objects. Therefore, it is not necessary to run
InventoryPolicyApplyFilter.
- Refactor usages of []ObjMetadata to use ObjMetadataSet
- Move Union, Diff, Contains, Hash, Remove, and Equal into
ObjMetadataSet
- Add ToStringMap and FromStringMap for inventory serialization
- Add GroupedEventsByID to impliment a custom sort algorithm fo use by
tests, to simplify the comparison of otherwise unsorted
apply/prune/delete events in an action group.
- GroupName can be used to identify which ActionGroupEvent the
Apply/Prune/Delete belongs to. This is useful for tracking progress
during a long apply/destroy.
- Make ResourceCache thread-safe
- Make ResourceCache store status and messagei
- Add ResourceCache to baseRunner and TaskContext
- Make Mutator compute resource status for uncached resources
- Share cache between StatusPoller and Mutator
- Move Condition and conditionMet() to its own file
- Simplify WaitTask.checkCondition
- Simplify baseRunner.amendTimeoutError