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

OADP-605: Fix edge case for already exists resources #186

Conversation

shubham-pampattiwar
Copy link
Member

No description provided.

pkg/restore/restore.go Outdated Show resolved Hide resolved
pkg/restore/restore.go Show resolved Hide resolved
pkg/restore/restore.go Outdated Show resolved Hide resolved
pkg/restore/restore.go Outdated Show resolved Hide resolved
pkg/restore/restore.go Outdated Show resolved Hide resolved
pkg/restore/restore.go Outdated Show resolved Hide resolved
pkg/restore/restore.go Outdated Show resolved Hide resolved
Copy link

@sseago sseago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit -- comment was misleading. Fix the comment and we're good to merge.

pkg/restore/restore.go Outdated Show resolved Hide resolved
if isAlreadyExistsError || objectExists {
// do a get call if we did not run this previously i.e.
// we've only run this for errors other than isAlreadyExistError
if fromCluster == nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If objectexists == true then fromcluster wouldn't be nil.

No need to call get here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a get call for the AlreadyExistError case, the get call you are referring to is done if error from create is not AlreadyExistsError

@shubham-pampattiwar shubham-pampattiwar merged commit e512a2d into openshift:konveyor-1.9 Aug 11, 2022
@shubham-pampattiwar
Copy link
Member Author

/cherry-pick konveyor-1.9.1

@openshift-cherrypick-robot

@shubham-pampattiwar: new pull request created: #187

In response to this:

/cherry-pick konveyor-1.9.1

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants