-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Bug 1942608: do not list the image with error locating manifest #4726
Bug 1942608: do not list the image with error locating manifest #4726
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4726 +/- ##
==========================================
+ Coverage 43.02% 43.07% +0.04%
==========================================
Files 107 107
Lines 9764 9763 -1
==========================================
+ Hits 4201 4205 +4
+ Misses 5110 5104 -6
- Partials 453 454 +1 |
/retest |
internal/storage/image.go
Outdated
@@ -315,7 +315,7 @@ func (svc *imageService) ListImages(systemContext *types.SystemContext, filter s | |||
return nil, err | |||
} | |||
results, err = svc.appendCachedResult(systemContext, ref, image, results, newImageCache) | |||
if err != nil { | |||
if err != nil && !strings.Contains(err.Error(), fmt.Sprintf(`error locating item named "%s"`, "manifest")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is too specific. Another option we discussed is keeping a list of images being pulled and then if we get any such error for an image in that list, we skip it.
b44fc11
to
7902947
Compare
/override ci/openshift-jenkins/critest_rhel LGTM |
@haircommander: Overrode contexts on behalf of haircommander: ci/openshift-jenkins/critest_fedora, ci/openshift-jenkins/critest_rhel In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest |
7902947
to
dc07eda
Compare
/retest |
dc07eda
to
1dd33fc
Compare
server/image_pull.go
Outdated
@@ -273,7 +273,9 @@ func (s *Server) pullImage(ctx context.Context, pullArgs *pullArguments) (string | |||
if len(status.RepoDigests) > 0 { | |||
imageRef = status.RepoDigests[0] | |||
} | |||
|
|||
if _, ok := storage.PulledImages[status.ID]; !ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to remove it from the map oncer the pull is completed.
internal/storage/image.go
Outdated
@@ -93,6 +93,8 @@ type imageService struct { | |||
ctx context.Context | |||
} | |||
|
|||
var PulledImages map[string]int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need sync on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use a sync.Map
7f3611a
to
cc5465b
Compare
@mrunalp PTAL |
/retest |
1 similar comment
/retest |
@vrothberg @saschagrunert PTAL |
cc5465b
to
f7640ca
Compare
/retest Please review the full test history for this PR and help us cut down flakes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
/override ci/prow/e2e-agnostic |
@saschagrunert: Overrode contexts on behalf of saschagrunert: ci/prow/e2e-agnostic In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/override ci/prow/e2e-gcp |
@saschagrunert: Overrode contexts on behalf of saschagrunert: ci/prow/e2e-gcp In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fix Bug 1942608, during the call of ListImages, do not list the image if the there's no manifest exist. Skip reporting the error locating manifest if the imaage is in the ImageBeingPulled list. Signed-off-by: Qi Wang <qiwan@redhat.com>
8071f56
to
82f315a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander, QiWang19, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/override ci/prow/e2e-gcp |
@saschagrunert: Overrode contexts on behalf of saschagrunert: ci/prow/e2e-agnostic, ci/prow/e2e-gcp In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test e2e_cgroupv2 |
/override ci/prow/e2e-gcp |
@saschagrunert: Overrode contexts on behalf of saschagrunert: ci/prow/e2e-agnostic, ci/prow/e2e-gcp In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/test e2e_rhel |
/retest Please review the full test history for this PR and help us cut down flakes. |
@QiWang19: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/cherry-pick release-1.21 |
@haircommander: new pull request created: #4785 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Apply fix cri-o#4726 when ListImage with `filter`. Previous bug https://bugzilla.redhat.com/show_bug.cgi?id=1942608 appeared in the log hyperkube ListImages with filters. `"ListImages with filter from image service failed" err="rpc error: code = Unknown desc = error locating item named \"manifest\" for image with ID \"9e11cc7364c9791ebf68949c852bf121cb4ae5829c925a1da6546be6f63b3536\": file does not exist" filter="nil"` Signed-off-by: Qi Wang <qiwan@redhat.com>
Apply fix cri-o#4726 when ListImage with `filter`. Previous bug https://bugzilla.redhat.com/show_bug.cgi?id=1942608 appeared in the log hyperkube ListImages with filters. `"ListImages with filter from image service failed" err="rpc error: code = Unknown desc = error locating item named \"manifest\" for image with ID \"9e11cc7364c9791ebf68949c852bf121cb4ae5829c925a1da6546be6f63b3536\": file does not exist" filter="nil"` Signed-off-by: Qi Wang <qiwan@redhat.com>
Fix Bug 1942608, during the call of ListImages, do not list the image if the there's no manifest exist.
Signed-off-by: Qi Wang qiwan@redhat.com
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1942608
Special notes for your reviewer:
Does this PR introduce a user-facing change?