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

[bug] m2m completes successfully when publishing to incorrect namespace #468

Closed
afflom opened this issue May 16, 2022 · 2 comments · Fixed by #473
Closed

[bug] m2m completes successfully when publishing to incorrect namespace #468

afflom opened this issue May 16, 2022 · 2 comments · Fixed by #473
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@afflom
Copy link
Contributor

afflom commented May 16, 2022

Version

Client Version: version.Info{Major:"", Minor:"", GitVersion:"v0.2.0-alpha.1-36-g7d88d4e", GitCommit:"7d88d4e8", GitTreeState:"clean", BuildDate:"2022-05-16T20:28:02Z", GoVersion:"go1.18", Compiler:"gc", Platform:"linux/amd64"}

What happened?

when publishing m2m differential synchronizations, if an incorrect namespace is targeted for publishing, oc-mirror does not produce a sequence error as expected.

What did you expect to happen?

differential syncs should error if published to a different registry namespace than previous syncs.

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

publish a to a mirror registry namespace and then use m2m to publish a diff to a different namespace.

@afflom afflom added the kind/bug Categorizes issue or PR as related to a bug. label May 16, 2022
@jpower432
Copy link
Contributor

jpower432 commented May 16, 2022

In this instance a new workspace would be created if the sequence number is not 1, there would be an error. for the disk to mirror workflow. So this should only happen in the instance where a imageset was published for the first time as a new workspace in one namespace and then subsequently in another.

For disk to mirror and mirror to mirror workflows, I would not like to add this constraint as publishing with different namespace is a tactic being used for image promotion.

@jpower432
Copy link
Contributor

Discussed out of band. The solution would be to disallow the publishing of a differential imageset if there is no instance of metadata in the target namespace.

@jpower432 jpower432 added this to the Release-4.11 milestone May 16, 2022
jpower432 added a commit to jpower432/bundle that referenced this issue May 18, 2022
Currently, mirror to mirror operations do not check the sequence number
when publishing since there are no layer differential considerations.
However, sequence checking still needs to be done to ensure the
target namespace is not changed on a differentials run.

Fixes openshift#468

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
jpower432 added a commit to jpower432/bundle that referenced this issue May 18, 2022
Currently, mirror to mirror operations do not check the sequence number
when publishing since there are no layer differential considerations.
However, sequence checking still needs to be done to ensure the
target namespace is not changed on a differentials run.

Fixes openshift#468

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
@jpower432 jpower432 self-assigned this May 18, 2022
openshift-merge-robot pushed a commit that referenced this issue Jun 7, 2022
…perations (#473)

* fix(mirror): adds sequence checks for mirror to mirror operations

Currently, mirror to mirror operations do not check the sequence number
when publishing since there are no layer differential considerations.
However, sequence checking still needs to be done to ensure the
target namespace is not changed on a differentials run.

Fixes #468

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>

* test: adds additional test cases to sequence check unit test

Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants