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

Implement support for the installation/uninstallation of npm packages #5092

Merged

Conversation

santipadilla
Copy link
Member

@santipadilla santipadilla commented Mar 12, 2024

Related issue
#5130

Description

This PR implements the support to have the option to install and uninstall packages with npm on all endpoints.

@santipadilla santipadilla marked this pull request as draft March 12, 2024 11:21
@santipadilla santipadilla changed the title Replace macOS vulnerable packages by npm Implement support for the installation/uninstallation of npm packages Mar 20, 2024
@santipadilla santipadilla linked an issue Mar 20, 2024 that may be closed by this pull request
1 task
@santipadilla santipadilla changed the base branch from 4.8.0 to enhancement/vd-e2e-tests March 20, 2024 15:38
@santipadilla santipadilla marked this pull request as ready for review March 22, 2024 13:43
@santipadilla santipadilla self-assigned this Mar 22, 2024
Copy link
Member

@MARCOSD4 MARCOSD4 left a comment

Choose a reason for hiding this comment

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

GJ, but some small changes are required

deps/wazuh_testing/wazuh_testing/tools/system.py Outdated Show resolved Hide resolved
deps/wazuh_testing/wazuh_testing/tools/system.py Outdated Show resolved Hide resolved
Copy link
Member

@MARCOSD4 MARCOSD4 left a comment

Choose a reason for hiding this comment

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

LGTM

@juliamagan juliamagan requested a review from Rebits March 26, 2024 16:03
Copy link
Member

@Rebits Rebits left a comment

Choose a reason for hiding this comment

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

Good job, Just a few minor adjustments are needed.

It's advisable to create new methods named install_npm_package and remove_npm_package. Doing so will enhance the maintainability, testability, and readability of the code. This change will make it necessary to perform minor changes in the remote_operation module to handle which method is going to be used for each package

deps/wazuh_testing/wazuh_testing/tools/system.py Outdated Show resolved Hide resolved
Copy link
Member

@Rebits Rebits left a comment

Choose a reason for hiding this comment

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

Include this change in the changelog

Copy link
Member

@Rebits Rebits left a comment

Choose a reason for hiding this comment

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

Install package and install npm packages should be totally different methods.
Currently install_package is too complex and it is difficult to maintain

@santipadilla santipadilla marked this pull request as draft April 4, 2024 08:25
@santipadilla santipadilla marked this pull request as ready for review April 4, 2024 10:27
@santipadilla
Copy link
Member Author

@Rebits Modified here: 5e8d1ea and check in this comment: #5130 (comment)

Copy link
Member

@Rebits Rebits left a comment

Choose a reason for hiding this comment

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

LGTM

@juliamagan juliamagan merged commit 349ce42 into enhancement/vd-e2e-tests Apr 5, 2024
1 of 3 checks passed
@juliamagan juliamagan deleted the 5074-replace-macos-packages-by-npm branch April 5, 2024 08:45
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.

Implement support for the installation/uninstallation of npm packages.
4 participants