Skip to content

Change to async/await for update member role

Laura Callahan requested to merge 391943-fix_unhandled_error into master

What does this MR do and why?

Related to #391943

Update the updateMemberRole call in role_dropdown to async/await pattern with a try/catch. Additionally adds test coverage for Sentry logging.

Screenshots or screen recordings

Before After
stuck_update fixed_update
Error message thrown from actions.js error_message

How to set up and validate locally

  • Smoke test baseline max role update behavior
    • Open up the rails console rails c and enable the show_overage_on_role_promotion flag (Feature.enable(:show_overage_on_role_promotion))
    • Navigate to the project members page for a project (ex: gitlab-org/gitlab-shell/-/project_members)
    • Change the Max role from Guest to a higher value (Maintainer/Owner) and click Continue
    • This should be successful

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Laura Callahan

Merge request reports