-
Notifications
You must be signed in to change notification settings - Fork 228
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
3.16 Bug - Visits from the SaaS do not store the results in the DB #6521
Comments
There is work to be done on the SaaS and on the plugin. Root cause & suggested solutionsThere is a main issue and a secondary one. The secondary issue is that the script might not have time to complete in the time the SaaS browses and close the page. To solve this:
This adds the attribute beacon-completed to the script tag when the script finished, so that the SaaS can detect it. Maybe we can use document.currentScript instead of the first line, I don't know...
This ensures the SaaS waits for the script to be completed, or wait up to 10 seconds. There is one thing to add: the SaaS should not wait 10s if the beacon script is not found. So maybe first, check that the script is found. If it is, waitForFunction, else just continue. To do this, we can use something like
Effort: I think this is a XS for the SaaS, and XS for the plugin. So S. |
LGTM |
SaaS side: branch ready, waiting for plugin for complete test. feature/6521-3-16-compat-beacon-script
On the first point, I'd like to investigate a more sustainable approach with a header. To.whoever implements this on the plugin, let's test rogether once you have a working version |
@Khadreal I managed to validate the behavior on new.rocketlabs with your branch and the one on SaaS. I am putting the SaaS one ready for review, I'll let you wrap-up your branch and put it in review as well :) |
@Khadreal I think there is an issue with your PR: The beacon-completed attribute is set only if the beacon script completes with data to send to the AJAX endpoint. Now that we have bail-outs possible, this part of the code should be moved so that it is always done when the script completes:
@hanna-meda It could be linked to the issue you reported with homepage on new.rocketlabs. To re-check after fixing this. |
Related Test Run HERE |
@hanna-meda I think the test plan should also ensure that valid results are stored in the DB (see the original description). The SaaS visit can be successful but nothing in the DB if there is a bug on the plugin side for instance. |
@MathieuLamiot, you're right. Adding steps to check DB - RUCSS/ATF tables (depending on scenarios) in TCs where this check is missing. |
Context
With the 3.16 pre-alpha, when the SaaS visits a page, the results of the beacon script are not stored in the DB.
This issue needs #6518 first.
How to reproduce
https://rucss-director-staging.public-default.live2-k8s-cph3.one.com/
Expected behavior
Acceptance Criteria
The text was updated successfully, but these errors were encountered: