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

Blank window due to conflicts with the cached assets #4353

Closed
Tracked by #4160
AlexRuiz7 opened this issue Jul 22, 2022 · 1 comment · Fixed by wazuh/wazuh-packages#1768
Closed
Tracked by #4160

Blank window due to conflicts with the cached assets #4353

AlexRuiz7 opened this issue Jul 22, 2022 · 1 comment · Fixed by wazuh/wazuh-packages#1768
Assignees
Labels
compatibility Issues related to the App compatibility with the platforms type/bug Bug issue

Comments

@AlexRuiz7
Copy link
Member

AlexRuiz7 commented Jul 22, 2022

Wazuh OpenSearch Rev Security
4.3.6 1.2.0 4xxx -
Browser
Chrome, Firefox, Safari, etc

Description

image

This issue has been affecting our plugin for a long time. We need to investigate how to solve this issue in order to refresh the assets cache when necessary, this is, when the version of the cached assets and the actual plugin version do not match, for example, after a plugin update.

For other team members, check this conversation in Slack.

Kibana

We researched how the cache versioning works in Kibana, and found out that there was an issue with it, being fixed in Kibana 7.13.0.

For older versions, our plugin notifies the user with a toast, indicating that there might be a problem with the cached assets, and that a clear refresh is required.

For versions newer than 7.13.0, the assets are properly cached using the plugin build number, so no toast is shown.

image

OpenSearch Dashboards

As OpenSearch was forked from Kibana at v7.10.2, this fix wasn't included. They have an issue on their repo about this matter, being fixed in OSD v1.3.1.

As Wazuh currently uses the OpenSearch 1.2.0 stack (indexer + dashboard), this issue is present in our OSD - Wazuh Dashboard plugin. A toast must be shown to notify the user about this.

image
image
image

However, the PR that fixed the broken cache buster on OSD do not take into account the plugins, but the platform itself. So, using different Wazuh versions with the same OSD version will result in conflicts with the plugin's cache. The buildNumber in the package.json from OS defines how the cached assets are used, as seen in this PR.

Proposed solution

We need the @wazuh/cicd team to change the OSD build number on the package.json with a unique number for each Wazuh version, using the Wazuh version itself or the App revision number.

PoC

image
image

@AlexRuiz7 AlexRuiz7 added type/bug Bug issue compatibility Issues related to the App compatibility with the platforms labels Jul 22, 2022
@davidjiglesias davidjiglesias moved this to Triage in Release 4.4.0 Jul 27, 2022
@gdiazlo gdiazlo moved this from Triage to Todo in Release 4.4.0 Aug 29, 2022
@vikman90 vikman90 added this to the Release 4.4.0 milestone Aug 31, 2022
@gdiazlo gdiazlo removed this from Release 4.4.0 Aug 31, 2022
@gdiazlo gdiazlo removed this from the Release 4.4.0 milestone Aug 31, 2022
@AlexRuiz7 AlexRuiz7 linked a pull request Oct 11, 2022 that will close this issue
3 tasks
@AlexRuiz7
Copy link
Member Author

The solution by @wazuh/cicd proves to change the build number used by OpenSearch for assets caching.

Different versions of Wazuh will use now different build numbers, and consequently, different URLs, so this problem should not happen again. However, we'll keep watching this issue for whatever it might happen.

Below, a screenshot can be seen as evidence. Note the number 440 in the URL. The number represents the version of Wazuh: 4.4.0 (test package).

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Issues related to the App compatibility with the platforms type/bug Bug issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants