-
Notifications
You must be signed in to change notification settings - Fork 33
Documentation for #892 #236
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: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -49,7 +49,8 @@ The commands for administering package revisions are: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| `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` | Update a downstream package revision to a more recent revision of its upstream package. | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| `porchctl rpkg update` | Deprecated, please use the upgrade functionality instead. See: [Deprecation of update](#deprecation-of-update) | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| `porchctl rpkg upgrade` | Update a downstream package revision to a more recent revision of its upstream package using 3 way merge. | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
## Using the porchctl CLI | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -478,4 +479,17 @@ deployments-c32b851b591b860efda29ba0e006725c8c1f7764 new-package v1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Observe that the rejected proposal returned the package revision back to _Draft_ lifecycle stage. The package whose | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
proposal was approved is now in _Published_ state. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
proposal was approved is now in _Published_ state. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
## Deprecation of update | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
### Motivation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we have a bit more context in the docs to explain the PackageRevison resource more clearly to users? |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 commentThe reason will be displayed to describe this comment to others. Learn more. I would avoid inserting links to gh issues in external documentation. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
For more details, see: https://github.com/nephio-project/nephio/issues/892 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
### 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 commentThe reason will be displayed to describe this comment to others. Learn more. I was thinking maybe we could add an example ?
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
For more details, see: https://github.com/nephio-project/porch/pull/252 |
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.
Should this be in a separate document rather than a footnote here?