[WPB-23765] Refresh ES index after app update, emit event.#5231
Merged
fisx merged 6 commits intoMay 19, 2026
Conversation
c5e1b0a to
731954e
Compare
battermann
approved these changes
May 18, 2026
| <$> (resp.json %. "user") | ||
| <*> (resp.json %. "user.id") | ||
|
|
||
| let Object appMetadata = |
Contributor
There was a problem hiding this comment.
Is this deconstruction necessary? If we remove it we do not have to reconstruct it later in line 247, maybe?
Contributor
Author
There was a problem hiding this comment.
do you mean 84cd1bc?
that doesn't work:
----- Apps.testPutApp FAIL (1.78 s; failed at 2026-05-19T07:02:30.674Z) -----
assertion failure:
Expected String but got Object:
{
"accent_id": 0,
"app": {
"category": "other",
"description": "default description"
},
"assets": [],
"id": "9a4b14dd-d75b-4437-b0cc-85f931139f4c",
"legalhold_status": "disabled",
"name": "choppie",
"picture": [],
"qualified_id": {
"domain": "example.com",
"id": "9a4b14dd-d75b-4437-b0cc-85f931139f4c"
},
"searchable": true,
"supported_protocols": [
"mls"
],
"team": "7542fed1-2d37-4bfe-b52f-ab22c154ef83",
"type": "app"
}
call stack:
1. assertFailure at test/Testlib/JSON.hs:345
assertFailure msg'
2. assertFailureWithJSON at test/Testlib/JSON.hs:105
v -> assertFailureWithJSON x ("String" `typeWasExpectedButGot` v)
3. asString at test/API/Brig.hs:1278
appIdStr <- asString appId
4. putAppMetadata at test/Test/Apps.hs:245
bindResponse (putAppMetadata tid owner app (Object appMetadata)) $ \resp -> do
but maybe you meant something else?
Contributor
There was a problem hiding this comment.
I mean something like this:
let appMetadata =
[aesonQQ|
{
"accent_id": 126,
"assets": [
{
"key": "3-1-47de4580-ae51-4650-acbb-d10c028cb0ac",
"description": "This is the best app ever."
}|]
withWebSockets [owner, regularMember, app] \[wsOwner, wsRegularMember, wsApp] -> do
bindResponse (putAppMetadata tid owner appId appMetadata) $ \resp -> do
resp.status `shouldMatchInt` 200
Contributor
Author
There was a problem hiding this comment.
ah, that makes a lot more sense... :-)
yeah, that might have worked, but i don't want to make another PR to change this, is that ok?
Contributor
There was a problem hiding this comment.
all good, it's a nitty nitpick
e281b3e to
84cd1bc
Compare
This reverts commit 84cd1bc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://wearezeta.atlassian.net/browse/WPB-23765
updating apps did not refresh the user index and did not send the user-update event. this is now fixed.
Checklist
changelog.d