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

fix: disallow updating an existing isbsvc's persistence strategy #1376

Merged
merged 4 commits into from
Nov 18, 2023

Conversation

KeranYang
Copy link
Member

@KeranYang KeranYang commented Nov 17, 2023

Don't allow updating an existing isbsvc's persistence strategy. This includes removing, adding and modifying.

Signed-off-by: Keran Yang <yangkr920208@gmail.com>
Signed-off-by: Keran Yang <yangkr920208@gmail.com>
@KeranYang KeranYang marked this pull request as ready for review November 17, 2023 20:28
return DeniedResponse("can not change ISB Service type from Redis to Jetstream")
}
// check the persistence of ISB Service is not changed
if !equality.Semantic.DeepEqual(v.oldISBService.Spec.Redis.Native.Persistence, v.newISBService.Spec.Redis.Native.Persistence) {
Copy link
Member

Choose a reason for hiding this comment

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

Need to check if native is nil.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! I am adding a nil check before deepequal. Do we need to handle native changing from nil to non-nil and vice versa?

Copy link
Member

Choose a reason for hiding this comment

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

It's needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

.
Signed-off-by: Keran Yang <yangkr920208@gmail.com>
.
Signed-off-by: Keran Yang <yangkr920208@gmail.com>
@whynowy whynowy merged commit 44a38f4 into numaproj:main Nov 18, 2023
18 checks passed
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

2 participants