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

[HOLD for payment 2024-04-15] [Simplified Collect][Members] Members list does not update to show the new admin and owner #39057

Closed
6 tasks done
kbecciv opened this issue Mar 27, 2024 · 20 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Mar 27, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.57-0
Reproducible in staging?: y
Reproducible in production?: new feature
Issue reported by: Applause - Internal Team

Action Performed:

Precondition:

  • User is an admin of a Collect workspace, but not an owner.
  1. Go to staging.new.expensify.com.
  2. Go to Profile > Workspaces > Collect workspace.
  3. Go to Members.
  4. Click on the owner in the list.
  5. Click Transfer owner.
  6. Go through the steps.
  7. Close the RHP.

Expected Result:

The Members list will update to show the new admin and owner.

Actual Result:

The Members list does not update to show the new admin and owner. It only updates after refreshing the page.

Workaround:

n/a

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6428620_1711540656330.owner_list_not_update.mp4

View all open jobs on GitHub

@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Mar 27, 2024
@kbecciv
Copy link
Author

kbecciv commented Mar 27, 2024

We think that this bug might be related to #wave-control

Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Mar 27, 2024

Triggered auto assignment to @nkuoch (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@nkuoch
Copy link
Contributor

nkuoch commented Mar 27, 2024

@luacmartins Is this from #37869?
Can we remove the DeployBlocker label and let Burczu fix it?

@luacmartins
Copy link
Contributor

Yes, we can remove the label and I can take this over since it's from the Simplified Collect project. Thanks for the ping!

@luacmartins luacmartins assigned luacmartins and unassigned nkuoch Mar 27, 2024
@luacmartins luacmartins added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Mar 27, 2024
@luacmartins luacmartins changed the title Transfer owner - Members list does not update to show the new admin and owner [Simplified Collect][Members] Members list does not update to show the new admin and owner Mar 27, 2024
@luacmartins
Copy link
Contributor

I didn't see this behavior in my tests. @burczu can you reproduce?

@luacmartins
Copy link
Contributor

I took a quick look at this. It works for me locally, but for some reason in staging all other policy members seem to get the update except for the user making the request.

@iwiznia @danieldoglas any ideas why this update is being delivered to other policy members but not the user making the request since they are also a policy member? This seems to work locally, but not in staging

@danieldoglas
Copy link
Contributor

@luacmartins was the update returned in the HTTPs response? It should, but if it wasn't, that update won't be sent though pusher to the requester client too.

@luacmartins
Copy link
Contributor

luacmartins commented Mar 28, 2024

@danieldoglas it was not. The http response has an empty array, but other members get the update.

@danieldoglas
Copy link
Contributor

that's indeed very strange. Anything that is inserted in onyx in which the user is also included should be returned in the HTTP request. So that's where the problem is... not sure why that would happen in staging but not in dev.

@burczu
Copy link
Contributor

burczu commented Mar 28, 2024

@luacmartins Could you please assign it to me? I think the problem comes from my incorrect assumption when creating mocked API responses - I presumed that once the change owner request is successful, the API will return updated list of members and the related Policy onyx key will update automatically (something like in my example mocked response, I've attached below). But I think we agreed in the proposal document that it will just clear the errorFields object, so the update should occur on the frontend side - am I right?

On the other hand, maybe this should be done on the backend side? Because the update will be visible for other clients instantly then?

return new Promise((resolve) => {
    setTimeout(() => {
        resolve({
            jsonCode: 200,
            onyxData: [
                {
                    key: 'policy_861B441F4C96AD1E',
                    onyxMethod: 'merge',
                    value: {
                        owner: 'bartek.dybowski+161@callstack.com',
                        ownerAccountID: 16388108,
                        errorFields: null,
                    },
                },
            ],
        });
    }, 2000);
});

@burczu
Copy link
Contributor

burczu commented Mar 28, 2024

@luacmartins I've just added a draft PR with the change that should fix the issue on the front end side.

@luacmartins
Copy link
Contributor

@burczu I think setting it optimistically makes sense too, but I think there's something up with the API side too. I'll investigate this again now.

@luacmartins
Copy link
Contributor

Ok, here's a video of the request in staging. We can see that the response for the user making the request is empty, but in the end of the video we can see the roles for the other user being updated (after I pointed that out in the video lol), so the Onyx update seems to be sent correctly for that user. This are the request logs, nothing stood out to me.

Screen.Recording.2024-03-28.at.11.47.01.AM.mov

Here's the same request made in dev. We can see that the user making the request also receives the update.

dev.mov

@luacmartins
Copy link
Contributor

luacmartins commented Mar 28, 2024

Hmm I think I see an issue, but it's hard to tell if that's the right fix since it works in dev. Gonna put up a PR.

@luacmartins luacmartins added the Reviewing Has a PR in review label Mar 28, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Mar 29, 2024
luacmartins added a commit that referenced this issue Mar 29, 2024
…not-update-owner

#39057 - Members list does not update to show the new admin and owner
BartoszGrajdek pushed a commit to software-mansion-labs/expensify-app-fork that referenced this issue Mar 29, 2024
…ist-does-not-update-owner

Expensify#39057 - Members list does not update to show the new admin and owner
@trjExpensify
Copy link
Contributor

Is this one done and over the line, or what's left to tackle?

@burczu
Copy link
Contributor

burczu commented Apr 2, 2024

@trjExpensify On the frontend side the issue is fixed, but @luacmartins wanted also to fix this on the backend side, and I don't know if it's done already.

@luacmartins
Copy link
Contributor

This is fixed! We're good to close since there's no C+ payment due.

@github-project-automation github-project-automation bot moved this from Polish to Done in [#whatsnext] #wave-collect Apr 2, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Apr 8, 2024
@melvin-bot melvin-bot bot changed the title [Simplified Collect][Members] Members list does not update to show the new admin and owner [HOLD for payment 2024-04-15] [Simplified Collect][Members] Members list does not update to show the new admin and owner Apr 8, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 8, 2024
Copy link

melvin-bot bot commented Apr 8, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Apr 8, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-04-15. 🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering Weekly KSv2
Projects
No open projects
Archived in project
Development

No branches or pull requests

6 participants