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

feat: Added check for binaries to skip "installToolsCmd" #670

Closed

Conversation

SkySingh04
Copy link

@SkySingh04 SkySingh04 commented Jun 19, 2024

Updated probeRPMStatus to check if binaries are present and only if not present to all installToolsCmd
Closes #652 #651

Copy link

codecov bot commented Jun 19, 2024

Codecov Report

Attention: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Project coverage is 33.96%. Comparing base (2602d59) to head (76752b6).
Report is 144 commits behind head on main.

Files with missing lines Patch % Lines
pkg/pkgmgr/rpm.go 0.00% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #670      +/-   ##
==========================================
+ Coverage   32.51%   33.96%   +1.45%     
==========================================
  Files          17       18       +1     
  Lines        1621     1534      -87     
==========================================
- Hits          527      521       -6     
+ Misses       1062      980      -82     
- Partials       32       33       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ashnamehrotra
Copy link
Contributor

ashnamehrotra commented Jun 20, 2024

@Akash-Singh04 is there a specific image we can test the changes with? Also its failing lint fix (you can run golangci-lint run) and the PR title is failing semantics check due to Feat vs feat.

@@ -353,6 +372,7 @@ func (rm *rpmManager) probeRPMStatus(ctx context.Context, toolImage string) erro
return nil
}


Copy link
Contributor

Choose a reason for hiding this comment

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

nit new line

toolsInstalled := toolingBase.Run(llb.Shlex(installToolsCmd), llb.WithProxy(utils.GetProxy())).Root()
toolsApplied := rm.config.ImageState.File(llb.Copy(toolsInstalled, "/usr/sbin/busybox", "/usr/sbin/busybox"))
toolList := []string{"dnf", "microdnf", "rpm", "yum"}
missingTools := make([]string, 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the tools we want to check are busybox cpio dnf-utils? and if they are not already present, we want to be able to install them with microdnf,yum etc rather than just tdnf

@sozercan sozercan changed the title Feat : Added check for binaries to skip "installToolsCmd" feat : Added check for binaries to skip "installToolsCmd" Jun 21, 2024
@sozercan sozercan changed the title feat : Added check for binaries to skip "installToolsCmd" feat: Added check for binaries to skip "installToolsCmd" Jun 21, 2024
@SkySingh04 SkySingh04 closed this Aug 31, 2024
@SkySingh04 SkySingh04 deleted the skipInstallToolsCmd branch August 31, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[REQ] Implement a possibility to skip "installToolsCmd"
2 participants