LDAP Group Link Group Member Sync now button does not "complete"

Summary

When a GitLab Group is configured with one or more LDAP Group Link and the Sync Now button is clicked on the Group Members page, the button changes to Syncing now with a "spinner" to indicate that the sync is ongoing.

Unfortunately, the page does not update and the button does not change back.

At best, this is irritating behaviour as a GitLab admin could think that something is wrong unless they know to refresh the page.

At worst, the customer will have difficulties identifying if there are genuine issues with Sync as noted in our LDAP troubleshooting logs.

Steps to reproduce

Video attached:

LDAPGroupSync

What is the current bug behavior?

The sync button in the Group Member's Group Sync area does not change status.

What is the expected correct behavior?

After the Group Sync is complete, the list of Group Members should be updated (if necessary) and the button should change back to normal.

Possible fixes