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

Shown Wazuh API version is wrong or empty after upgrade #7203

Conversation

guidomodarelli
Copy link
Contributor

@guidomodarelli guidomodarelli commented Dec 16, 2024

Description

During wazuh/wazuh#27183, it was found that Wazuh API version shown is not the current one after upgrading from v4.9.2 to v4.10.0-rc1

image

After cleaning the cache, the error is worse

image

Expected behavior

Wazuh API is v4.10.0

image

Issues Resolved

Closes wazuh/wazuh-dashboard#440

Evidence

image

image

image

image

Test

  1. Navigate to Dashboard management » Server APIs
  2. Open DevTools
  3. Go to Application » Session storage
  4. Delete key checkUpdates
    image
  5. Reload the page
  6. Please verify the status of the Version column under two scenarios: when everything is correct and when an issue arises.

Note

Remove checkUpdates for each reloaded page.

Unit tests

image

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

…ng and optimize status checking logic for better clarity
@chantal-kelm chantal-kelm self-requested a review December 16, 2024 19:49
@guidomodarelli guidomodarelli requested a review from a team December 16, 2024 21:30
@Tostti Tostti self-requested a review December 17, 2024 11:25
Copy link
Member

@Tostti Tostti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test 🟢

Tested in a pre-release environment, replacing the original plugins with new ones generated based on this branch
imagen

CR 🟢

LGTM

Tostti

This comment was marked as resolved.

@JuanGarriuz
Copy link
Member

Test

image

@Desvelao
Copy link
Member

Desvelao commented Dec 17, 2024

🟢 Test

image
image

@chantal-kelm found the Version column does not appear if wazuh.updates.disabled: true is enabled. I think the Version column should always appear. That value can be retrieved (as it is done in this pull request) from the Wazuh server API.

…learer version handling and improved stability
…ity and consistency with common constants and types
…ects and requests for more accurate updates handling
…for consistent updates handling across all scenarios
…api_version scenarios in update fetching logic
… error handling in dual request failure scenarios
…rsion is undefined and secondary request fails
…ilability cases and error handling scenarios
@guidomodarelli guidomodarelli requested a review from a team December 17, 2024 15:15
Tostti
Tostti previously approved these changes Dec 17, 2024
Copy link
Member

@Tostti Tostti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test 🟢
imagen

CR 🟢

LGTM

@guidomodarelli guidomodarelli requested a review from a team December 17, 2024 17:00
…ect Wazuh API version display after upgrade
…nd clarify Wazuh API version display issue after upgrade
Copy link
Contributor

Wazuh Core plugin code coverage (Jest) test % values
Statements 45.5% ( 400 / 879 )
Branches 41.09% ( 157 / 382 )
Functions 43.87% ( 136 / 310 )
Lines 45.69% ( 398 / 871 )

Copy link
Contributor

Wazuh Check Updates plugin code coverage (Jest) test % values
Statements 78.72% ( 185 / 235 )
Branches 62.72% ( 69 / 110 )
Functions 61.7% ( 29 / 47 )
Lines 78.72% ( 185 / 235 )

Copy link
Member

@asteriscos asteriscos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: 🟢
Test: 🟢

image

Copy link
Contributor

Main plugin code coverage (Jest) test % values
Statements 14.92% ( 4445 / 29774 )
Branches 9.77% ( 1877 / 19206 )
Functions 14.68% ( 1057 / 7200 )
Lines 15.14% ( 4339 / 28646 )

@asteriscos asteriscos merged commit acb171a into 4.10.0 Dec 17, 2024
5 checks passed
@asteriscos asteriscos deleted the bug/440-shown-wazuh-api-version-is-wrong-or-empty-after-upgrade branch December 17, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shown Wazuh API version is wrong or empty after upgrade
5 participants