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

Avoid ambiguous wazuh-indexer package naming #486

Closed
Tracked by #484
AlexRuiz7 opened this issue Oct 22, 2024 · 3 comments · Fixed by #502
Closed
Tracked by #484

Avoid ambiguous wazuh-indexer package naming #486

AlexRuiz7 opened this issue Oct 22, 2024 · 3 comments · Fixed by #502
Assignees
Labels
level/subtask Subtask issue mvp Minimum Viable Product type/enhancement Enhancement issue

Comments

@AlexRuiz7
Copy link
Member

AlexRuiz7 commented Oct 22, 2024

Description

Note

As the issue modifies the packages generation process, prefix your branch with ci/ to invoke and test the builder.

From Wazuh 5, wazuh-indexer packages are composed by several components, the wazuh-indexer and the plugins. The source code of these components are stores in different Git repositories. We need to unambiguously identify a wazuh-indexer package, whihc is not the case now as the package name only contains the commit SHA from the wazuh-indexer repo.

To ensure that changes on any of the plugins effectively identifies a package, even if the commit in the wazuh-indexer repository is the same, we will suffix the package after the combination of the commit SHA of the 3 repositories together (wazuh-indexer, wazuh-indexer-plugins and wazuh-indexer-reporting).

Use case scenario (current)

State A

Inputs: deb, x64

Repository Commit SHA
wazuh-indexer 62e4d4b
wazuh-indexer-plugins 4c105dd
wazuh-indexer-reporting 3b03eb3

Output: wazuh-indexer_5.0.0-1_amd64_62e4d4bf072.deb

State A+1

Inputs: deb, x64

Repository Commit SHA
wazuh-indexer 62e4d4b
wazuh-indexer-plugins a7cf4b6
wazuh-indexer-reporting 3b03eb3

Output: wazuh-indexer_5.0.0-1_amd64_62e4d4bf072.deb

Conclusions

Although the wazuh-indexer-plugins repo has new code, the package is not built as there is a package in the S3 bucket suffixed with the same commit SHA.

Use case scenario (expected)

State A

Inputs: deb, x64

Repository Commit SHA
wazuh-indexer 62e4d4b
wazuh-indexer-plugins 4c105dd
wazuh-indexer-reporting 3b03eb3

Output: wazuh-indexer_5.0.0-1_amd64_62e4d4bf072-4c105dd-3b03eb3.deb

State A+1

Inputs: deb, x64

Repository Commit SHA
wazuh-indexer 62e4d4b
wazuh-indexer-plugins a7cf4b6
wazuh-indexer-reporting 3b03eb3

Output: wazuh-indexer_5.0.0-1_amd64_62e4d4bf072-a7cf4b6-3b03eb3.deb

@AlexRuiz7 AlexRuiz7 added level/subtask Subtask issue type/enhancement Enhancement issue labels Oct 22, 2024
@wazuhci wazuhci moved this to Backlog in Release 4.10.0 Oct 22, 2024
@QU3B1M QU3B1M self-assigned this Oct 22, 2024
@wazuhci wazuhci moved this from Backlog to In progress in Release 4.10.0 Oct 23, 2024
@QU3B1M
Copy link
Member

QU3B1M commented Oct 23, 2024

This issue will remain on hold until we decide which method will be used

@wazuhci wazuhci moved this from In progress to On hold in Release 4.10.0 Oct 23, 2024
@wazuhci wazuhci moved this from On hold to In progress in Release 4.10.0 Oct 25, 2024
@QU3B1M QU3B1M linked a pull request Oct 29, 2024 that will close this issue
3 tasks
@wazuhci wazuhci moved this to In progress in Release 5.0.0 Oct 29, 2024
@wazuhci wazuhci removed this from Release 4.10.0 Oct 29, 2024
@QU3B1M
Copy link
Member

QU3B1M commented Oct 29, 2024

Packages are being generated with the hashes concatenated
image

@QU3B1M
Copy link
Member

QU3B1M commented Oct 30, 2024

Added notices messages to show the resulting URI for the packages on the S3 Bucket
image

@wazuhci wazuhci moved this from In progress to Pending review in Release 5.0.0 Oct 31, 2024
@AlexRuiz7 AlexRuiz7 changed the title Avoid duplicated package generation based on commit Avoid ambiguous wazuh-indexer package naming Oct 31, 2024
@AlexRuiz7 AlexRuiz7 added the mvp Minimum Viable Product label Oct 31, 2024
@wazuhci wazuhci moved this from Pending review to Done in Release 5.0.0 Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/subtask Subtask issue mvp Minimum Viable Product type/enhancement Enhancement issue
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants