-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
v2: remove HCP Link integration #21883
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 LGTM! I left a question but I don't think it's blocking.
@@ -239,8 +258,18 @@ func (b *Backend) Apply(buf []byte, idx uint64) any { | |||
oldVsn := res.Version | |||
res.Version = strconv.Itoa(int(idx)) | |||
|
|||
if err := b.store.WriteCAS(res, oldVsn); err != nil { | |||
return err | |||
if isRetiredType(res.GetId().GetType()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about an upgrade scenario? 🤔 I'm thinking about the issue we encountered where some of the servers don't apply the log the same way as the other which result into an inconsistent DB between different servers.
Probably not a big deal as those type should not be used in practice now but just asking if you ran the scenario in your head 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, but I don't think it practically matters.
I was assuming that a type would be "retired" when it was absolutely done and there is no way to actually access the data directly anymore. That is the case with these types as their proto definitions are gone and deregistered from the type registry.
In that case it doesn't matter if one non-upgraded server and one upgraded server differ on the database contents because there's no outward facing way to observe this difference, nor if there were should anybody be trying to discover the difference because when the upgrade completes the data and behavior is gone anyway.
Also prevent de-registered retired v2 types from being restored from a snapshot, such as these hcp resources. Without doing this, anyone with any of these types in their state store will retain them forever with no avenue to remove them.
e965eb1
to
a5a7a56
Compare
Description
Also prevent de-registered retired v2 types from being restored from a snapshot, such as these hcp resources. Without doing this, anyone with any of these types in their state store will retain them forever with no avenue to remove them.
PR Checklist
[ ] external facing docs updated[ ] appropriate backport labels added