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: Copa hangs when InstallUpdates fails #508

Merged
merged 3 commits into from
Feb 20, 2024

Conversation

ashnamehrotra
Copy link
Contributor

@ashnamehrotra ashnamehrotra commented Feb 16, 2024

Describe the changes in this pull request using active verbs such as Add, Remove, Replace ...

Errors in the patchWithContext function's bkClient.Build call within the goroutine were not being propagated up to the calling Patch function. This PR adds communication to the original channel to throw an error from within the function its coming from.

Closes #503

Instead of hanging and reaching timeout error, this is the output of scanning ngxin:1.21.6 image after changes:

... INFO[0017] Validated package perl-base version 5.32.1-4+deb11u3 meets requested version 5.32.1-4+deb11u3 INFO[0017] Validated package tar version 1.34+dfsg-1+deb11u1 meets requested version 1.34+dfsg-1+deb11u1 ERRO[0017] downloaded package libgnutls30 version 3.7.1-5+deb11u4 lower than required 3.7.1-5+deb11u5 for update INFO[0017] Validated package libkrb5-3 version 1.18.3-6+deb11u4 meets requested version 1.18.3-6+deb11u4 INFO[0017] Validated package libsystemd0 version 247.3-7+deb11u4 meets requested version 247.3-7+deb11u2 INFO[0017] Validated package libwebp6 version 0.6.1-2.1+deb11u2 meets requested version 0.6.1-2.1+deb11u2 INFO[0017] Validated package libx11-data version 2:1.7.2-1+deb11u2 meets requested version 2:1.7.2-1+deb11u2 INFO[0017] Validated package libxslt1.1 version 1.1.34-4+deb11u1 meets requested version 1.1.34-4+deb11u1 INFO[0017] Validated package zlib1g version 1:1.2.11.dfsg-2+deb11u2 meets requested version 1:1.2.11.dfsg-2+deb11u2 INFO[0017] Validated package curl version 7.74.0-1.3+deb11u11 meets requested version 7.74.0-1.3+deb11u11 INFO[0017] Validated package libgssapi-krb5-2 version 1.18.3-6+deb11u4 meets requested version 1.18.3-6+deb11u4 INFO[0017] Validated package libtasn1-6 version 4.16.0-2+deb11u1 meets requested version 4.16.0-2+deb11u1 INFO[0017] Validated package libtinfo6 version 6.2+20201114-2+deb11u2 meets requested version 6.2+20201114-2+deb11u2 Error: 1 error occurred: * downloaded package libgnutls30 version 3.7.1-5+deb11u4 lower than required 3.7.1-5+deb11u5 for update

Signed-off-by: ashnamehrotra <ashnamehrotra@gmail.com>
Signed-off-by: ashnamehrotra <ashnamehrotra@gmail.com>
Copy link

codecov bot commented Feb 16, 2024

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (2602d59) 32.51% compared to head (525bd89) 34.02%.
Report is 7 commits behind head on main.

Files Patch % Lines
pkg/patch/patch.go 0.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #508      +/-   ##
==========================================
+ Coverage   32.51%   34.02%   +1.51%     
==========================================
  Files          17       17              
  Lines        1621     1299     -322     
==========================================
- Hits          527      442      -85     
+ Misses       1062      825     -237     
  Partials       32       32              

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

@sozercan
Copy link
Member

@ashnamehrotra CI should be green after #506

@ashnamehrotra ashnamehrotra merged commit 0b98f33 into project-copacetic:main Feb 20, 2024
18 checks passed
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.

[BUG] copa CLI gets to a deadlock if package validation fails
2 participants