fix: Copa hangs when InstallUpdates fails #508
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the changes in this pull request using active verbs such as Add, Remove, Replace ...
Errors in the
patchWithContext
function'sbkClient.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