Skip to content

Debulleting Porch Architecture & Components - Engine - #1089

Open
lovesprung wants to merge 2 commits into
kptdev:mainfrom
nokia:debulleting_architecture_engine
Open

Debulleting Porch Architecture & Components - Engine#1089
lovesprung wants to merge 2 commits into
kptdev:mainfrom
nokia:debulleting_architecture_engine

Conversation

@lovesprung

Copy link
Copy Markdown
Contributor

Title

Debulleting Porch Architecture & Components - Engine


Description

Minor rewrites to make the text more readable. The Architecture & Components page is going to be debulleted in batches to avoid merge conflicts.


Type of Change

  • Bug fix
  • New feature
  • Enhancement
  • Refactor
  • Documentation
  • Tests
  • Other: ________

Checklist

  • Code follows project style guidelines
  • Self-reviewed changes
  • Tests added/updated
  • Documentation added/updated
  • All tests and gating checks pass

Signed-off-by: Dominika Schweier <dominika.schweier@nokia.com>
@lovesprung
lovesprung requested review from a team July 1, 2026 13:43
@netlify

netlify Bot commented Jul 1, 2026

Copy link
Copy Markdown

Deploy Preview for kpt-porch ready!

Name Link
🔨 Latest commit 7e7e4db
🔍 Latest deploy log https://app.netlify.com/projects/kpt-porch/deploys/6a451f0527b5570008a17e9f
😎 Deploy Preview https://deploy-preview-1089--kpt-porch.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
github-actions Bot requested a review from Copilot July 1, 2026 13:43
@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jul 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Documentation-focused PR that converts several bulleted “Architecture & Components / Engine” sections into prose and tables to improve readability and reduce future merge conflicts while keeping the technical content aligned with existing engine behavior.

Changes:

  • Rewrites multiple “Engine” documentation pages from bulleted lists into narrative paragraphs.
  • Introduces/adjusts structured formatting (tables/alerts) to present rules and transitions more clearly.
  • Updates/clarifies several workflow and interaction descriptions across engine documentation pages.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 18 comments.

Show a summary per file
File Description
docs/content/en/docs/5_architecture_and_components/engine/interactions.md Converts cache/task-handler/watch sections from bullets to prose.
docs/content/en/docs/5_architecture_and_components/engine/functionality/validation-business-rules.md Debullets rationales; reformats task/upgrade rule descriptions for readability.
docs/content/en/docs/5_architecture_and_components/engine/functionality/task-coordination.md Debullets responsibilities/parameter docs; adds prose summaries and tables.
docs/content/en/docs/5_architecture_and_components/engine/functionality/lifecycle-management.md Rewrites lifecycle rationale/audit sections and transition presentation.
docs/content/en/docs/5_architecture_and_components/engine/functionality/draft-commit-orchestration.md Rewrites render-failure/rollback/optimization sections; replaces an “Important notes” block with an alert.
docs/content/en/docs/5_architecture_and_components/engine/design.md Rewrites repository abstraction and interface characteristics; updates lifecycle diagram reference.

Comment thread docs/content/en/docs/5_architecture_and_components/engine/interactions.md Outdated
Comment thread docs/content/en/docs/5_architecture_and_components/engine/interactions.md Outdated
Comment thread docs/content/en/docs/5_architecture_and_components/engine/interactions.md Outdated
Comment thread docs/content/en/docs/5_architecture_and_components/engine/design.md Outdated
Comment thread docs/content/en/docs/5_architecture_and_components/engine/design.md Outdated
Signed-off-by: Dominika Schweier <dominika.schweier@nokia.com>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good work. thanks for your effort on this. just a few comments

Comment on lines +132 to +136
#### Draft State

This state can be created directly, or as default when no lifecycle is specified. It allows full modifications of tasks, resources,
metadata or lifecycle. From draft state packages can transition to either Proposed or Published. However, they cannot be created with
Published or DeletionProposed lifecycle.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id reword this. not of your rewording that is the problem here its just the original information was not so accurate. draft can only move into proposed state or be directly deleted (which is not a state). the last sentence also of "However, they cannot be created with Published or DeletionProposed lifecycle." makes 0 sense to me. remove it

Comment on lines +138 to +141
#### Proposed State

