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

Remove deprecated code and request in Management #5485

Merged
merged 8 commits into from
Jun 12, 2023

Conversation

yenienserrano
Copy link
Member

@yenienserrano yenienserrano commented May 23, 2023

Description

Removed obsolete code that caused duplicate requests to the api, and change the query to search for 1 agent.

Issues Resolved

Evidence

Details

image

image

image

Test

Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable

UI

Test Chrome Firefox Safari
Ensure that requests in management/configuration are not repeated
Check that the request to agents is like this GET /agents?agents_list=000 and does not have the parameter q

Details

⚫ Ensure that requests in management/configuration are not repeated

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ Check that the request to agents is like this GET /agents?agents_list=000 and does not have the parameter q

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

Check List

  • All tests pass
    • yarn test:jest
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@yenienserrano yenienserrano requested a review from a team as a code owner May 23, 2023 15:47
@yenienserrano yenienserrano linked an issue May 23, 2023 that may be closed by this pull request
@yenienserrano yenienserrano changed the title Remove deprecated code and request Remove deprecated code and request in Management May 23, 2023
@yenienserrano yenienserrano changed the title Remove deprecated code and request in Management Remove deprecated code and request in Management May 23, 2023
@yenienserrano yenienserrano self-assigned this May 23, 2023
@Desvelao
Copy link
Member

I didn't see any changes related to other problems reported in the issue is not solved:

When choosing some configurations (global for instance). See #5242 (comment).

@yenienserrano, Could you indicate if this was solved and where?

@yenienserrano
Copy link
Member Author

I didn't see any changes related to other problems reported in the issue is not solved:

When choosing some configurations (global for instance). See #5242 (comment).

@yenienserrano, Could you indicate if this was solved and where?

This is not a change that we have to make, since it is being handled when the module is not activated.

@Desvelao
Copy link
Member

todo: remove the clusterStatus property usage in some tests and snapshots.

There are some tests definition and test snapshots that are using the clusterStatus property that was removed due to this is not being used anymore in some components.

@Desvelao
Copy link
Member

todo: remove the clusterStatus property of appStateReducers of Redux in tests.

Affected files:

  • public/controllers/management/components/management/groups/groups-main.test.tsx
  • public/controllers/management/components/management/groups/snapshots/groups-main.test.tsx.snap

@yenienserrano
Copy link
Member Author

yenienserrano commented Jun 1, 2023

todo: remove the clusterStatus property of appStateReducers of Redux in tests.

Affected files:

  • public/controllers/management/components/management/groups/groups-main.test.tsx
  • public/controllers/management/components/management/groups/snapshots/groups-main.test.tsx.snap

Done

@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2023

Code coverage (Jest) % values
Statements 9.52% ( 3503 / 36780 )
Branches 5.02% ( 1433 / 28505 )
Functions 8.19% ( 747 / 9115 )
Lines 9.6% ( 3383 / 35229 )

@Desvelao
Copy link
Member

Desvelao commented Jun 7, 2023

Test

Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable

UI

Test Chrome Firefox Safari
Ensure that requests in management/configuration are not repeated 🟢
Check that the request to agents is like this GET /agents?agents_list=000 and does not have the parameter q 🟢

Details

🟢 Ensure that requests in management/configuration are not repeated

Chrome - 🟢
image
image

Firefox - ⚫

Safari - ⚫

🟢 Check that the request to agents is like this GET /agents?agents_list=000 and does not have the parameter q

Chrome - 🟢
image

Firefox - ⚫

Safari - ⚫

Copy link
Member

@Desvelao Desvelao left a comment

Choose a reason for hiding this comment

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

review:

code 🟢
test 🟢 #5485 (comment)

@AlexRuiz7 AlexRuiz7 merged commit 1398452 into 4.5 Jun 12, 2023
@AlexRuiz7 AlexRuiz7 deleted the 5242-wazuh-api-usage-managementconfiguration branch June 12, 2023 10:50
@github-actions
Copy link
Contributor

The backport to 4.5-7.10 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.5-7.10 4.5-7.10
# Navigate to the new working tree
cd .worktrees/backport-4.5-7.10
# Create a new branch
git switch --create backport-5485-to-4.5-7.10
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 13984520d84bdb07cb0d86f1f315cec4aa39dd84
# Push it to GitHub
git push --set-upstream origin backport-5485-to-4.5-7.10
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.5-7.10

Then, create a pull request where the base branch is 4.5-7.10 and the compare/head branch is backport-5485-to-4.5-7.10.

@github-actions
Copy link
Contributor

The backport to 4.5-7.16 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.5-7.16 4.5-7.16
# Navigate to the new working tree
cd .worktrees/backport-4.5-7.16
# Create a new branch
git switch --create backport-5485-to-4.5-7.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 13984520d84bdb07cb0d86f1f315cec4aa39dd84
# Push it to GitHub
git push --set-upstream origin backport-5485-to-4.5-7.16
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.5-7.16

Then, create a pull request where the base branch is 4.5-7.16 and the compare/head branch is backport-5485-to-4.5-7.16.

yenienserrano added a commit that referenced this pull request Jun 12, 2023
* Remove deprecated code and request

* Add changelog

* Update snapshot

* remove: remove clusterStatus unused variable

* Remove clusterStatus property in groups-main.test.tsx

---------

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
(cherry picked from commit 1398452)
yenienserrano added a commit that referenced this pull request Jun 12, 2023
* Remove deprecated code and request

* Add changelog

* Update snapshot

* remove: remove clusterStatus unused variable

* Remove clusterStatus property in groups-main.test.tsx

---------

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
(cherry picked from commit 1398452)
AlexRuiz7 pushed a commit that referenced this pull request Jun 13, 2023
…agement (#5550)

Remove deprecated code and request in Management (#5485)

* Remove deprecated code and request

* Add changelog

* Update snapshot

* remove: remove clusterStatus unused variable

* Remove clusterStatus property in groups-main.test.tsx

---------

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
(cherry picked from commit 1398452)
AlexRuiz7 pushed a commit that referenced this pull request Jun 13, 2023
…agement (#5549)

Remove deprecated code and request in Management (#5485)

* Remove deprecated code and request

* Add changelog

* Update snapshot

* remove: remove clusterStatus unused variable

* Remove clusterStatus property in groups-main.test.tsx

---------

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
(cherry picked from commit 1398452)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wazuh API usage - Management/Configuration
4 participants