Skip to content

Commit 7e7e4db

Browse files
committed
Applying Copilot comment
Signed-off-by: Dominika Schweier <dominika.schweier@nokia.com>
1 parent 7b375b2 commit 7e7e4db

6 files changed

Lines changed: 27 additions & 27 deletions

File tree

docs/content/en/docs/5_architecture_and_components/engine/design.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ This pattern ensures atomicity - either all changes succeed and are persisted, o
5353
### Repository Abstraction
5454

5555
The engine does not directly interact with Git repositories. Instead, it opens repositories through the **cache layer** and works with
56-
repository abstractions that hide storage implementation details. It also delegates all storage operations to repository adapters. And
57-
maintains separation between business logic and storage mechanisms.
56+
repository abstractions that hide storage implementation details. It also delegates all storage operations to repository adapters.
57+
Additionally, it maintains separation between business logic and storage mechanisms.
5858

5959
### Concurrency Model
6060

@@ -119,7 +119,7 @@ The Engine exposes a single interface (`CaDEngine`) with operations grouped by r
119119

120120
All operations are **context-aware** for cancellation and tracing. Operations accept **API objects** (porchapi types) and return
121121
**repository abstractions**. The interface is **synchronous**, which means that operations complete before returning. Additionally, errors
122-
are returned directly rather than stored in status fields
122+
are returned directly rather than stored in status fields.
123123

124124
## Package Lifecycle State Machine
125125

docs/content/en/docs/5_architecture_and_components/engine/functionality/draft-commit-orchestration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ the render status with function results is returned. This does not involve a lif
394394
The render is executed by running a configured KRM function pipeline. These functions can validate, transform and generate resources.
395395
The results are returned in RenderStatus.
396396

397-
In case of render failure handling, the default behavior is to render errors to prevent draft closure (no resources persisted).
397+
In case of render failure, the default behavior is for render errors to prevent draft closure (no resources persisted).
398398
With the `porch.kpt.dev/push-on-render-failure: "true"` annotation, the draft is closed even on render failure. The behavior of
399399
partially-rendered resources can be further controlled via Kptfile annotations
400400
(see [kpt documentation](https://kpt.dev/book/04-using-functions/#debugging-render-failures)). The error is always returned to
@@ -491,8 +491,8 @@ It captures draft and repository references and logs a warning if a cleanup fail
491491

492492
### Rollback Limitations
493493

494-
The rollback may fail if the repository connection is lost, during permission errors,
495-
when the draft is already closed, or when the repository in inconsistent state.
494+
The rollback may fail if the repository connection is lost, due to permission errors,
495+
if the draft is already closed, or if the repository is in an inconsistent state.
496496

497497
In case of failure, the warning is logged with error details, but the original operation error is still returned.
498498
The draft may remain in the repository, which means that manual cleanup may be required. However, the repository
@@ -564,10 +564,10 @@ The Engine optimizes the draft-commit workflow:
564564
During lazy draft creation, a draft is created only when needed. Drafts are not created for metadata-only updates,
565565
or for read operations.
566566

567-
Early validation is performed before draft creation. it fails fast without expensive operations
567+
Early validation is performed before draft creation. It fails fast without expensive operations
568568
and reduces rollback frequency.
569569

570-
Another optimization is efficient draft closure, which uses single single repository operation,
570+
Another optimization is efficient draft closure, which uses single repository operation,
571571
atomic commit to Git and minimal overhead.
572572

573573
### Performance Characteristics

docs/content/en/docs/5_architecture_and_components/engine/functionality/lifecycle-management.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,13 +485,13 @@ Actual Deletion
485485

486486
### Tracking Benefits
487487

488-
One of the benefits of tracking is compliance. It is visible who approved a package revisions for production,
489-
when package revisions were approved, and what changes were made.
488+
One benefit of tracking is compliance: it shows who approved package revisions for production, when they were approved,
489+
and what changes were made.
490490

491491
Debugging is easier due to the package revision evolution history, the task execution sequence, and the lifecycle
492492
transition timeline.
493493

494494
With rollback, previous stable versions can be identified. It is easier to understand changes between versions, and
495495
possible to revert to known-good states.
496496

497-
Finally, governance, enforce approval workflows. Package revision modifications are audited and package lineage is tracked.
497+
Finally, governance is improved by enforcing approval workflows, auditing package revision modifications, and tracking package lineage.

docs/content/en/docs/5_architecture_and_components/engine/functionality/task-coordination.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ Compare Task Lists
209209
Apply New Tasks
210210
```
211211

212-
**Comparison logic:** Tasks are append-only (never removed) and task list lengths are compared.. New tasks are those
212+
**Comparison logic:** Tasks are append-only (never removed) and task list lengths are compared. New tasks are those
213213
beyond old list length. New tasks are applied in order.
214214

215215
**Task application:** Each new task is executed sequentially. The Draft is modified by each task. In case of an error,
@@ -261,7 +261,7 @@ PackageRevision is the current package revision from the repository, which provi
261261
It contains the function pipeline configuration.
262262

263263
Draft is a mutable workspace for modifications. The resources are updated directly and it is modified by
264-
new tasks.
264+
resource mutations (including the render task).
265265

266266
Old PackageRevisionResources is the previous resource content, which is used for comparison (not currently used).
267267
It has an audit trail.
@@ -395,8 +395,8 @@ Task List: [init/clone/edit/upgrade]
395395
Return Success
396396
```
397397

398-
Tasks are executed sequentially. This means, that typically one task init, clone, edit, or upgrade) is executed at the time
399-
and ach task must succeed before the next. The first error stops the execution. No parallel task execution is allowed.
398+
Tasks are executed sequentially. This means that typically one task (init, clone, edit, or upgrade) is executed at a time,
399+
and each task must succeed before the next. The first error stops execution. No parallel task execution is allowed.
400400

401401
This is needed because tasks may depend on previous tasks. This way, error handling is simplified and consistent state
402402
is maintained.
@@ -451,8 +451,8 @@ The Engine interacts with Task Handler through a defined interface:
451451

452452
### Interface Characteristics
453453

454-
The interface is context-aware. All methods accept context for cancellation Timeout and deadline is supported.
455-
Tracing and logging context.
454+
The interface is context-aware. All methods accept context for cancellation. Timeout and deadline is supported.
455+
Tracing and logging context is propagated as well.
456456

457457
It is draft-based, meaning that all methods work with draft workspaces and no direct repository modification
458458
is performed. Includes isolation and atomicity.
@@ -471,7 +471,7 @@ enforces business rules.
471471
The Task Handler implements task logic, transforms package content, executes functions, and
472472
returns results.
473473

474-
The benefit of this separation is that both component has clear responsibilities. Testing and maintenance is easier, and
474+
The benefit of this separation is that both component have clear responsibilities. Testing and maintenance are easier, and
475475
pluggable task implementations can be applied. Additionally, evolution of the components is independent.
476476

477477
### Extensibility

docs/content/en/docs/5_architecture_and_components/engine/functionality/validation-business-rules.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ CreatePackageRevision
7777

7878
**Rationale:**
7979

80-
The packages must progress through Draft/Proposed states before being published. This prevents the bypassing of the review/approval
81-
workflows. This way all packages have a draft history.
80+
Packages must progress through the Draft/Proposed states before being published. This prevents bypassing the review/approval
81+
workflows and ensures all packages have a draft history.
8282

8383
### Update Lifecycle Validation
8484

@@ -146,7 +146,7 @@ CreatePackageRevision
146146
**Rationale:**
147147

148148
Only allowing one operation simplifies the creation workflow. However, you can add multiple tasks later with updates. The default init
149-
task provides sensible starting point.
149+
task provides s sensible starting point.
150150

151151
### Task Type Validation
152152

@@ -397,7 +397,7 @@ Upgrade Task Validation
397397
**Rationale:**
398398

399399
Upgrade performs a three-way merge (old upstream, new upstream, local). Source revisions must be stable (published) for reliable merge.
400-
This prevents upgrading from unstable draft versions
400+
This prevents upgrading from unstable draft versions.
401401

402402
### Upgrade Source Requirements
403403

docs/content/en/docs/5_architecture_and_components/engine/interactions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ The engine never directly manipulates Git repositories or storage - all operatio
6565

6666
### Cache Invalidation
6767

68-
The engine does not directly invalidate cache entries. Instead, the cache monitors Repository CRs for changes, and cackground sync jobs refresh
68+
The engine does not directly invalidate cache entries. Instead, the cache monitors Repository CRs for changes, and background sync jobs refresh
6969
repository state periodically. Repository operations (create, update, delete) trigger cache updates automatically. Engine operations are always
7070
performed on the latest cached state.
7171

@@ -146,8 +146,8 @@ Update resources + render
146146
4. Task handler executes render task (runs function pipeline)
147147
5. Returns render status with function results
148148

149-
The Engine provides the draft workspace, the Task handler modifies resources in the draft, after which the Engine commits
150-
the draft after task completion. The Task handler has no direct repository access.
149+
The Engine provides the draft workspace. The Task handler modifies resources in the draft, after which the Engine commits
150+
the draft. The Task handler has no direct repository access.
151151

152152
### Function Runtime Integration
153153

@@ -254,8 +254,8 @@ API Server Watch Streams
254254
- **Modified**: Package revision updated (metadata or lifecycle)
255255
- **Deleted**: Package revision removed
256256

257-
Notifications are sent after successful package revision creation, after package revision updates (including lifecycle transitions),
258-
and after metadata-only updates on published packages. Notification are not sent on failures or during draft operations.
257+
Notifications are sent after successful package revision creation, after package revision updates (including lifecycle transitions),
258+
and after metadata-only updates on published packages. Notifications are not sent on failures or during draft operations.
259259

260260
### Watch Stream Support
261261

0 commit comments

Comments
 (0)