This state indicates that the package revision is ready for review. From the proposed state, packages can transition to either Draft
(for rework) or Published (for approval). This is typically used in approval workflows.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can reword "for approval" to something else? the proposed state is the "check for approval state" the published is it passed and was approved state. just reads a bit off for me

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(last sentence) its not that this is typically used in approval workflows. it is solely used to act as the approval workflow state. just get rid of the last sentence there.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this state is also immutable much like the published state. mutability can only happen in draft state. hence why a user must reject the proposed package to send it back to draft to make changes.
This is also stated here in the docs https://deploy-preview-1089--kpt-porch.netlify.app/docs/4_tutorials_and_how-tos/working_with_package_revisions/creating-packages/#step-5-propose-the-package-revision

the render status with function results is returned. This does not involve a lifecycle change, as the resources are updated in-place.

The render is executed by running a configured KRM function pipeline. These functions can validate, transform and generate resources.
The results are returned in RenderStatus.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The results are returned in RenderStatus.
The results are returned in a `RenderStatus`.

The RenderStatus is a data type

```

**Important notes:**
{{% alert title="Note" color="primary" %}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good change. thanks. makes it more readable

Comment on lines +108 to +117
| Direction | Transition | Action |
|-----------|------------|--------|
| Forward | Draft → Proposed | Submit for review |
| Forward | Proposed → Published | Approve |
| Forward | Published → DeletionProposed | Mark for deletion |
| Backward | Proposed → Draft | Return for rework |
| Backward | DeletionProposed → Published | Reject deletion |
| Forbidden | Published → Draft | Cannot unpublish |
| Forbidden | Published → Proposed | Cannot unpublish |
| Forbidden | Any state → Draft (except from Proposed) | — |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice table. i will say the ASCII diagram above it can go its pointless with the table. + the section above with the visual diagram of the state definitions already makes it quite clear which state can do what

- Contains task specification in Spec.Tasks
- First task in list executed
- Task type determines which implementation runs
PackageRevision contains task specification in Spec.Tasks. The first task in the list is executed. Task type

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again im not 100% sure if we should have things like spec.tasks marked with `` as they are types. would incur alot of changes given my reading of just this engine area of the architecture section. up to yourself

- **upgrade**: Merge changes from new upstream version
| Task type | Action |
|-----------|--------|
| init | Create new package from scratch |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if the statement is 100% accurate. from scratch makes it seem like its creating it from nothing. what really happens is porch has a "hollow package template" stored in memory. whenever init is triggered it just uses this template as the packages contents and fills in the areas of the package from user prompt e.g. name, workspace etc where appropriate.

Up to you how to word this given the context. or even if a wording change is needed. im just providing a bit more context.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| init | Create new package from scratch |
| init | Initialize new, blank package |

which uses runtime for function execution.

**For details on function runtime implementations, see [Function Runner]({{% relref "/docs/5_architecture_and_components/function-runner/_index.md" %}}).**
For details on function runtime implementations, see [Function Runner]({{% relref "/docs/5_architecture_and_components/function-runner/_index.md" %}}).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think perhaps this should link to here instead https://deploy-preview-1089--kpt-porch.netlify.app/docs/5_architecture_and_components/function-runner/design/

this is the area that directly tackles the runtime implementations

Comment on lines +80 to +81
Packages must progress through the Draft/Proposed states before being published. This prevents bypassing the review/approval
workflows and ensures all packages have a draft history.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one note to be aware of here is it also ensures all packages which pass to the published stage have a "successful" render of its kpt pipeline. so no failing render package can ever slip through.

Comment on lines +148 to +149
Only allowing one operation simplifies the creation workflow. However, you can add multiple tasks later with updates. The default init
task provides s sensible starting point.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems there is an extra "s" in the sentence here

- Copies resources to draft for modification
- Preserves original revision (immutable)
In this case, the current package revision of the content is loaded and a mutable draft
workspace is created. Resources are copied to draft for modification, while the original revision is preserved (immutable)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
workspace is created. Resources are copied to draft for modification, while the original revision is preserved (immutable)
workspace is created. Resources are copied to draft for modification, while the original revision is preserved (immutable).

Comment on lines -280 to +278
**Draft operations:**
- Same as creation draft
- Can modify resources, lifecycle, metadata
- Changes isolated until closed
**Draft operations:** The same as creation draft, meaning resources, lifecycle and metadata can be modified.
The changes are isolated until closed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what "same as creation draft" was meant to mean here but it sounds wrong. Maybe "same as an init draft" or "same as draft creation"?

If anybody has any idea, please chime in.

Comment on lines +301 to +302
Old and new package revision specs are compared and new tasks to apply are identified. These tasks are delegated to the
task handler for execution after which a modified draft is returned.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should mention that there can be only 1 task now, the "creation source" (init/copy/clone/upgrade). I assume this part of the docs was not updated when we made it a single-element list

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this was being discussed at the time of the creation or there was some very odd case where you could have more than one in the task list. i don't remember fully but if its not true anymore it should be altered

The render is executed by running a configured KRM function pipeline. These functions can validate, transform and generate resources.
The results are returned in RenderStatus.

In case of render failure, the default behavior is for render errors to prevent draft closure (no resources persisted).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In case of render failure, the default behavior is for render errors to prevent draft closure (no resources persisted).
In case of render failure, the default behavior is for render errors to prevent draft finalization (no resources persisted).

Comment on lines +575 to +576
The draft creation cost is relatively lightweight. The workspace is allocated in the repository and
the resources, for updates, are copied.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The draft creation cost is relatively lightweight. The workspace is allocated in the repository and
the resources, for updates, are copied.
The draft creation cost is relatively lightweight. The workspace is allocated in the repository and
the resources are copied in case of updates.

- Clear error messages
- No side effects on failure

It is fail fast (before expensive operations), gives clear error messages, and has no side effects on failure.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It is fail fast (before expensive operations), gives clear error messages, and has no side effects on failure.
The benefits of this are that it is fails fast (before expensive operations), gives clear error messages, and has no side effects on failure.

- Can check against existing data
- Rollback mechanism available

It has access to the repository state, can check against existing data and has rollback mechanism available.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It has access to the repository state, can check against existing data and has rollback mechanism available.
The benefits of this are that it has access to the repository state, can check against existing data and has rollback mechanism available.

Comment on lines +75 to +78
For update operations, the engine uses **Kubernetes resource versions**. The client must provide current resource version in update
request. Then the engine compares provided version with actual version and returns a conflict error if the versions do not match. This
forces the client to re-read and retry with the latest version. This way lost updates are prevented when multiple clients modify the same
package.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For update operations, the engine uses **Kubernetes resource versions**. The client must provide current resource version in update
request. Then the engine compares provided version with actual version and returns a conflict error if the versions do not match. This
forces the client to re-read and retry with the latest version. This way lost updates are prevented when multiple clients modify the same
package.
For update operations, the engine uses **Kubernetes resource versions**. The client must provide current resource version in update
request. Then, the engine compares provided version with actual version and returns a conflict error if the versions do not match. This
forces the client to re-read and retry with the latest version. This way lost updates are prevented when multiple clients modify the same
package.

Comment on lines +134 to +136
This state can be created directly, or as default when no lifecycle is specified. It allows full modifications of tasks, resources,
metadata or lifecycle. From draft state packages can transition to either Proposed or Published. However, they cannot be created with
Published or DeletionProposed lifecycle.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This state can be created directly, or as default when no lifecycle is specified. It allows full modifications of tasks, resources,
metadata or lifecycle. From draft state packages can transition to either Proposed or Published. However, they cannot be created with
Published or DeletionProposed lifecycle.
This is the starting state of a package when created and the default when no lifecycle is specified.
It allows full modifications of tasks, resources, metadata or lifecycle.
Packages in this state can transition to either Proposed or Published.

Comment on lines +145 to +147
Packages in this state are immutable, meaning that no resource or task modifications are allowed to them. Only metadata (labels,
annotations) and lifecycle can be updated. From the published state, packages can transition to DeletionProposed. The published state
represents the deployed, production-ready state.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Packages in this state are immutable, meaning that no resource or task modifications are allowed to them. Only metadata (labels,
annotations) and lifecycle can be updated. From the published state, packages can transition to DeletionProposed. The published state
represents the deployed, production-ready state.
Packages in this state are immutable, meaning that no resource or task modifications are allowed to them. Only metadata (labels,
annotations) and lifecycle can be updated. From the published state, packages can transition to DeletionProposed. The published state
represents the deployable, production-ready state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants