Skip to content

Conversation

lapentad
Copy link
Contributor

moving to refactoring branch

this replaces:
#263
#236

mpgreaves and others added 6 commits October 6, 2025 09:47
Signed-off-by: Michael Greaves <[email protected]>
Co-authored-by: Catalin Stratulat <[email protected]>
…nce npm scripts (nephio-project#256)

This pull request introduces a series of improvements to the
documentation repository, focusing on correcting configuration metadata,
upgrading core dependencies, and enhancing the developer workflow. These
changes address technical debt and align the project with modern best
practices.

### Key Changes:

**1. `package.json` Overhaul:**
- **Fixed Typo:** Corrected the package name in `name` field from
`nephio-rpoject-docs` to `nephio-project-docs`.
- **Aligned License:** Updated the `license` field from `APACHE2` to
`CC-BY-4.0` to match the repository's `LICENSE` file.
- **Added Description:** Populated the empty `description` field with a
clear and concise project summary.
- **Enhanced Discoverability:** Added relevant keywords to the
`keywords` array.
- **Implemented npm Scripts:** Introduced a standard set of scripts for
better workflow automation:
  - `build`: For production builds (`hugo --gc --minify`).
  - `serve`: For local development (`hugo server -D`).
  - `lint`: For running quality checks.
  - `test`: An alias for the `lint` script.

**2. Core Dependency Upgrades:**
- **Hugo & Go:** Upgraded `HUGO_VERSION` to `0.148.2` and `GO_VERSION`
to `1.24.5` in `netlify.toml` and `go.mod` to leverage the latest
features, performance improvements, and security patches.
- **Docsy Theme:** Updated the Docsy theme requirement to `v0.12.0` in
`go.mod`.
- Ran `go mod tidy` to ensure all dependencies are consistent.

**3. Code Cleanup:**
- **Removed Redundancy:** Deleted a duplicate `!include` statement in
`diagrams/src/level3-nephio-porch-component.puml` to fix the diagram
definition.

These changes collectively improve the project's maintainability,
security, and developer experience.

Signed-off-by: Hsiu-Chi Tsai
<[[email protected]](mailto:[email protected])
>"
Signed-off-by: lapentafd <[email protected]>
Signed-off-by: lapentafd <[email protected]>
Signed-off-by: lapentafd <[email protected]>
Copy link
Contributor

nephio-prow bot commented Oct 10, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign efiacor for approval by writing /assign @efiacor in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

netlify bot commented Oct 10, 2025

Deploy Preview for porch-docs-refactor ready!

Name Link
🔨 Latest commit c7f8238
🔍 Latest deploy log https://app.netlify.com/projects/porch-docs-refactor/deploys/68e8f28203642d000878f411
😎 Deploy Preview https://deploy-preview-268--porch-docs-refactor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Signed-off-by: lapentafd <[email protected]>
Signed-off-by: lapentafd <[email protected]>
Copy link


## Motivation

The PackageRevision API object was meant to represent only metadata related to a package revision, while the contents of the package revision (i.e. the YAML files) are meant to be exposed via a companion PackageRevisionResources object. However PackageRevision's spec.tasks field contains all changes applied to the contents of the package revision in the form of patches, thus the contents of the package are leaking into the object that supposed to represent only the metadata. This implies that the PackageRevision can quickly grow bigger in size, than the contents of the package it represents.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The PackageRevision API object was meant to represent only metadata related to a package revision, while the contents of the package revision (i.e. the YAML files) are meant to be exposed via a companion PackageRevisionResources object. However PackageRevision's spec.tasks field contains all changes applied to the contents of the package revision in the form of patches, thus the contents of the package are leaking into the object that supposed to represent only the metadata. This implies that the PackageRevision can quickly grow bigger in size, than the contents of the package it represents.
The PackageRevision API object was intended to represent only metadata related to a package revision, while the contents of the package revision (i.e. the YAML files) were intended to be exposed via a companion PackageRevisionResources object. However PackageRevision's `spec.tasks` field contains all changes applied to the contents of the package revision in the form of patches, thus the contents of the package are leaking into the object that supposed to only represent the metadata. This means that the PackageRevision resource can rapidly grow bigger in size as changes to the PackageRevision resources are made. In some cases, the size of the PackageRevision resource can grow to be bigger than the contents of the package it represents.


## Solution

We have introduced a new first task type, called upgrade. When there is a need to update a downstream package revision to a more up to date revision of its upstream package, do not store unnecessarily the diff's between the package revisions. Instead, now we use a 3-way-merge operation, where the old upstream, new upstream and the local revision changes are merged together. The introduced 3 way merge implementation is based on the kyaml's 3-way-merge solution.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
We have introduced a new first task type, called upgrade. When there is a need to update a downstream package revision to a more up to date revision of its upstream package, do not store unnecessarily the diff's between the package revisions. Instead, now we use a 3-way-merge operation, where the old upstream, new upstream and the local revision changes are merged together. The introduced 3 way merge implementation is based on the kyaml's 3-way-merge solution.
We have introduced a new "first" task type, called "upgrade". When there is a need to update a downstream package revision to a more up to date revision of its upstream package, the differences between the package revisions are no longer stored in the PackageRevision resource. Instead, a 3-way-merge operation is used, where the old upstream, new upstream and the local revision changes are merged together. The introduced 3 way merge implementation is based on the kyaml's 3-way-merge solution.

## Solution

We have introduced a new first task type, called upgrade. When there is a need to update a downstream package revision to a more up to date revision of its upstream package, do not store unnecessarily the diff's between the package revisions. Instead, now we use a 3-way-merge operation, where the old upstream, new upstream and the local revision changes are merged together. The introduced 3 way merge implementation is based on the kyaml's 3-way-merge solution.
With this approach, we can reduce the task list to only one element, also we can deprecate the Patch/Eval/Update task types, since there will be no need for these. The remaining Init/Edit/Clone/Upgrade task can clearly identify the origin of a PackageRevision.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
With this approach, we can reduce the task list to only one element, also we can deprecate the Patch/Eval/Update task types, since there will be no need for these. The remaining Init/Edit/Clone/Upgrade task can clearly identify the origin of a PackageRevision.
With this approach, the task list is reduced to only one element and the Patch/Eval/Update task types are deprecated as they are no longer needed. The remaining Init/Edit/Clone/Upgrade "first" tasks clearly identify the origin of a PackageRevision.

## Solution

We have introduced a new first task type, called upgrade. When there is a need to update a downstream package revision to a more up to date revision of its upstream package, do not store unnecessarily the diff's between the package revisions. Instead, now we use a 3-way-merge operation, where the old upstream, new upstream and the local revision changes are merged together. The introduced 3 way merge implementation is based on the kyaml's 3-way-merge solution.
With this approach, we can reduce the task list to only one element, also we can deprecate the Patch/Eval/Update task types, since there will be no need for these. The remaining Init/Edit/Clone/Upgrade task can clearly identify the origin of a PackageRevision.
Copy link
Member

Choose a reason for hiding this comment

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

It might be no harm to define a "first" task somewhere in the docs.

| `porchctl rpkg pull` | Pull the content of the package revision. |
| `porchctl rpkg push` | Push resources to a package revision. |
| `porchctl rpkg reject` | Reject a proposal to publish or delete a package revision. |
| `porchctl rpkg update` | Deprecated, please use the upgrade functionality instead. See: [Deprecation of update](./deprecation-of-update.md) |
Copy link
Member

Choose a reason for hiding this comment

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

As porchctl rpkg update no longer works, it shouldn't be on the list at all. Deprecation means it's still there but shold not be used. Maybe put in a footnote or something to say 'porchctl rpkg update' is gone.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* A function `ResourceList → ResultList` (*krm* function) as the foundational, composable unit of

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* [Rendering](https://kpt.dev/book/04-using-functions/#declarative-function-execution) a package

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
**KRM CaD** provides the following basic functionality:

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Users who want to take advantage of the benefits of [Configuration as Data](config-as-data.md)

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
[functions catalog](https://catalog.kpt.dev/function-catalog/). Package authoring is possible using a variety of

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
of [KRM][krm] **resources**. Specifically, configuration packages are [krm packages](https://kpt.dev/book/02-concepts/#packages).

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* low-latency [krm function][krm functions] evaluation and package rendering (evaluation of a

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
***Functions***: Functions (specifically, [krm functions][krm functions]) can be applied to

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants