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

core/storage: fix nil data unmarshal #4734

Merged
merged 1 commit into from Nov 10, 2023
Merged

Conversation

calebdoxsey
Copy link
Contributor

Summary

When deleting a record it's possible to set data to be nil. In that case the row would be removed from the records table, but there would be an entry in the record_changes table with nil data. The call to stream changes would then attempt to convert this row into a record and fail with an error. This PR updates the code to tolerate nil data.

Any consuming code would also need to tolerate nil data accordingly. Whether that's the case or not for all known usages is unclear.

Related issues

Fixes #4733

Checklist

  • reference any related issues
  • updated docs
  • updated unit tests
  • updated UPGRADING.md
  • add appropriate tag (improvement / bug / etc)
  • ready for review

@calebdoxsey calebdoxsey added bug Something isn't working backport 0-24-0 labels Nov 10, 2023
@calebdoxsey calebdoxsey requested a review from a team as a code owner November 10, 2023 18:47
@coveralls
Copy link

Coverage Status

coverage: 63.916% (+0.01%) from 63.904%
when pulling 8c25354 on cdoxsey/storage-handle-nil
into 6de9f12 on main.

@calebdoxsey calebdoxsey merged commit d7ed62c into main Nov 10, 2023
8 of 11 checks passed
@calebdoxsey calebdoxsey deleted the cdoxsey/storage-handle-nil branch November 10, 2023 20:16
calebdoxsey added a commit that referenced this pull request Nov 10, 2023
core/storage: fix nil data unmarshal (#4734)

Co-authored-by: Caleb Doxsey <cdoxsey@pomerium.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 0-24-0 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

core/databroker: synchronization error "proto: syntax error"
3 participants