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

Remove orphapn UPDATE validation #2055

Merged
merged 1 commit into from
Jul 7, 2023
Merged

Conversation

derekbit
Copy link
Member

@derekbit derekbit commented Jul 7, 2023

@derekbit derekbit requested a review from a team as a code owner July 7, 2023 08:02
@derekbit derekbit self-assigned this Jul 7, 2023
@derekbit derekbit changed the title Remove orhapn UPDATE validation Remove orphapn UPDATE validation Jul 7, 2023
Copy link
Member

@innobead innobead left a comment

Choose a reason for hiding this comment

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

You probably can still keep the validation, but only remove the below part. WDYT?

	if !reflect.DeepEqual(oldOrphan.Spec, newOrphan.Spec) {
		return werror.NewInvalidError(fmt.Sprintf("orphan %v spec fields are immutable", oldOrphan.Name), "")
	}

Longhorn 6246

Signed-off-by: Derek Su <derek.su@suse.com>
@derekbit
Copy link
Member Author

derekbit commented Jul 7, 2023

You probably can still keep the validation, but only remove the below part. WDYT?

	if !reflect.DeepEqual(oldOrphan.Spec, newOrphan.Spec) {
		return werror.NewInvalidError(fmt.Sprintf("orphan %v spec fields are immutable", oldOrphan.Name), "")
	}

Yeah, good idea. Updated. Thank you.

@derekbit derekbit requested a review from innobead July 7, 2023 08:29
@innobead innobead merged commit 6f809b3 into longhorn:master Jul 7, 2023
@innobead
Copy link
Member

innobead commented Jul 7, 2023

@mergify backport v1.5.x

@mergify
Copy link

mergify bot commented Jul 7, 2023

backport v1.5.x

✅ Backports have been created

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.

2 participants