feat: allow Updatecli manifest dependson#8437
Conversation
Signed-off-by: Olblak <[email protected]>
Signed-off-by: Olblak <[email protected]>
Signed-off-by: Olblak <[email protected]>
Signed-off-by: Olblak <[email protected]>
There was a problem hiding this comment.
Pull request overview
Adds manifest-level dependency ordering to the engine so pipelines can be executed in a deterministic order based on a new manifest id and dependson relationship (including propagation/inheritance for autodiscovery-generated manifests).
Changes:
- Introduces
Engine.OrderPipelines()(topological sort with stable sibling ordering) and runs it duringEngine.Prepare(). - Extends config model with internal
ManifestIDplus user-facing dependency fields (Spec.ID,Spec.DependsOn), and seedsManifestIDduring config load. - Ensures autodiscovery-generated manifests get deterministic internal manifest IDs and inherit
id/dependson; adds tests for ordering + fingerprinting behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/core/engine/prepare.go | Calls the new ordering phase during engine preparation with telemetry. |
| pkg/core/engine/order.go | Implements manifest dependency resolution + pipeline reordering logic. |
| pkg/core/engine/order_test.go | Adds unit tests for ordering behavior, error cases, and dependency merging. |
| pkg/core/engine/autodiscovery.go | Propagates id/dependson to discovered manifests and assigns stable internal manifest IDs via fingerprinting. |
| pkg/core/engine/autodiscovery_test.go | Verifies autodiscovery fingerprinting is stable and ignores secrets. |
| pkg/core/config/main.go | Adds internal manifestID + dependency helpers and seeds manifest IDs in New(). |
| pkg/core/config/main_test.go | Adds tests ensuring id/dependson parse correctly and internal manifest IDs are generated. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Olblak <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The commits from this pull request were accidentally merged from #8472 using automerge |
Fix #8436
Introduce two parameters:
idthat store a unique manifest id.dependsonsimilar to thedependsonthe resource which allows to reference id to define ordering.Please note that
iddon't need to be unique so anidspecified in an autodiscovery configuration will be herited to any generated manifest by the autodiscovery configuration.Test
To test this pull request, you can run the following commands:
Additional Information
Checklist
Tradeoff
Potential improvement