Skip to content

NewStoredUser: Remove handle - #5475

Merged
akshaymankar merged 2 commits into
developfrom
remove-handle-from-new-stored-user
Aug 26, 2026
Merged

NewStoredUser: Remove handle#5475
akshaymankar merged 2 commits into
developfrom
remove-handle-from-new-stored-user

Conversation

@akshaymankar

@akshaymankar akshaymankar commented Aug 25, 2026

Copy link
Copy Markdown
Member

The cassandra interpreter was storing the handle without "claiming" it, expecting the caller to make a subsequent call to claim the handle.

The postgresql interpreter was claiming it unsafely, so it'd throw a 500 if the handle was already claimed.

Removing the handle from this type seems the more correct way where the calling party must make a subsequent call to claim the handle and deal with this partial failure in creating a user.

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d.
  • Read and follow the PR guidelines

@akshaymankar
akshaymankar requested a review from a team as a code owner August 25, 2026 08:34
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Aug 25, 2026

@fisx fisx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

so, we wrote the handle into the StoredUser, but it wasn't claimed yet. and now we're not, and instead we get the handle from -- where?

looks plausible, but i'd like to understand it better.

Comment thread libs/wire-subsystems/src/Wire/UserStore/Cassandra.hs Outdated
Comment thread services/brig/src/Brig/API/User.hs Outdated
The cassandra interpreter was storing the handle without "claiming" it,
expecting the caller to make a subsequent call to claim the handle.

The postgresql interpreter was claiming it unsafely, so it'd throw a 500 if the
handle was already claimed.

Removing the handle from this type seems the more correct way where the calling
party must make a subsequent call to claim the handle and deal with this partial
failure in creating a user.
@akshaymankar
akshaymankar force-pushed the remove-handle-from-new-stored-user branch from 5893f2e to e17d4b9 Compare August 25, 2026 09:04
@akshaymankar
akshaymankar requested review from a team as code owners August 25, 2026 09:22
@akshaymankar
akshaymankar force-pushed the remove-handle-from-new-stored-user branch from 005de33 to 230bc67 Compare August 25, 2026 14:03
@akshaymankar
akshaymankar merged commit a8ea553 into develop Aug 26, 2026
9 checks passed
@akshaymankar
akshaymankar deleted the remove-handle-from-new-stored-user branch August 26, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants