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

v2: remove HCP Link integration #21883

Merged
merged 2 commits into from
Nov 7, 2024
Merged

v2: remove HCP Link integration #21883

merged 2 commits into from
Nov 7, 2024

Conversation

rboyer
Copy link
Member

@rboyer rboyer commented Oct 29, 2024

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

  • updated test coverage
  • [ ] external facing docs updated
  • [ ] appropriate backport labels added
  • not a security concern

Copy link
Collaborator

@dhiaayachi dhiaayachi left a 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()) {
Copy link
Collaborator

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 😅

Copy link
Member Author

@rboyer rboyer Nov 6, 2024

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.
@rboyer rboyer merged commit a2e6923 into main Nov 7, 2024
94 checks passed
@rboyer rboyer deleted the rboyer/remove-hcp-link branch November 7, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants