Skip to content

zarf package mirror-resources should either default to the zarf registry / zarf git server or require either --registry-url or --git-url #2389

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

Open
AustinAbro321 opened this issue Mar 20, 2024 · 1 comment · May be fixed by #3618
Assignees
Labels
enhancement ✨ New feature or request

Comments

@AustinAbro321
Copy link
Contributor

AustinAbro321 commented Mar 20, 2024

Is your feature request related to a problem? Please describe.

Running zarf package mirror-resources without any CLI options may be confusing to users as the error message looks like this currently.
registry:

 WARNING  Retrying (1/3) in 5s: GET
          https://index.docker.io/v2/stefanprodan/podinfo/manifests/6.4.0-zarf-2985051089:
          MANIFEST_UNKNOWN: manifest unknown; unknown tag=6.4.0-zarf-298505108

git repo:

 WARNING  Retrying (1/3) in 5s: failed to push the git repo "zarf-public-test-1143224168": unable to
          push repo to the gitops service: repository not found

Users might expect that we default to the zarf registry / server or they may think something is wrong with their package or images. Likely we should either default to the zarf registry and zarf git server or fail if those are not set and they are using them

Describe the solution you'd like

  • Given I have a package that has images
  • When I run zarf package mirror-resources zarf-package-my-package without specifying the --registry-url
  • Then I get an error message "zarf package mirror-resources requires registry to be set to mirror images`
    OR
  • Given I have a package that has images
  • When I run zarf package mirror-resources zarf-package-my-package without specifying the --registry-url
  • Then the images are uploaded to the zarf registry

Similar for the git repo use case but repos instead of images and --git-url rather than --registry-url

Additional context

I am leaning towards implementing both. First checking if state exists and using it if it does. If state does not exist, fall back to requiring flags be used.

@AustinAbro321 AustinAbro321 added the enhancement ✨ New feature or request label Mar 20, 2024
@AustinAbro321 AustinAbro321 changed the title zarf package mirror-resources should either default to the zarf registry / zarf git server OR require either --registry-url or --git-url zarf package mirror-resources should either default to the zarf registry / zarf git server or require either --registry-url or --git-url Mar 20, 2024
@salaxander salaxander added this to Zarf Jul 22, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Zarf Jul 22, 2024
@salaxander salaxander removed the status in Zarf Jul 22, 2024
@salaxander salaxander moved this to Triage in Zarf Sep 10, 2024
@AustinAbro321 AustinAbro321 moved this from Triage to Backlog in Zarf Feb 27, 2025
@brandtkeller
Copy link
Member

I am leaning towards implementing both. First checking if state exists and using it if it does. If state does not exist, fall back to requiring flags be used.

I like this approach but I'd offer the utility of the reverse. If the flags are populated then mirroring target is an explicit definition. I may have proper connection to a cluster/state and still want to mirror resources to another location as part of a broader resources management strategy (multi-cluster).

But if no flags are specified and state exists - we can very much improve UX by using that state.

@brandtkeller brandtkeller linked a pull request Mar 30, 2025 that will close this issue
2 tasks
@brandtkeller brandtkeller self-assigned this Mar 30, 2025
@brandtkeller brandtkeller moved this from Backlog to In progress in Zarf Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants