Skip to content
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

Slight differences in Kptfile upstream formatting with kpt pkg get and kpt alpha rpkg clone #631

Open
liamfallon opened this issue Apr 8, 2024 · 1 comment
Assignees
Labels
area/porch Porch related issues bug Something isn't working good first issue Good for newcomers

Comments

@liamfallon
Copy link
Member

Original issue URL: kptdev/kpt#3501
Original issue user: https://github.com/ChristopherFry
Original issue created at: 2022-08-25T18:27:41Z
Original issue last updated at: 2023-01-13T13:41:17Z
Original issue body: ### Expected behavior
The Kptfile upstream(Lock).git.repo is formatted the same when cloning the same package using kpt get and kpt alpha rpkg clone.

Actual behavior

The repo and directory fields in the Kptfile upstream(Lock).git.repo varies slightly with the two commands.

Steps to reproduce the behavior

To reproduce, clone the same package with two different commands. Using basens in the kpt-samples repository as an example:

With kpt get:

> kpt pkg get https://github.com/GoogleContainerTools/kpt-samples.git/basens@basens/v0

Kptfile snippet:

upstream:
  type: git
  git:
    repo: https://github.com/GoogleContainerTools/kpt-samples
    directory: /basens
    ref: basens/v0
  updateStrategy: resource-merge
upstreamLock:
  type: git
  git:
    repo: https://github.com/GoogleContainerTools/kpt-samples
    directory: /basens
    ref: basens/v0
    commit: 026dfe8e3ef8d99993bc8f7c0c6ba639faa9a634

With kpt alpha rpkg clone:

> kpt alpha rpkg clone kpt-samples-afcf4d1fac605a60ba1ea4b87b5b5b82e222cb69 basens-clone -n default --repository application-blueprints

Kptfile snippet:

upstream:
  type: git
  git:
    repo: https://github.com/GoogleContainerTools/kpt-samples.git
    directory: basens
    ref: basens/v0
upstreamLock:
  type: git
  git:
    repo: https://github.com/GoogleContainerTools/kpt-samples.git
    directory: basens
    ref: basens/v0
    commit: 026dfe8e3ef8d99993bc8f7c0c6ba639faa9a634

Note the repo and directory field varies slightly between the two. The kpt alpha rpkg command adds .git to the repo field whereas kpt get does not, and kpt get prefixes directory with the a forward slash whereas kpt alpha rpkg does not.

Original issue comments:
Comment user: https://github.com/ChristopherFry
Comment created at: 2022-08-25T18:43:10Z
Comment last updated at: 2022-08-25T18:43:10Z
Comment body: cc @johnbelamaric

@tliron tliron transferred this issue from nephio-project/porch-issue-transfer Apr 23, 2024
@mansoor17syed mansoor17syed self-assigned this Dec 22, 2024
@mansoor17syed
Copy link

Hi Team,

Please ignore the older MR I had messed up the env and changes,

Created MR for the fix
nephio-project/porch#165

Please let me know for any changes/suggestions/feedback shall work on it.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/porch Porch related issues bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants