Conversation
✅ Deploy Preview for kptdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
3e24561 to
510b997
Compare
|
Related Documentation 1 document(s) may need updating based on files changed in this PR: kpt migration
|
There was a problem hiding this comment.
Pull request overview
This PR updates the kpt Kptfile API to make the “where this package came from” metadata more generic by renaming the UpstreamLock type to Locator and introducing a new generic locator form for non-git storage backends.
Changes:
- Rename
kptfile/v1.UpstreamLock(type) tokptfile/v1.Locatorand update call sites/tests accordingly. - Add
GenericOriginandGenericLockto represent packages stored in generic/custom storage (e.g., a DB). - Update helpers/utilities that populate or normalize the upstream lock data to use the renamed type.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/api/kptfile/v1/types.go | Renames the lock type to Locator and adds GenericOrigin / GenericLock. |
| pkg/kptfile/kptfileutil/util.go | Writes UpstreamLock using the new Locator type. |
| pkg/lib/kptops/clone.go | Updates helper APIs to accept/normalize Locator instead of UpstreamLock. |
| pkg/lib/kptops/clone_test.go | Adjusts tests to construct Locator instead of UpstreamLock. |
| pkg/lib/kptops/pkgupdate.go | Updates commented references from UpstreamLock to Locator. |
| internal/util/diff/pkgdiff.go | Updates diff-ignore logic to use Locator. |
| internal/util/get/get_test.go | Updates tests to construct Locator instead of UpstreamLock. |
| internal/util/fetch/fetch_test.go | Updates tests to construct Locator instead of UpstreamLock. |
| internal/testutil/testutil.go | Updates upstreamLock defaulting logic to use Locator. |
| internal/testutil/setup_manager.go | Updates test expectations to use Locator. |
| internal/testutil/pkgbuilder/builder.go | Builds Kptfiles with Locator for upstreamLock. |
| commands/pkg/get/cmdget_test.go | Updates tests to construct Locator instead of UpstreamLock. |
| commands/pkg/update/cmdupdate_test.go | Updates tests to construct Locator instead of UpstreamLock. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
|
@liamfallon @efiacor @kispaljr Should we consider unifying the From what I can see |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Mózes László Máté <laszlo.mozes@nokia.com>
The gist of this PR is to rename the
UpstreamLocktype toLocatorand add generic locator type.This is mostly for API consumers, such as Porch, where we currently have no way of expressing in the UpstreamLock that the package comes from a database.
(This renaming is already present in Porch, which duplicates some of the kpt API types, so this is a step towards de-duplicating even further.)
*The big diff is just the yaml/json schema