vmware-tanzu / asset-relocation-tool-for-kubernetes

A tool for relocating Kubernetes Assets
Other
42 stars 6 forks source link

UX: Do not show same image relocation twice #52

Open migmartri opened 3 years ago

migmartri commented 3 years ago

For example, the following command shows the same relocation twice, it should be enough to show it once.

 harbor-repo.vmware.com/tanzu_isv_engineering/tiny:tiniest => projects.registry.vmware.com/relocated/example2/tiny:tiniest (sha256:adf10351862ad5351ac2e714e04a0afb020b9df658ac99a07cbf49c0e18f8e43) 
$ relok8s chart move --image-patterns ./test/fixtures/testchart.images.yaml --registry projects.registry.vmware.com --repo-prefix relocated/example2 ./test/fixtures/testchart/
Computing relocation...

Image copies:
 harbor-repo.vmware.com/tanzu_isv_engineering/tiny:tiniest => projects.registry.vmware.com/relocated/example2/tiny:tiniest (sha256:adf10351862ad5351ac2e714e04a0afb020b9df658ac99a07cbf49c0e18f8e43) (push required)
 harbor-repo.vmware.com/tanzu_isv_engineering/tiny:tiniest => projects.registry.vmware.com/relocated/example2/tiny@sha256:adf10351862ad5351ac2e714e04a0afb020b9df658ac99a07cbf49c0e18f8e43 (sha256:adf10351862ad5351ac2e714e04a0afb020b9df658ac99a07cbf49c0e18f8e43) (push required)
 harbor-repo.vmware.com/dockerhub-proxy-cache/library/busybox:1.33.1 => projects.registry.vmware.com/relocated/example2/busybox@sha256:b862520da7361ea093806d292ce355188ae83f21e8e3b2a3ce4dbdba0a230f83 (sha256:b862520da7361ea093806d292ce355188ae83f21e8e3b2a3ce4dbdba0a230f83) (push required)
 harbor-repo.vmware.com/tanzu_isv_engineering/tiny:tiniest => projects.registry.vmware.com/relocated/example2/tiny:tiniest (sha256:adf10351862ad5351ac2e714e04a0afb020b9df658ac99a07cbf49c0e18f8e43) (already exists)
josvazg commented 3 years ago

What should be the criteria to pick the shown?

Also skipping those might be misleading, as those move are different tags tiny:tiniest vs iny@sha256:ad... they are in a way different updates, even if one is just an alias. Omitting might create confusion to consumers not knowing of the the tags was applied?

petewall commented 3 years ago

Related to #80