Do Spar things transactionally
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
Research direction
Review the proposed insertScimAndSamlUser definition and the referenced pull request #905 first. Trace the existing Spar SCIM and SAML insertion path, including the batch and retry behavior shown in the issue. Done means the two inserts are handled transactionally as described and the WrappedScimStoredUser SparTag serialization concern is resolved.
Written by the indexing model from the issue text.
Description
Right, I think this might still be worth it in this one, and should look like something in the lines of:
insertScimAndSamlUser :: (HasCallStack, MonadClient m) => UserId -> SAML.UserRef -> ScimC.User.StoredUser SparTag -> m ()
insertScimAndSamlUser uid (SAML.UserRef tenant subject) scimUsr = retry x5 . batch $ do
setType BatchLogged
setConsistency Quorum
addPrepQuery insScim (uid, WrappedScimStoredUser scimUsr)
addPrepQuery insSaml (tenant, subject, uid)
where
insScim :: PrepQuery W (UserId, WrappedScimStoredUser SparTag) ()
insScim = "INSERT INTO scim_user (id, json) VALUES (?, ?)"
insSaml :: PrepQuery W (SAML.Issuer, SAML.NameID, UserId) ()
insSaml = "INSERT INTO user (issuer, sso_id, uid) VALUES (?, ?, ?)"
The main annoyance I see with this is that you will need a Show instance for WrappedScimStoredUser SparTag -> not sure how trivial it is to come up with a meaningful one.
Originally posted by @tiago-loureiro in https://github.com/wireapp/wire-server/pull/905
- Dominant language
- Haskell
- Stars
- 2.8k
- Forks
- 332
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 49
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from wireapp/wire-server
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
wireapp/wire-server#5632 ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
wireapp/wire-server#5443 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
wireapp/wire-server#5315 · 4 comments · 1 reaction ·
Maintainers usually reply within 2 days
-
Dependency DashboardOpen
Difficulty 5/5 Over a week Newbie friendliness 20/100
wireapp/wire-server#4754 ·
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
wireapp/wire-server#4613 ·
Maintainers usually reply within 2 days
All issues in wireapp/wire-server
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
MorphRule, DataizeRule and ContextualizeRule silently accept unknown YAML keys, unlike rewrite `Rule`Possibly taken @renyamamoto2026-cmyk claimed this 1 day ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
objectionary/phino#2107 ·
Maintainers usually reply within 1 day
-
30-minutes algorithm any-language codewars dart easy elixir hackerrank hacktoberfest haskell help wanted interview-prep julia leetcode lua open-source r scala students zig
Difficulty 2/5 Under an hour Newbie friendliness 88/100
Huerte/algo-solutions-python#124 ·