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

Better message when attempting to publish a second time #418

Closed
nschambu opened this issue Apr 18, 2022 · 1 comment · Fixed by #415
Closed

Better message when attempting to publish a second time #418

nschambu opened this issue Apr 18, 2022 · 1 comment · Fixed by #415
Labels
kind/documentation Categorizes issue or PR as related to documentation.

Comments

@nschambu
Copy link

Version

$ oc-mirror version
Client Version: version.Info{Major:"", Minor:"", GitVersion:"v0.2.0-alpha.1-1-g1f3f725", GitCommit:"1f3f725", GitTreeState:"clean", BuildDate:"2022-04-18T14:02:05Z", GoVersion:"go1.17.2", Compiler:"gc", Platform:"linux/amd64"}

What happened?

Using the fully disconnected path, I mirrored my images locally, published successfully, and then attempted to publish a second time. The error message reported is not clear:

error: error occurred during publishing, expecting imageset with prefix mirror_seq2: invalid mirror sequence order, want 2, got 1

What did you expect to happen?

It's not immediately clear what the error message means unless I understand the concept of imageset archive file naming. Additionally, I think there are two scenarios here that the error message needs to take into account:

  1. I mistakenly attempted to publish the mirror_seq1 tar file a second time and there's nothing for the CLI to do because everything has been published
  2. I'm attempting to publish a new archive, but something went wrong with the mirror process and there is no mirror_seq2 tar file.

The error message today is written for the second scenario whereas if it were written for the first scenario, it could be something like, "mirror_seq_000000.tar has been previously published. No new work to do."

I'm unsure how to update the error message to take both items into account, so this may be more of a request for better documentation around these scenarios rather than an update to the actual error message in oc-mirror.

How to reproduce it (as minimally and precisely as possible)?

$ oc-mirror --config imageset-config.yaml file://archive
<output removed>
$ oc-mirror --from archive/ docker://localhost:5000 --dest-skip-tls
<output removed>
$ oc-mirror --from archive/ docker://localhost:5000 --dest-skip-tls
INFO Checking push permissions for localhost:5000 
INFO Publishing image set from archive "archive/mirror_seq1_000000.tar" to registry "localhost:5000" 
INFO Extracting archive archive/mirror_seq1_000000.tar 
error: error occurred during publishing, expecting imageset with prefix mirror_seq2: invalid mirror sequence order, want 2, got 1

Anything else we need to know?

Enter text here.

References

Enter text here.

@jpower432
Copy link
Contributor

@nschambu Thanks for the feedback here. I have an open docs update PR #415 to incorporate some information around metadata handling and I can add in some information about sequence numbers and naming here. The is really no way to distinguish between the two scenarios above since the publishing operations are completely separate from the imageset creation. One thing I do want to note is that oc-mirror does not currently handle being passed multiple imageset sequences during one publish, which I can also add in the docs.

@jpower432 jpower432 linked a pull request Apr 22, 2022 that will close this issue
10 tasks
@jpower432 jpower432 added the kind/documentation Categorizes issue or PR as related to documentation. label Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Categorizes issue or PR as related to documentation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants