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: bug with subkeys, verify test fields on startup #2444

Merged
merged 10 commits into from
Aug 21, 2024
Merged

Conversation

gak
Copy link
Contributor

@gak gak commented Aug 20, 2024

Fixes #2348
Fixes #2466

@gak gak added the run-all A PR with this label will run the full set of CI jobs in the PR rather than in the merge queue label Aug 20, 2024
@ftl-robot ftl-robot mentioned this pull request Aug 20, 2024
@gak gak marked this pull request as ready for review August 20, 2024 06:48
@gak gak requested review from alecthomas and a team as code owners August 20, 2024 06:48
@gak gak requested review from stuartwdouglas and removed request for a team August 20, 2024 06:48
backend/controller/dal/encryption.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@alecthomas alecthomas left a comment

Choose a reason for hiding this comment

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

Nice!

backend/controller/dal/encryption.go Outdated Show resolved Hide resolved
backend/controller/dal/encryption.go Outdated Show resolved Hide resolved
@gak
Copy link
Contributor Author

gak commented Aug 21, 2024

Smoke test from an older version 👌

@gak gak added this pull request to the merge queue Aug 21, 2024
Comment on lines +211 to +213
k.cachedDerivedMu.RLock()
primitive, ok := k.cachedDerived[subKey]
k.cachedDerivedMu.RUnlock()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd just use a Mutex and do:

k.cachedDerivedMu.Lock()
defer k.cachedDerivedMu.Unlock()

Merged via the queue into main with commit 3da112c Aug 21, 2024
74 checks passed
@gak gak deleted the gak/encryption-safety branch August 21, 2024 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-all A PR with this label will run the full set of CI jobs in the PR rather than in the merge queue
Projects
None yet
3 participants