kpt icon indicating copy to clipboard operation
kpt copied to clipboard

`kpt alpha rpkg copy` fails when package's upstream repository is unregistered

Open ChristopherFry opened this issue 3 years ago • 0 comments

Expected behavior

You should always be able to create a new revision of a package using kpt alpha rpkg copy even if the package's upstream repository is unregistered.

Actual behavior

kpt alpha rpkg copy fails with Error: Internal error occurred: failed to fetch package revision ... cannot find repository ...

Information

Kpt and Porch are both on 1d3a99cb.

Steps to Reproduce

In Porch, register two repositories - the public kpt-samples repository repository and a second personal repository

  1. Using kpt alpha rpkg clone, clone the echo/v1 package to your personal repository
  2. Using kpt alpha rpkg propose and kpt alpha rpkg approve approve the package
  3. Unregister the kpt-samples repostiory
  4. Using kpt alpha rpkg copy, create a new revision of the package
  5. Error occurs with above command
Error: Internal error occurred: failed to fetch package revision "kpt-samples-3cecbbbc68286534bf31a98b7ac7fa3de911f84a": cannot find repository default/kpt-samples: repositories.config.porch.kpt.dev "kpt-samples" not found 

ChristopherFry avatar Sep 01 '22 23:09 ChristopherFry