Fix mounted event issues on invite members banner
What does this MR do?
- Adds ability to buffer/flush events if snow plow is not initialized.
- This is needed due to timing of Snowplow initialization, which waits on the same listener
- Addition troubleshooting info https://gitlab.com/gitlab-org/gitlab/-/issues/301221#note_514271840
- Ensures
invite_members_banner_displayed
tracking event is fired correctly
No changelog
- Code that uses it is behind a feature flag and other code it may affect is developer facing.
localhost
for URL)
Troubleshooting steps that led to this conclusion(snowplow must be configured and enabled for your instance to see this under general instance settings - can point to -
Replicated the issue on
.com
we can see below theSnowplow
tracker is not configured yet when our banner loads. -
For Show page(Group overview): Replicated the issue locally, we see from console logging messages our ordering of initialization is not correct. (already added the listener for
details
page to show the difference). A failed post means the tracker is initialized, but can't make it to snowplow since I am using a local setup(this is good and the tracker is configured). -
For Details page(Details): Similar to the above for Show - we can see the unconfigured tracker. (reload hits
show
where I had already added the listener) -
Finally - showing no unconfigured trackers once flush pending added.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related to #301221