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

Tar error in the package build workflow #167

Closed
rauldpm opened this issue Apr 16, 2024 · 3 comments · Fixed by #168 or #169
Closed

Tar error in the package build workflow #167

rauldpm opened this issue Apr 16, 2024 · 3 comments · Fixed by #168 or #169
Assignees
Labels
level/task Task issue type/bug Bug issue

Comments

@rauldpm
Copy link
Member

rauldpm commented Apr 16, 2024

Description

  • Inputs
    • architecture: x86_64
    • checksum: false
    • is_stage: true
    • reference_security_plugins: 4.9.0
    • reference_wazuh_plugins: 4.9.0
    • revision: 999
    • system: rpm
    • CHECKOUT_TO: 4.9.0

The package name revision for the base file seems to be not correct (see revision)

image

It has been possible to see the following error too:

image

This error appears to be related to the security plugin

Extracting Security application
tar: stdout: write error

We need to check if those errors are related or not, also, the workflow finished as a success, but it should not

Related

@rauldpm rauldpm added type/bug Bug issue level/task Task issue untriaged and removed untriaged labels Apr 16, 2024
@wazuhci wazuhci moved this to Backlog in Release 4.9.0 Apr 16, 2024
@Tostti Tostti self-assigned this Apr 16, 2024
@wazuhci wazuhci moved this from Backlog to In progress in Release 4.9.0 Apr 16, 2024
@Tostti Tostti linked a pull request Apr 16, 2024 that will close this issue
7 tasks
@Tostti
Copy link
Member

Tostti commented Apr 16, 2024

Research

The issue seems to be related to a large output from a command in the GitHub Actions.
It happens due to the line

 directory_name=$(tar -tzf wazuh-dashboard.tar.gz | head -1 | sed 's#/.*##' | sort -u)

Used in the base generaction script to get the name of the subfolder of the Dashboard package regardless of the version and how was it constructed.
Will research about an alternative way to do this that avoids this error. However it does not cause any problem in the package generation itself, and the generated packages works as expected.

@Tostti
Copy link
Member

Tostti commented Apr 17, 2024

Update 17/4

To resolve the issue, a workaround was implemented: instead of retrieving all the compressed package content to get the subfolder name, we get the last folder created in the directory after extracting the package

directory_name=$(ls -t | head -1)

This was implemented in three different sections on which this problem was present.

Additionally, it was noticed that the building process didn't stop if a plugin failed to install. New logic was added to detect those events and end the script execution in that case.

@wazuhci wazuhci moved this from In progress to Pending review in Release 4.9.0 Apr 17, 2024
@wazuhci wazuhci moved this from Pending review to Done in Release 4.9.0 Apr 17, 2024
@Tostti
Copy link
Member

Tostti commented Apr 18, 2024

I'm reopening the issue because due to the branch changes for compatibility with 2.13, the workflow is showning some new errors

@Tostti Tostti reopened this Apr 18, 2024
@wazuhci wazuhci moved this from Done to In progress in Release 4.9.0 Apr 18, 2024
@Tostti Tostti linked a pull request Apr 18, 2024 that will close this issue
7 tasks
@wazuhci wazuhci moved this from In progress to Pending review in Release 4.9.0 Apr 18, 2024
@wazuhci wazuhci moved this from Pending review to Done in Release 4.9.0 Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/bug Bug issue
Projects
No open projects
Status: Done
2 participants