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

Fix the GitHub and Office 365 module visibility configuration were not kept when changing the plugin #5376

Conversation

Desvelao
Copy link
Member

@Desvelao Desvelao commented Apr 14, 2023

Description

This pull request fixes a problem when the visibility of GitHub and Office 365 modules are not kept when changing/upgrading the plugin.

Changes:

  • Add the extensions.github and extensions.office settings to the default configuration file
  • Fix the problem related to migration of extension/modules visibility configuration for the API hosts
  • Enhance related tests
  • Fix typos

Related pull request (documentation): wazuh/wazuh-documentation#6036

Issues Resolved

Test

UI

Test
In a fresh installation, the GitHub and Office 365 modules should not appear in the main menu of the plugin

Other

Test
Enable the GitHub module, change the plugin to the current with the fix, and restart the plugin platform. The module should be visible in Modules directory.
Enable the Office 365 module, change the plugin to the current with the fix and restart the plugin platform. The module should be visible in Modules directory.
In a fresh installation, the default configuration file should contain the extensions.github and extensions.office365 settings

change the plugin can be simulated by changing the revision property in the package.json. Then restart the plugin platform.

template_testing.md

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

…e plugin

- Add the extensions.github and extensions.office to the plugin
  configuration file
- Enhance tests related to the extension configuration when changing the
  plugin
CHANGELOG.md Show resolved Hide resolved
@github-actions
Copy link
Contributor

Code coverage (Jest) % values
Statements 9.45% ( 3502 / 37032 )
Branches 5% ( 1436 / 28712 )
Functions 8.13% ( 747 / 9179 )
Lines 9.53% ( 3382 / 35463 )

Copy link
Member

@AlexRuiz7 AlexRuiz7 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@yenienserrano yenienserrano left a comment

Choose a reason for hiding this comment

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

LGTM

Details

image

image

image

@asteriscos asteriscos merged commit a62f2d5 into 4.5 Apr 18, 2023
@asteriscos asteriscos deleted the fix/5367-github-office365-module-visibility-configuration-on-upgrade-plugin branch April 18, 2023 14:56
@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-5376-to-4.5-7.10
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a62f2d51c6482855175e4374610dc07da87506fc
# Push it to GitHub
git push --set-upstream origin backport-5376-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-5376-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-5376-to-4.5-7.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a62f2d51c6482855175e4374610dc07da87506fc
# Push it to GitHub
git push --set-upstream origin backport-5376-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-5376-to-4.5-7.16.

Desvelao added a commit that referenced this pull request Apr 19, 2023
…t kept when changing the plugin (#5376)

* fix: fix the GitHub and Office 365 module visibility when changing the plugin

- Add the extensions.github and extensions.office to the plugin
  configuration file
- Enhance tests related to the extension configuration when changing the
  plugin

* fix: typos

* changelog: add pull request entries

---------

Co-authored-by: Álex Ruiz <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit a62f2d5)
Desvelao added a commit that referenced this pull request Apr 19, 2023
…t kept when changing the plugin (#5376)

* fix: fix the GitHub and Office 365 module visibility when changing the plugin

- Add the extensions.github and extensions.office to the plugin
  configuration file
- Enhance tests related to the extension configuration when changing the
  plugin

* fix: typos

* changelog: add pull request entries

---------

Co-authored-by: Álex Ruiz <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit a62f2d5)
asteriscos added a commit that referenced this pull request Apr 20, 2023
…onfiguration were not kept when changing the plugin (#5389)

* Fix the GitHub and Office 365 module visibility configuration were not kept when changing the plugin (#5376)

* fix: fix the GitHub and Office 365 module visibility when changing the plugin

- Add the extensions.github and extensions.office to the plugin
  configuration file
- Enhance tests related to the extension configuration when changing the
  plugin

* fix: typos

* changelog: add pull request entries

---------

Co-authored-by: Álex Ruiz <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit a62f2d5)

* Update snapshot

---------

Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
asteriscos added a commit that referenced this pull request Apr 20, 2023
…onfiguration were not kept when changing the plugin (#5388)

* Fix the GitHub and Office 365 module visibility configuration were not kept when changing the plugin (#5376)

* fix: fix the GitHub and Office 365 module visibility when changing the plugin

- Add the extensions.github and extensions.office to the plugin
  configuration file
- Enhance tests related to the extension configuration when changing the
  plugin

* fix: typos

* changelog: add pull request entries

---------

Co-authored-by: Álex Ruiz <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit a62f2d5)

* Update snapshot

---------

Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants