Skip to content

kpt pkg update doesn't handle deletion of unfetched remote packages correctly. #2216

@mortent

Description

@mortent

Expected behavior

If a package contains subpackages in the unfetched state, those subpackages will be fetched when the package is cloned. If the subpackage is then deleted from the package in upstream, kpt should follow the same rules as if the package were fetched, i.e. it should only delete the package from local if the user has not made any local changes.

Actual behavior

The package is never deleted in this situation, as the logic that checks whether the local package has changed does not correctly handle the fact that the version in origin is unfetched (so it only contains the Kptfile).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions