feat: allow Updatecli manifest dependson#8437
Open
olblak wants to merge 6 commits intoupdatecli:mainfrom
Open
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]>
Contributor
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]>
Contributor
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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