-
Notifications
You must be signed in to change notification settings - Fork 34
Cli upgrade examples #268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: porch-docs-refactor
Are you sure you want to change the base?
Cli upgrade examples #268
Conversation
Signed-off-by: Michael Greaves <[email protected]>
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]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
✅ Deploy Preview for porch-docs-refactor ready!
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]>
Signed-off-by: lapentafd <[email protected]>
|
|
||
## 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
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) | |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* A function `ResourceList → ResultList` (*krm* function) as the foundational, composable unit of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* [Rendering](https://kpt.dev/book/04-using-functions/#declarative-function-execution) a package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**KRM CaD** provides the following basic functionality: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Users who want to take advantage of the benefits of [Configuration as Data](config-as-data.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[functions catalog](https://catalog.kpt.dev/function-catalog/). Package authoring is possible using a variety of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of [KRM][krm] **resources**. Specifically, configuration packages are [krm packages](https://kpt.dev/book/02-concepts/#packages). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* low-latency [krm function][krm functions] evaluation and package rendering (evaluation of a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
***Functions***: Functions (specifically, [krm functions][krm functions]) can be applied to |
moving to refactoring branch
this replaces:
#263
#236