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

Skip packages with broken dependencies when upgrading system #1009

Merged
merged 1 commit into from
Feb 2, 2022
Merged

Skip packages with broken dependencies when upgrading system #1009

merged 1 commit into from
Feb 2, 2022

Conversation

dlorch
Copy link
Contributor

@dlorch dlorch commented Jan 31, 2022

Context

Instead of breaking the build and stopping the CodeBuild job, the flag --skip-broken will skip packages with broken dependencies. This can occur when a package suddenly introduces a new dependency that cannot be resolved by the system, causing the CodeBuild job to suddenly fail.

Description

Example of a broken build, due to a new version of NodeJS introducing a dependency to a libuv version that cannot be resolved. Instead of stopping the build, the flag --skip-broken will skip upgrading NodeJS and ensure prowler can still run with the older version of NodeJS.

--> Finished Dependency Resolution
Error: Package: 1:nodejs-16.13.2-3.el7.x86_64 (epel)
           Requires: libuv >= 1:1.42.0
           Installed: 1:libuv-1.39.0-1.amzn2.x86_64 (@amzn2-core)
               libuv = 1:1.39.0-1.amzn2
           Available: 1:libuv-1.23.2-1.amzn2.0.2.i686 (amzn2-core)
               libuv = 1:1.23.2-1.amzn2.0.2
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[Container] 2022/01/31 09:03:20 Command did not exit successfully yum install -y nodejs exit status 1
[Container] 2022/01/31 09:03:20 Phase complete: INSTALL State: FAILED
[Container] 2022/01/31 09:03:20 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: yum install -y nodejs. Reason: exit status 1

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Member

@jfagoagas jfagoagas left a comment

Choose a reason for hiding this comment

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

Good point!! Thanks @dlorch

@jfagoagas jfagoagas added the status/waiting-for-revision Waiting for maintainer's revision label Feb 2, 2022
@toniblyx toniblyx merged commit 72b30aa into prowler-cloud:master Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/waiting-for-revision Waiting for maintainer's revision
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants